Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:hellcp-work:branches:home:hellcp-work
test2
asknot-ng.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File asknot-ng.spec of Package test2
# # spec file for package asknot-ng # # Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define asknot_theme openSUSE %define asknot_locale fedora %define asknot_questions openSUSE Name: asknot-ng Version: 20220902.37b45c2 Release: 0 Summary: What can I do for openSUSE? License: GPL-3.0-only Source0: %{name}-%{version}.tar.gz # Only needed on distros with default python < 3.8 %if 0%{?suse_version} <= 1500 Patch0: asknot-ng-support-older-python.patch %endif Url: https://github.com/openSUSE/asknot-ng BuildRequires: %{python_module setuptools} BuildRequires: %{python_module mako} BuildRequires: %{python_module PyYAML} BuildRequires: python-rpm-macros BuildArch: noarch %description Ask not what openSUSE can do for you, but what you can do for openSUSE. %prep %autosetup -p1 %build ASKNOT_LOCALE_DIR=${ASKNOT_LOCALE_DIR:-l10n/%{asknot_locale}/locale} for locale in $(ls $ASKNOT_LOCALE_DIR/*.po); do echo $locale; locale=$(basename $locale) locale=${locale%.po}; mkdir -p $ASKNOT_LOCALE_DIR/$locale/LC_MESSAGES/; msgfmt -o $ASKNOT_LOCALE_DIR/$locale/LC_MESSAGES/asknot-ng.mo $ASKNOT_LOCALE_DIR/$locale.po; printf "RewriteCond %%%{HTTP:Accept-Language} ^${locale//_/$'-'} [NC]\n" >> l10n.conf printf "RewriteRule \"^/$\" \"/$locale/\" [L,R]\n\n" >> l10n.conf done python3 asknot-ng.py templates/index.html \ questions/%{asknot_questions}.yml \ l10n/%{asknot_locale}/locale \ --theme %{asknot_theme} %install mkdir -p %{buildroot}%{_datadir}/webapps/asknot-ng/ cp -r build/* %{buildroot}%{_datadir}/webapps/asknot-ng/ mkdir -p %{buildroot}%{_sysconfdir}/apache2/ cp l10n.conf %{buildroot}%{_sysconfdir}/apache2/asknot-ng-l10n.conf %check %files %dir %{_datadir}/webapps/ %dir %{_datadir}/webapps/asknot-ng/ %dir %{_datadir}/webapps/asknot-ng/*/ %{_datadir}/webapps/asknot-ng/*/index.html %{_datadir}/webapps/asknot-ng/static/* %dir %{_sysconfdir}/apache2/ %config %{_sysconfdir}/apache2/asknot-ng-l10n.conf %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor