Logoj0ke.net Open Build Service > Projects > server:routing > python-exabgp > exabgp.spec
Sign Up | Log In

File exabgp.spec of Package python-exabgp (Revision 9d4e7820f8bf055770b437844eb5d828)

Currently displaying revision 9d4e7820f8bf055770b437844eb5d828, show latest

x
 
1
#
2
# spec file for package exabgp
3
#
4
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
%if 0%{?suse_version} > 1210 || 0%{?rhel_version} > 6 || 0%{?centos_version} > 6 || 0%{?fedora_version} >= 20 || 0%{?el7}%{?fc20}%{?fc21}%{?fc22}
19
%bcond_without systemd
20
%else
21
%bcond_with    systemd
22
%endif
23
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
24
25
Name:           exabgp
26
Version:        3.4.20
27
Release:        0
28
License:        BSD-3-Clause
29
Summary:        The BGP swiss army knife of networking
30
Url:            https://github.com/Exa-Networks/exabgp
31
Group:          Productivity/Networking/Routing
32
Source:         https://github.com/Exa-Networks/exabgp/archive/%{version}.tar.gz
33
Source2:    exabgp-suse.init
34
Patch100:   exabgp-3.4.20_OrderedDict.patch
35
BuildRequires:  python-devel
36
BuildRequires:  python-ipaddr
37
BuildRequires:  python-setuptools
38
Requires:       python-ipaddr
39
Requires:       python-setuptools
40
Requires:       python
41
PreReq:         python-%{name}
42
%if %{with systemd}
43
BuildRequires:  pkgconfig(systemd)
44
%{?systemd_requires}
45
%else
46
%if 0%{?suse_version}
47
Requires(pre):  %insserv_prereq
48
%endif
49
%endif
50
%if 0%{?suse_version}
51
Requires(pre):  %fillup_prereq
52
%endif
53
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
54
#BuildArch:      noarch
55
56
%description
57
ExaBGP allows engineers to control their network from commodity servers. Think
58
of it as Software Defined Networking using BGP by transforming BGP messages
59
into friendly plain text or JSON.
60
61
It comes with an healthcheck application to help you monitor your daemons and
62
withdraw dead ones from the network during failures/maintenances. A full lab
63
explaining how to use it is available here.
64
65
Find what other users have done with it. Current documented use cases include
66
DDOS mitigation, network visualisation, anycast, service high availability.
67
68
69
%package -n python-%{name}
70
Group:          Development/Libraries/Python
71
#
72
Summary:        The BGP swiss army knife of networking
73
%description -n python-%{name}
74
ExaBGP allows engineers to control their network from commodity servers. Think
75
of it as Software Defined Networking using BGP by transforming BGP messages
76
into friendly plain text or JSON.
77
78
It comes with an healthcheck application to help you monitor your daemons and
79
withdraw dead ones from the network during failures/maintenances. A full lab
80
explaining how to use it is available here.
81
82
Find what other users have done with it. Current documented use cases include
83
DDOS mitigation, network visualisation, anycast, service high availability.
84
85
%prep
86
%setup -q
87
%patch100
88
89
%build
90
python setup.py build
91
92
%install
93
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
94
95
mv %{buildroot}%{_bindir} %{buildroot}%{_sbindir}
96
97
install -d %{buildroot}%{_sysconfdir}/
98
99
install -D -m 0644 doc/man/exabgp.1      %{buildroot}%{_mandir}/man1/exabgp.1
100
install -D -m 0644 doc/man/exabgp.conf.5 %{buildroot}%{_mandir}/man5/exabgp.conf.5
101
102
%if %{with systemd}
103
install -D -m 0644 etc/systemd/exabgp.service %{buildroot}%{_unitdir}/exabgp.service
104
ln -s service %{buildroot}%{_sbindir}/rc%{name}
105
%else
106
%if 0%{?suse_version}
107
install -D -m755 %{S:2} %{buildroot}%{_sysconfdir}/init.d/exabgp
108
%endif
109
%endif
110
111
%if %{with systemd}
112
%pre
113
%service_add_pre %{name}.service
114
115
%preun
116
%service_del_preun %{name}.service
117
118
%post
119
%service_add_post %{name}.service
120
121
%postun
122
%service_del_postun %{name}.service
123
%endif
124
125
%files
126
%defattr(-,root,root)
127
%dir %{_datadir}/%{name}
128
%config(noreplace) %{_datadir}/%{name}%{_sysconfdir}
129
%{_datadir}/%{name}/processes
130
%if %{with systemd}
131
%{_sbindir}/rc%{name}
132
%{_unitdir}/exabgp.service
133
%else
134
%if 0%{?suse_version}
135
%attr(755, root, root) %{_sysconfdir}/init.d/exabgp
136
%endif
137
%endif
138
%{_mandir}/man1/exabgp.1*
139
%{_mandir}/man5/exabgp.conf.5*
140
%doc CHANGELOG COPYRIGHT PEP8 PYPI.rst README.md
141
142
%files -n python-%{name}
143
%defattr(-,root,root)
144
%{_sbindir}/%{name}
145
%{python_sitelib}/%{name}-%{version}*/
146
%{python_sitelib}/%{name}/
147