Blame files/pagure.spec

Pierre-Yves Chibon bf7b1c
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
Pierre-Yves Chibon bf7b1c
%distutils.sysconfig import get_python_lib; print (get_python_lib())")}
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon fe5017
Name:           pagure
Pierre-Yves Chibon bf7b1c
Version:        0.0
Pierre-Yves Chibon 669904
Release:        1.20150402%{?dist}
Pierre-Yves Chibon bf7b1c
Summary:        A git-centered forge
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
License:        GPLv2+
Pierre-Yves Chibon fe5017
URL:            http://fedorahosted.org/pagure/
Pierre-Yves Chibon fe5017
Source0:        https://fedorahosted.org/releases/p/r/pagure/%{name}-%{version}.tar.gz
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
BuildArch:      noarch
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
BuildRequires:  python2-devel
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-setuptools
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-nose
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-alembic
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-arrow
Pierre-Yves Chibon d2eff7
BuildRequires:  python-blinker
Pierre-Yves Chibon d2eff7
BuildRequires:  python-chardet
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-docutils
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-flask
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-flask-wtf
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-markdown
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-psutil
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-pygit2 >= 0.20.1
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-pygments
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-fedora
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-openid
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-openid-cla
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-openid-teams
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-straight-plugin
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-wtforms
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
# EPEL6
Pierre-Yves Chibon bf7b1c
%if ( 0%{?rhel} && 0%{?rhel} == 6 )
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-sqlalchemy0.8
Pierre-Yves Chibon bf7b1c
Requires:  python-sqlalchemy0.8
Pierre-Yves Chibon bf7b1c
%else
Pierre-Yves Chibon bf7b1c
BuildRequires:  python-sqlalchemy > 0.8
Pierre-Yves Chibon bf7b1c
Requires:  python-sqlalchemy > 0.8
Pierre-Yves Chibon bf7b1c
%endif
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
Requires:  python-alembic
Pierre-Yves Chibon bf7b1c
Requires:  python-arrow
Pierre-Yves Chibon d2eff7
Requires:  python-blinker
Pierre-Yves Chibon d2eff7
Requires:  python-chardet
Pierre-Yves Chibon bf7b1c
Requires:  python-docutils
Pierre-Yves Chibon bf7b1c
Requires:  python-flask
Pierre-Yves Chibon bf7b1c
Requires:  python-flask-wtf
Pierre-Yves Chibon bf7b1c
Requires:  python-markdown
Pierre-Yves Chibon bf7b1c
Requires:  python-psutil
Pierre-Yves Chibon bf7b1c
Requires:  python-pygit2 >= 0.20.1
Pierre-Yves Chibon bf7b1c
Requires:  python-pygments
Pierre-Yves Chibon bf7b1c
Requires:  python-fedora
Pierre-Yves Chibon bf7b1c
Requires:  python-openid
Pierre-Yves Chibon bf7b1c
Requires:  python-openid-cla
Pierre-Yves Chibon bf7b1c
Requires:  python-openid-teams
Pierre-Yves Chibon bf7b1c
Requires:  python-straight-plugin
Pierre-Yves Chibon bf7b1c
Requires:  python-wtforms
Pierre-Yves Chibon bf7b1c
Requires:  mod_wsgi
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon fcdeaa
# No dependency of the app per say, but required to make it working.
Pierre-Yves Chibon fcdeaa
Requires:  gitolite
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon bf7b1c
%description
Pierre-Yves Chibon fe5017
Pagure is a light-weight git-centered forge based on pygit2.
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon fe5017
Currently, Pagure offers a web-interface for git repositories, a ticket
Pierre-Yves Chibon fe5017
system and possibilities to create new projects, fork existing ones and
Pierre-Yves Chibon fe5017
create/merge pull-requests across or within projects.
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon fcdeaa
%package milters
Pierre-Yves Chibon fcdeaa
Summary: Milter to integrate pagure with emails
Pierre-Yves Chibon fcdeaa
BuildArch: noarch
Pierre-Yves Chibon fcdeaa
BuildRequires: python-pymilter
Pierre-Yves Chibon f46a0b
BuildRequires: systemd-devel
Pierre-Yves Chibon fcdeaa
Requires: python-pymilter
Pierre-Yves Chibon 3b8a1b
Requires: systemd
Pierre-Yves Chibon fcdeaa
# It would work with sendmail but we configure things (like the tempfile)
Pierre-Yves Chibon fcdeaa
# to work with postfix
Pierre-Yves Chibon fcdeaa
Requires:  postfix
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon fcdeaa
%description milters
Pierre-Yves Chibon fcdeaa
Milters (Mail filters) allowing the integration of pagure and emails.
Pierre-Yves Chibon fcdeaa
This is useful for example to allow commenting on a ticket by email.
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon bf7b1c
%prep
Pierre-Yves Chibon bf7b1c
%setup -q
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
%build
Pierre-Yves Chibon bf7b1c
%{__python} setup.py build
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
%install
Pierre-Yves Chibon bf7b1c
rm -rf $RPM_BUILD_ROOT
Pierre-Yves Chibon bf7b1c
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
# Install apache configuration file
Pierre-Yves Chibon bf7b1c
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/
Pierre-Yves Chibon fe5017
install -m 644 files/pagure.conf $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/pagure.conf
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
# Install configuration file
Pierre-Yves Chibon fe5017
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/pagure
Pierre-Yves Chibon fe5017
install -m 644 files/pagure.cfg.sample $RPM_BUILD_ROOT/%{_sysconfdir}/pagure/pagure.cfg
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
# Install WSGI file
Pierre-Yves Chibon fe5017
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/pagure
Pierre-Yves Chibon fe5017
install -m 644 files/pagure.wsgi $RPM_BUILD_ROOT/%{_datadir}/pagure/pagure.wsgi
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
# Install the createdb script
Pierre-Yves Chibon fe5017
install -m 644 createdb.py $RPM_BUILD_ROOT/%{_datadir}/pagure/pagure_createdb.py
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon fcdeaa
# Install the milter files
Pierre-Yves Chibon fcdeaa
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/pagure
Pierre-Yves Chibon fcdeaa
mkdir -p $RPM_BUILD_ROOT/%{_tmpfilesdir}
Pierre-Yves Chibon fcdeaa
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
Pierre-Yves Chibon fcdeaa
install -m 0644 milters/milter_tempfile.conf \
Pierre-Yves Chibon fcdeaa
    $RPM_BUILD_ROOT/%{_tmpfilesdir}/%{name}-milter.conf
