Initial commit
[ta/distributed-state-server.git] / distributed-state-server.spec
1 # Copyright 2019 Nokia
2   
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 Name:           distributed-state-server
15 Version:        %{_version}
16 Release:        1%{?dist}
17 Summary:        Distributed State Server
18 Group:          %{_platform_group}
19 License:        %{_platform_license}
20 Source0:        %{name}-%{version}.tar.gz
21 Vendor:         %{_platform_vendor}
22
23 BuildArch:      noarch
24
25 BuildRequires: python
26 BuildRequires: python-setuptools
27
28 Requires: etcd
29 Requires: python2-python-etcd
30 Requires: python-dns
31
32
33 %description
34 This RPM contains source code for the distributed state server and its plugins
35
36 %prep
37 %autosetup
38
39 %install
40 mkdir -p %{buildroot}/%{_python_site_packages_path}/dss
41 mkdir -p %{buildroot}/opt/dss-server/plugins
42 cd src && python setup.py install --root %{buildroot} --no-compile --install-purelib %{_python_site_packages_path} --install-scripts %{_platform_bin_path} && cd -
43
44 cp plugins/*.py %{buildroot}/opt/dss-server/plugins/
45
46
47 %files
48 %{_python_site_packages_path}/dss*
49 %{_python_site_packages_path}/dss*
50 %{_platform_bin_path}/dsscli
51 %{_platform_bin_path}/dss
52 /opt/dss-server/plugins/*.py*
53
54 %pre
55
56 %post
57 echo "distributed-state-server succesfully installed"
58
59
60 %preun
61
62 %postun
63
64 %clean
65 rm -rf %{buildroot}