mailman-api.spec
2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
%define name mailman-api
%define version 0.3rc3
%define unmangled_version 0.3rc3
Summary: REST API daemon to interact with Mailman 2
Name: %{name}
Version: %{version}
Source0: %{name}-%{unmangled_version}.tar.gz
License: LICENSE.txt
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Sergio Oliveira <sergio@tracy.com.br>
Requires: mailman, python >= 2.7, python-gunicorn >= 18.0, bottle >= 0.11.6
Url: http://pypi.python.org/pypi/mailman-api/
Release: 10
BuildRequires: python >= 2.7, python-devel >= 2.7, python-setuptools >= 0.9.8
BuildRequires: systemd-units
%description
mailman-api
===========
`mailman-api` provides a daemon that will listen to HTTP requests,
providing access to a REST API that can be used to interact with a
locally-installed Mailman instance.
Documentation
--------------
Documentation available at: http://mailman-api.readthedocs.org/
Licensing information
---------------------
Copyright (C) 2013-2014 Sergio Oliveira
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%{?systemd_requires}
%prep
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}
%build
PATH="/usr/bin:$PATH" python setup.py build
%install
python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
cp init/systemd/%{name}.service $RPM_BUILD_ROOT%{_unitdir}
%post
%service_add_post mailman-api.service
%preun
%systemd_preun mailman-api.service
%postun
%systemd_postun mailman-api.service
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%{_unitdir}/%{name}.service
%defattr(-,root,root)