Blob Blame Raw
%{?python_enable_dependency_generator}
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
Name:           oraculum
Version:        0.0.2
Release:        1%{?dist}
Summary:        Backend and API for Fedora QA Dashboard

License:        GPLv2+
URL:            https://pagure.io/fedora-qa/oraculum
Source0:        https://releases.pagure.org/fedora-qa/%{name}/%{name}-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
Backend and API for Fedora QA Dashboard

%prep
%setup -q
# We want Flask-Caching from pip and Flask-Cache from Fedora, see rhbz#1676914
sed -i 's/Flask-Caching/Flask-Cache/g' setup.py

%build
%py3_build

%install
%py3_install

# apache and wsgi settings
mkdir -p %{buildroot}%{_datadir}/oraculum
cp -p conf/oraculum.wsgi %{buildroot}%{_datadir}/oraculum/.

mkdir -p %{buildroot}%{_sysconfdir}/oraculum
install conf/settings.py.example %{buildroot}%{_sysconfdir}/oraculum/settings.py

install -d -m 755 %{buildroot}%{_httpd_modconfdir}
install -p -m 644 conf/oraculum.conf %{buildroot}%{_httpd_modconfdir}/oraculum.conf

%files
%doc README.md conf/*
%{python3_sitelib}/oraculum/
%{python3_sitelib}/*.egg-info/

%{_bindir}/oraculum
%dir %{_sysconfdir}/oraculum
%dir %{_datadir}/oraculum
%{_datadir}/oraculum/*

%config(noreplace) %{_sysconfdir}/oraculum/settings.py
%config(noreplace) %{_httpd_modconfdir}/oraculum.conf

%changelog
* Fri Feb 15 2019 Lukas Brabec <lbrabec@redhat.com> - 0.0.2-1
- Bump to 0.0.2

* Wed Feb 13 2019 Lukas Brabec <lbrabec@redhat.com> - 0.0.1-3
- Better summary and description

* Thu Feb 07 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 0.0.1-2
- Improved packaging

* Thu Feb 06 2014 Josef Skladanka <jskladan@redhat.com> - 0.0.1-1
- initial packaging