blob: 2fd4e0497d8e9220055ca568c3c140a96c9ff074 (
plain)
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
|
%define name networking-vpp
%define version %(python setup.py --version)
%define release 1
%define _topdir %(pwd)/build/rpm
%define _builddir %(pwd)
%define _rpmdir %(pwd)/build/rpm
Summary: OpenStack Networking for VPP
Name: %{name}
Version: %{version}
Release: %{release}
License: Apache 2.0
Group: Development/Libraries
BuildArch: noarch
Requires: vpp
Vendor: OpenStack <openstack-dev@lists.openstack.org>
Packager: Feng Pan <fpan@redhat.com>
Url: http://www.openstack.org/
%description
ML2 Mechanism driver and small control plane for OpenVPP forwarder
%prep
cat << EOF > %{_builddir}/networking-vpp-agent.service
[Unit]
Description=Networking VPP ML2 Agent
[Service]
ExecStartPre=/usr/bin/systemctl is-active vpp
ExecStart=/usr/bin/vpp-agent --config-file /etc/neutron/plugins/ml2/vpp_agent.ini
Type=simple
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF
%install
/usr/bin/python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
mkdir -p %{buildroot}/usr/lib/systemd/system
install %{_builddir}/networking-vpp-agent.service %{buildroot}/usr/lib/systemd/system
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)
%attr(644,root,root) /usr/lib/systemd/system/networking-vpp-agent.service
|