Reordering of sample and tutorial bindings
[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 %package samples
55 Requires:       %{name} = %{version}
56 Summary:        AGL app-framework-binder-samples
57 %description samples
58 Provides sample bindings for testing AGL framework binder
59
60
61 %prep
62 %setup -q -n app-framework-binder-%{version}
63
64 %build
65 export PKG_CONFIG_PATH=%{_libdir}/pkgconfig
66 %cmake  -DAGL_DEVEL=1 -DINCLUDE_MONITORING=ON
67 %__make %{?_smp_mflags}
68
69
70 %install
71 [ -d build ] && cd build
72 %make_install
73
74 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
75 cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
76 #----------  AGL %%{name} options Start ---------"
77 # Object: AGL cmake option for  binder/bindings
78 export LD_LIBRARY_PATH=%{_libdir}:\${LD_LIBRARY_PATH}
79 export LIBRARY_PATH=%{_libdir}:\${LIBRARY_PATH}
80 export PKG_CONFIG_PATH=%{_libdir}/pkgconfig:\${PKG_CONFIG_PATH}
81 export PATH=%{_bindir}:\$PATH
82 #----------  AGL options End ---------
83 EOF
84
85 %post
86
87 %postun
88
89 %files
90 %defattr(-,root,root)
91 %dir %{_bindir}
92 %{_bindir}/afb-client-demo
93 %{_bindir}/afb-daemon
94 %{_bindir}/afb-genskel
95 %{_bindir}/afb-exprefs
96 %{_bindir}/afb-json2c
97
98 %dir %{_libdir}
99 %dir %{_libdir}/afb
100 %{_libdir}/libafbwsc.so.1
101 %{_libdir}/libafbwsc.so.1.1
102
103 #app-framework-binder demo
104 %{_libdir}/afb/*.so
105 %config(noreplace) %{_sysconfdir}/profile.d/%{name}.sh
106
107 #app-framework-binder monitoring
108 %dir %{_libdir}/afb/monitoring
109 %{_libdir}/afb/monitoring/*
110
111 %files devel
112 %defattr(-,root,root)
113 %dir %{_prefix}
114 %{_libdir}/libafbwsc.so
115 %dir %{_includedir}
116 %dir %{_includedir}/afb
117 %{_includedir}/afb/*
118 %dir %{_libdir}/pkgconfig
119 %{_libdir}/pkgconfig/*.pc
120
121 %files samples
122 %defattr(-,root,root)
123 %dir %{_datadir}
124 %dir %{_datadir}/af-binder
125 %{_datadir}/af-binder/*
126
127 %changelog
128 * Wed Sep 27 2017 Dominig
129 - move to git repo
130 * Tue Aug 01 2017 Ronan
131 - initial creation