Pierre-Yves Chibon fcdeaa
install -m 644 milters/pagure_milter.service \
Pierre-Yves Chibon fcdeaa
    $RPM_BUILD_ROOT/%{_unitdir}/pagure_milter.service
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon bf7b1c
%files
Pierre-Yves Chibon bf7b1c
%doc README.rst LICENSE
Pierre-Yves Chibon fe5017
%config(noreplace) %{_sysconfdir}/httpd/conf.d/pagure.conf
Pierre-Yves Chibon fe5017
%config(noreplace) %{_sysconfdir}/pagure/pagure.cfg
Pierre-Yves Chibon fe5017
%dir %{_sysconfdir}/pagure/
Pierre-Yves Chibon fe5017
%{_datadir}/pagure/
Pierre-Yves Chibon fe5017
%{python_sitelib}/pagure/
Pierre-Yves Chibon fe5017
%{python_sitelib}/pagure*.egg-info
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon bf7b1c
Pierre-Yves Chibon fcdeaa
%files milters
Pierre-Yves Chibon fcdeaa
%attr(755,postfix,postfix) %dir %{_localstatedir}/run/pagure
Pierre-Yves Chibon fcdeaa
%{_tmpfilesdir}/%{name}-milter.conf
Pierre-Yves Chibon fcdeaa
%{_unitdir}/pagure_milter.service
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon fcdeaa
Pierre-Yves Chibon bf7b1c
%changelog
Pierre-Yves Chibon 669904
* Thu Apr 02 2015 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.0-1.20150402</pingou@pingoured.fr>
Pierre-Yves Chibon 669904
- Cut a RPM for testing on Thu Apr 2nd 2015
Pierre-Yves Chibon 669904
Pierre-Yves Chibon bf7b1c
* Wed Oct 08 2014 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.0-1.20141008</pingou@pingoured.fr>
Pierre-Yves Chibon bf7b1c
- Initial packaging work for Fedora