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
10 Requires: security-manager-policy
14 BuildRequires: libattr-devel
15 BuildRequires: pkgconfig(libsmack)
16 BuildRequires: pkgconfig(libcap)
17 BuildRequires: pkgconfig(libsystemd-daemon)
18 BuildRequires: pkgconfig(libsystemd-journal)
19 BuildRequires: pkgconfig(libtzplatform-config)
20 BuildRequires: pkgconfig(sqlite3)
21 BuildRequires: pkgconfig(db-util)
22 BuildRequires: pkgconfig(cynara-admin)
23 BuildRequires: pkgconfig(cynara-client)
24 BuildRequires: boost-devel
28 Tizen security manager and utilities
30 %package -n libsecurity-manager-client
31 Summary: Security manager (client)
32 Group: Security/Libraries
33 Requires: security-manager = %{version}-%{release}
34 Requires(post): /sbin/ldconfig
35 Requires(postun): /sbin/ldconfig
37 %description -n libsecurity-manager-client
38 Tizen Security manager client library
40 %package -n libsecurity-manager-client-devel
41 Summary: Security manager (client-devel)
42 Group: Security/Development
43 Requires: libsecurity-manager-client = %{version}-%{release}
45 %description -n libsecurity-manager-client-devel
46 Development files needed for using the security manager client
49 Summary: Security manager policy
50 Group: Security/Access Control
51 Requires(post): security-manager = %{version}-%{release}
55 Set of security rules that constitute security policy in the system
63 %if 0%{?sec_build_binary_debug_enable}
64 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
65 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
66 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
69 export LDFLAGS+="-Wl,--rpath=%{_libdir}"
71 %cmake . -DVERSION=%{version} \
72 -DBIN_INSTALL_DIR=%{_bindir} \
73 -DDB_INSTALL_DIR=%{TZ_SYS_DB} \
74 -DSYSTEMD_INSTALL_DIR=%{_unitdir} \
75 -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:RELEASE} \
76 -DCMAKE_VERBOSE_MAKEFILE=ON
81 mkdir -p %{buildroot}%{_datadir}/license
82 cp LICENSE %{buildroot}%{_datadir}/license/%{name}
83 cp LICENSE %{buildroot}%{_datadir}/license/libsecurity-manager-client
84 mkdir -p %{buildroot}/%{TZ_SYS_SMACK}
85 cp app-rules-template.smack %{buildroot}/%{TZ_SYS_SMACK}
88 mkdir -p %{buildroot}/%{_unitdir}/sockets.target.wants
89 ln -s ../security-manager.socket %{buildroot}/%{_unitdir}/sockets.target.wants/security-manager.socket
96 systemctl daemon-reload
99 systemctl start security-manager.service
104 systemctl restart security-manager.service
106 chsmack -a System %{TZ_SYS_DB}/.security-manager.db
107 chsmack -a System %{TZ_SYS_DB}/.security-manager.db-journal
112 systemctl stop security-manager.service
119 systemctl daemon-reload
122 %post -n libsecurity-manager-client -p /sbin/ldconfig
124 %postun -n libsecurity-manager-client -p /sbin/ldconfig
127 %{_bindir}/security-manager-policy-reload
129 %files -n security-manager
130 %manifest security-manager.manifest
131 %defattr(-,root,root,-)
132 %attr(755,root,root) %{_bindir}/security-manager
133 %attr(755,root,root) %{_bindir}/security-manager-cmd
134 %attr(755,root,root) %{_sysconfdir}/gumd/useradd.d/50_security-manager-add.post
135 %attr(755,root,root) %{_sysconfdir}/gumd/userdel.d/50_security-manager-remove.pre
137 %{_libdir}/libsecurity-manager-commons.so.*
138 %attr(-,root,root) %{_unitdir}/security-manager.*
139 %attr(-,root,root) %{_unitdir}/sockets.target.wants/security-manager.*
140 %attr(-,root,root) %{TZ_SYS_SMACK}/app-rules-template.smack
141 %config(noreplace) %attr(0600,root,root) %{TZ_SYS_DB}/.security-manager.db
142 %config(noreplace) %attr(0600,root,root) %{TZ_SYS_DB}/.security-manager.db-journal
143 %{_datadir}/license/%{name}
145 %files -n libsecurity-manager-client
146 %manifest libsecurity-manager-client.manifest
147 %defattr(-,root,root,-)
148 %{_libdir}/libsecurity-manager-client.so.*
149 %{_datadir}/license/libsecurity-manager-client
151 %files -n libsecurity-manager-client-devel
152 %manifest %{name}.manifest
153 %defattr(-,root,root,-)
154 %{_libdir}/libsecurity-manager-client.so
155 %{_libdir}/libsecurity-manager-commons.so
156 %{_includedir}/security-manager/security-manager.h
157 %{_libdir}/pkgconfig/security-manager.pc
159 %files -n security-manager-policy
160 %manifest %{name}.manifest
161 %{_datadir}/security-manager/policy
162 %attr(755,root,root) %{_bindir}/security-manager-policy-reload