Migrates master to use direct upstream
[apex.git] / build / rpm_specs / networking-vpp.spec
1 %define release 1
2
3 Summary:   OpenStack Networking for VPP
4 Name:      python-networking-vpp
5 Version:   18.04
6 Release:   %{release}%{?git}%{?dist}
7
8 License:   Apache 2.0
9 Group:     Applications/Internet
10 Source0:   python-networking-vpp.tar.gz
11 Url:       https://github.com/openstack/networking-vpp/
12
13 BuildArch: noarch
14 AutoReq:   no
15 Requires:  vpp python-jwt
16 Vendor:    OpenStack <openstack-dev@lists.openstack.org>
17 Packager:  Feng Pan <fpan@redhat.com>
18
19 %description
20 ML2 Mechanism driver and small control plane for OpenVPP forwarder
21
22 %prep
23 %setup -q
24 cat << EOF > %{_builddir}/neutron-vpp-agent.service
25 [Unit]
26 Description=Networking VPP ML2 Agent
27
28 [Service]
29 ExecStartPre=/usr/bin/systemctl is-active vpp
30 ExecStart=/usr/bin/vpp-agent --config-file /etc/neutron/plugins/ml2/vpp_agent.ini --log-file /var/log/neutron/vpp-agent.log
31 Type=simple
32 Restart=on-failure
33 RestartSec=5s
34
35 [Install]
36 WantedBy=multi-user.target
37
38 EOF
39
40 %preun
41 %systemd_preun neutron-vpp-agent.service
42
43 %postun
44 %systemd_postun
45 rm -rf %{python2_sitelib}/networking_vpp*
46
47 %install
48 python setup.py install -O1 --root=%{buildroot} --record=INSTALLED_FILES
49 mkdir -p %{buildroot}%{_libdir}/systemd/system
50 install %{_builddir}/neutron-vpp-agent.service %{buildroot}%{_unitdir}
51
52 %clean
53 rm -rf %{buildroot}
54
55 %files -f INSTALLED_FILES
56 %defattr(-,root,root)
57 %attr(644,root,root) %{_unitdir}/neutron-vpp-agent.service
58