1 # FOR COMMENTING DEFINITION, MUST USE %% instead of %
2 %global use_autostart "-DUSE_AUTOSTART=1"
3 #%%global test_client "-DTEST_CLIENT=1"
5 ################################################################################
6 # package : smartcard-service #
7 ################################################################################
8 Name: smartcard-service
9 Summary: Smartcard Service FW
14 Source0: %{name}-%{version}.tar.gz
15 %if 0%{!?use_autostart:1}
16 Source1: %{name}-server.init
19 BuildRequires: pkgconfig(glib-2.0)
20 BuildRequires: pkgconfig(gio-unix-2.0)
21 BuildRequires: pkgconfig(dlog)
22 BuildRequires: pkgconfig(aul)
23 BuildRequires: pkgconfig(libssl)
24 BuildRequires: pkgconfig(libcrypto)
25 BuildRequires: pkgconfig(pkgmgr)
26 BuildRequires: pkgconfig(pkgmgr-info)
28 BuildRequires: python-xml
29 BuildRequires: hash-signer
31 Requires(post): /sbin/ldconfig
32 Requires(postun): /sbin/ldconfig
33 Requires: %{name}-common = %{version}-%{release}
41 %manifest %{name}.manifest
42 %defattr(-,root,root,-)
43 %{_libdir}/lib%{name}.so.*
44 %{_datadir}/license/%{name}
55 ################################################################################
56 # package : smartcard-service-devel #
57 ################################################################################
59 Summary: smartcard service devel
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
69 %manifest %{name}-devel.manifest
70 %defattr(-,root,root,-)
71 %{_includedir}/%{name}/*
72 %{_libdir}/lib%{name}.so
73 %{_libdir}/pkgconfig/%{name}.pc
76 ################################################################################
77 # package : smartcard-service-common #
78 ################################################################################
80 Summary: common smartcard service
81 Group: Development/Libraries
85 common smartcard service.
89 %manifest %{name}-common.manifest
90 %defattr(-,root,root,-)
91 %{_libdir}/lib%{name}-common.so.*
92 %{_datadir}/license/%{name}-common
95 ################################################################################
96 # package : smartcard-service-common-devel #
97 ################################################################################
99 Summary: common smartcard service
100 Group: Development/Libraries
101 Requires: %{name}-common = %{version}-%{release}
104 %description common-devel
105 common smartcard service.
109 %manifest %{name}-common-devel.manifest
110 %defattr(-,root,root,-)
111 %{_includedir}/%{name}-common/*
112 %{_libdir}/lib%{name}-common.so
113 %{_libdir}/pkgconfig/%{name}-common.pc
116 ################################################################################
117 # package : smartcard-service-server #
118 ################################################################################
119 %global bindir /usr/apps/%{name}-server
122 Summary: server smartcard service
123 Group: Development/Libraries
124 Requires: %{name}-common = %{version}-%{release}
128 smartcard service server
132 /usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{bindir}
133 %if 0%{!?use_autostart:1}
134 ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc3.d/S79%{name}-server
135 ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc5.d/S79%{name}-server
137 ln -sf /usr/apps/%{name}-server/bin/smartcard-daemon /usr/bin/smartcard-daemon
138 %if 0%{?test_client:1}
139 ln -sf /usr/apps/%{name}-server/bin/smartcard-test-client /usr/bin/smartcard-test-client
144 %if 0%{!?use_autostart:1}
145 rm -f /etc/rc.d/rc3.d/S79%{name}-server
146 rm -f /etc/rc.d/rc5.d/S79%{name}-server
148 rm -f /usr/bin/smartcard-daemon
152 %manifest %{name}-server.manifest
153 %defattr(-,root,root,-)
154 %{bindir}/bin/smartcard-daemon
155 %{_datadir}/packages/%{name}-server.xml
156 %if 0%{?test_client:1}
157 %{bindir}/bin/smartcard-test-client
159 %if 0%{?use_autostart:1}
160 %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service
162 %{_sysconfdir}/init.d/%{name}-server
164 %{bindir}/%{name}-server
165 %{bindir}/author-signature.xml
166 %{bindir}/signature1.xml
169 ################################################################################
171 ################################################################################
177 %if 0%{?sec_build_binary_debug_enable}
178 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
179 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
180 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
182 export LDFLAGS+="-Wl,-Bsymbolic-functions"
183 mkdir obj-arm-limux-qnueabi
184 cd obj-arm-limux-qnueabi
185 %cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client}
188 cd obj-arm-limux-qnueabi
190 %if 0%{!?use_autostart:1}
191 %__mkdir -p %{buildroot}/etc/init.d/
192 %__mkdir -p %{buildroot}/etc/rc.d/rc3.d/
193 %__mkdir -p %{buildroot}/etc/rc.d/rc5.d/
194 %__cp -af %SOURCE1 %{buildroot}/etc/init.d/%{name}-server
195 chmod 755 %{buildroot}/etc/init.d/%{name}-server
197 mkdir -p %{buildroot}/usr/share/license
198 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name} %{buildroot}/usr/share/license/
199 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name}-common %{buildroot}/usr/share/license/
200 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name}-server %{buildroot}%{bindir}
203 %define tizen_sign_base %{bindir}
204 %define tizen_sign_level platform
205 %define tizen_author_sign 1
206 %define tizen_dist_sign 1