2 Summary: Security manager and utilities
5 Group: Security/Service
7 Source0: %{name}-%{version}.tar.gz
8 Source1: security-manager.manifest
9 Source3: libsecurity-manager-client.manifest
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: libattr-devel
15 BuildRequires: libcap-devel
16 BuildRequires: pkgconfig(libsmack)
17 BuildRequires: pkgconfig(libprivilege-control)
18 BuildRequires: pkgconfig(libsystemd-daemon)
19 BuildRequires: pkgconfig(libtzplatform-config)
20 BuildRequires: pkgconfig(sqlite3)
21 BuildRequires: pkgconfig(db-util)
22 BuildRequires: boost-devel
26 Tizen security manager and utilities
28 %package -n libsecurity-manager-client
29 Summary: Security manager (client)
30 Group: Security/Libraries
31 Requires: security-manager = %{version}-%{release}
32 Requires(post): /sbin/ldconfig
33 Requires(postun): /sbin/ldconfig
35 %description -n libsecurity-manager-client
36 Tizen Security manager client library
38 %package -n libsecurity-manager-client-devel
39 Summary: Security manager (client-devel)
40 Group: Security/Development
41 Requires: libsecurity-manager-client = %{version}-%{release}
43 %description -n libsecurity-manager-client-devel
44 Development files needed for using the security manager client
52 %if 0%{?sec_build_binary_debug_enable}
53 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
54 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
55 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
58 export LDFLAGS+="-Wl,--rpath=%{_libdir}"
60 %cmake . -DVERSION=%{version} \
61 -DBIN_INSTALL_DIR=%{_bindir} \
62 -DDB_INSTALL_DIR=%{TZ_SYS_DB} \
63 -DSYSTEMD_INSTALL_DIR=%{_unitdir} \
64 -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:RELEASE} \
65 -DCMAKE_VERBOSE_MAKEFILE=ON
70 mkdir -p %{buildroot}/usr/share/license
71 cp LICENSE %{buildroot}/usr/share/license/%{name}
72 cp LICENSE %{buildroot}/usr/share/license/libsecurity-manager-client
73 mkdir -p %{buildroot}/%{TZ_SYS_SMACK}
74 cp app-rules-template.smack %{buildroot}/%{TZ_SYS_SMACK}
77 mkdir -p %{buildroot}/%{_unitdir}/multi-user.target.wants
78 mkdir -p %{buildroot}/%{_unitdir}/sockets.target.wants
79 ln -s ../security-manager.service %{buildroot}/%{_unitdir}/multi-user.target.wants/security-manager.service
80 ln -s ../security-manager-installer.socket %{buildroot}/%{_unitdir}/sockets.target.wants/security-manager-installer.socket
86 systemctl daemon-reload
89 systemctl start security-manager.service
94 systemctl restart security-manager.service
96 chsmack -a System %{TZ_SYS_DB}/.security-manager.db
97 chsmack -a System %{TZ_SYS_DB}/.security-manager.db-journal
102 systemctl stop security-manager.service
108 systemctl daemon-reload
111 %post -n libsecurity-manager-client -p /sbin/ldconfig
113 %postun -n libsecurity-manager-client -p /sbin/ldconfig
115 %files -n security-manager
116 %manifest security-manager.manifest
117 %defattr(-,root,root,-)
118 %attr(755,root,root) %{_bindir}/security-manager
119 %{_libdir}/libsecurity-manager-commons.so.*
120 %attr(-,root,root) %{_unitdir}/multi-user.target.wants/security-manager.service
121 %attr(-,root,root) %{_unitdir}/security-manager.service
122 %attr(-,root,root) %{_unitdir}/security-manager.target
123 %attr(-,root,root) %{_unitdir}/sockets.target.wants/security-manager-installer.socket
124 %attr(-,root,root) %{_unitdir}/security-manager-installer.socket
125 %attr(-,root,root) %{TZ_SYS_SMACK}/app-rules-template.smack
126 %config(noreplace) %attr(0600,root,root) %{TZ_SYS_DB}/.security-manager.db
127 %config(noreplace) %attr(0600,root,root) %{TZ_SYS_DB}/.security-manager.db-journal
128 %{_datadir}/license/%{name}
130 %files -n libsecurity-manager-client
131 %manifest libsecurity-manager-client.manifest
132 %defattr(-,root,root,-)
133 %{_libdir}/libsecurity-manager-client.so.*
134 %{_datadir}/license/libsecurity-manager-client
136 %files -n libsecurity-manager-client-devel
137 %manifest %{name}.manifest
138 %defattr(-,root,root,-)
139 %{_libdir}/libsecurity-manager-client.so
140 %{_libdir}/libsecurity-manager-commons.so
141 %{_includedir}/security-manager/security-manager.h
142 %{_libdir}/pkgconfig/security-manager.pc