Add CaaS Logging REST API and CLI plugins
[ta/caas-logging.git] / SPECS / caas-logging.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
15 Name:           caas-logging
16 Version:        %{_version}
17 Release:        1%{?dist}
18 Summary:        CaaS Logging restful API and CLI plugins
19 License:        %{_platform_license}
20
21 Vendor:         %{_platform_vendor}
22 Source0:        %{name}-%{version}.tar.gz
23 BuildArch:      noarch
24 Requires:       python-flask, python2-flask-restful, python2-configparser
25 BuildRequires:  python python-setuptools
26
27 %description
28 This RPM contains CaaS Logging components (restful API and CLI plugins) for Akraino REC
29
30 %prep
31 %autosetup
32
33 %install
34 mkdir -p %{buildroot}%{_python_site_packages_path}/caas_logging
35
36 mkdir -p %{buildroot}%{_python_site_packages_path}/yarf/handlers/caas_logging
37 rsync -ra src/caas_logging/rest-plugin/* %{buildroot}/%{_python_site_packages_path}/yarf/handlers/caas_logging
38
39 mkdir -p %{buildroot}/opt/cmframework/activators/
40 rsync -ra src/caas_logging/activator/* %{buildroot}/opt/cmframework/activators
41
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 %files
45 %defattr(0755,root,root)
46 %{_python_site_packages_path}/caas_logging*
47 %{_python_site_packages_path}/yarf/handlers/caas_logging*
48 /opt/cmframework/activators/caasactivator.py*
49
50 %pre
51
52 %post
53
54 %preun
55
56 %postun
57
58 %clean
59 rm -rf %{buildroot}