Fix rpm packaging following review 20926
[src/app-framework-binder.git] / conf.d / packaging / rpm / agl-app-framework-binder.spec
1 #
2 # spec file for package app-framework-binder
3 #
4
5 %define _prefix /opt/AGL
6 %define __cmake cmake
7
8 Name:           agl-app-framework-binder
9 # WARNING {name} is not used for tar file name in source nor for setup
10 #         Check hard coded values required to match git directory naming
11 Version:        2.0
12 Release:        0
13 License:        Apache-2.0
14 Summary:        AGL app-framework-binder
15 Group:          Development/Libraries/C and C++
16 Url:            https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-binder
17 Source:         app-framework-binder-%{version}.tar.gz
18 #BuildRequires:  gdb
19 BuildRequires:  pkgconfig(libmicrohttpd) >= 0.9.60
20 BuildRequires:  make
21 BuildRequires:  cmake
22 BuildRequires:  pkgconfig(libsystemd) >= 222
23 BuildRequires:  pkgconfig(openssl)
24 BuildRequires:  pkgconfig(uuid)
25 BuildRequires:  libgcrypt-devel
26 BuildRequires:  pkgconfig(gnutls)
27 BuildRequires:  pkgconfig(json-c)
28 BuildRequires:  file-devel
29 BuildRequires:  gcc-c++
30
31 %if 0%{?suse_version}
32 Requires:       libmicrohttpd12 >= 0.9.60
33 %endif
34
35 %if 0%{?fedora_version}
36 Requires:       libmicrohttpd >= 0.9.60
37 %endif
38
39 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
40
41 %description
42 Provides a test agl binder service which can be used to test agl bindings on Linux PC
43 This service is evolving permanently and is only designed as a helper for developper.
44
45 %package devel
46 Group:          Development/Libraries/C and C++
47 Requires:       %{name} = %{version}
48 Provides:       pkgconfig(%{name}) = %{version}
49 Summary:        AGL app-framework-binder-devel
50 %description devel
51 Provides a test agl binder service which can be used to test agl bindings on Linux PC
52 This service is evolving permanently and is only designed as a helper for developper.
53
54
55 %prep
56 %setup -q -n app-framework-binder-%{version}
57
58 %build
59 export PKG_CONFIG_PATH=%{_libdir}/pkgconfig
60 %cmake  -DAGL_DEVEL=1 -DINCLUDE_MONITORING=ON"
61 %__make %{?_smp_mflags}
62
63
64 %install
65 [ -d build ] && cd build
66 %make_install
67
68 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
69 cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
70 #----------  AGL %%{name} options Start ---------"
71 # Object: AGL cmake option for  binder/bindings
72 export LD_LIBRARY_PATH=%{_libdir}:\${LD_LIBRARY_PATH}
73 export LIBRARY_PATH=%{_libdir}:\${LIBRARY_PATH}
74 export PKG_CONFIG_PATH=%{_libdir}/pkgconfig:\${PKG_CONFIG_PATH}
75 export PATH=%{_bindir}:\$PATH
76 #----------  AGL options End ---------
77 EOF
78
79 %post
80
81 %postun
82
83 %files
84 %defattr(-,root,root)
85 %dir %{_bindir}
86 %{_bindir}/afb-client-demo
87 %{_bindir}/afb-daemon
88 %{_bindir}/afb-genskel
89 %{_bindir}/afb-exprefs
90 %{_bindir}/afb-json2c
91
92 %dir %{_libdir}
93 %dir %{_libdir}/afb
94 %{_libdir}/libafbwsc.so.1
95 %{_libdir}/libafbwsc.so.1.1
96
97 #app-framework-binder demo
98 %{_libdir}/afb/*.so
99 %config(noreplace) %{_sysconfdir}/profile.d/%{name}.sh
100
101 #app-framework-binder monitoring
102 %dir %{_libdir}/afb/monitoring
103 %{_libdir}/afb/monitoring/*
104
105 %files devel
106 %defattr(-,root,root)
107 %dir %{_prefix}
108 %{_libdir}/libafbwsc.so
109 %dir %{_includedir}
110 %dir %{_includedir}/afb
111 %{_includedir}/afb/*
112 %dir %{_libdir}/pkgconfig
113 %{_libdir}/pkgconfig/*.pc
114
115 %changelog
116 * Wed Sep 27 2017 Dominig
117 - move to git repo
118 * Tue Aug 01 2017 Ronan
119 - initial creation