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(pkgmgr)
25 BuildRequires: pkgconfig(pkgmgr-info)
27 BuildRequires: python-xml
28 BuildRequires: hash-signer
30 Requires(post): /sbin/ldconfig
31 Requires(postun): /sbin/ldconfig
32 Requires: %{name}-common = %{version}-%{release}
40 %manifest %{name}.manifest
41 %defattr(-,root,root,-)
42 %{_libdir}/lib%{name}.so.*
43 %{_datadir}/license/%{name}
54 ################################################################################
55 # package : smartcard-service-devel #
56 ################################################################################
58 Summary: smartcard service devel
59 Group: Development/Libraries
60 Requires: %{name} = %{version}-%{release}
68 %manifest %{name}-devel.manifest
69 %defattr(-,root,root,-)
70 %{_includedir}/%{name}/*
71 %{_libdir}/lib%{name}.so
72 %{_libdir}/pkgconfig/%{name}.pc
75 ################################################################################
76 # package : smartcard-service-common #
77 ################################################################################
79 Summary: common smartcard service
80 Group: Development/Libraries
84 common smartcard service.
88 %manifest %{name}-common.manifest
89 %defattr(-,root,root,-)
90 %{_libdir}/lib%{name}-common.so.*
91 %{_datadir}/license/%{name}-common
94 ################################################################################
95 # package : smartcard-service-common-devel #
96 ################################################################################
98 Summary: common smartcard service
99 Group: Development/Libraries
100 Requires: %{name}-common = %{version}-%{release}
103 %description common-devel
104 common smartcard service.
108 %manifest %{name}-common-devel.manifest
109 %defattr(-,root,root,-)
110 %{_includedir}/%{name}-common/*
111 %{_libdir}/lib%{name}-common.so
112 %{_libdir}/pkgconfig/%{name}-common.pc
115 ################################################################################
116 # package : smartcard-service-server #
117 ################################################################################
118 %global bindir /usr/apps/%{name}-server
121 Summary: server smartcard service
122 Group: Development/Libraries
123 Requires: %{name}-common = %{version}-%{release}
127 smartcard service server
131 /usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{bindir}
132 %if 0%{!?use_autostart:1}
133 ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc3.d/S79%{name}-server
134 ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc5.d/S79%{name}-server
136 ln -sf /usr/apps/%{name}-server/bin/smartcard-daemon /usr/bin/smartcard-daemon
137 %if 0%{?test_client:1}
138 ln -sf /usr/apps/%{name}-server/bin/smartcard-test-client /usr/bin/smartcard-test-client
143 %if 0%{!?use_autostart:1}
144 rm -f /etc/rc.d/rc3.d/S79%{name}-server
145 rm -f /etc/rc.d/rc5.d/S79%{name}-server
147 rm -f /usr/bin/smartcard-daemon
151 %manifest %{name}-server.manifest
152 %defattr(-,root,root,-)
153 %{bindir}/bin/smartcard-daemon
154 %if 0%{?test_client:1}
155 %{bindir}/bin/smartcard-test-client
157 %if 0%{?use_autostart:1}
158 %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service
160 %{_sysconfdir}/init.d/%{name}-server
162 %{bindir}/%{name}-server
163 %{bindir}/author-signature.xml
164 %{bindir}/signature1.xml
167 ################################################################################
169 ################################################################################
175 %if 0%{?sec_build_binary_debug_enable}
176 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
177 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
178 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
180 export LDFLAGS+="-Wl,-Bsymbolic-functions"
181 mkdir obj-arm-limux-qnueabi
182 cd obj-arm-limux-qnueabi
183 %cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client}
184 #make %{?jobs:-j%jobs}
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