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)
27 BuildRequires: pkgconfig(cynara-client)
28 BuildRequires: pkgconfig(cynara-creds-gdbus)
29 BuildRequires: pkgconfig(cynara-session)
32 BuildRequires: python-xml
33 BuildRequires: hash-signer
35 Requires(post): /sbin/ldconfig
36 Requires(postun): /sbin/ldconfig
37 Requires: %{name}-common = %{version}-%{release}
38 Requires: security-config
46 %manifest %{name}.manifest
47 %defattr(-,root,root,-)
48 %{_libdir}/lib%{name}.so.*
49 %{_datadir}/license/%{name}
60 ################################################################################
61 # package : smartcard-service-devel #
62 ################################################################################
64 Summary: smartcard service devel
65 Group: Development/Libraries
66 Requires: %{name} = %{version}-%{release}
74 %manifest %{name}-devel.manifest
75 %defattr(-,root,root,-)
76 %{_includedir}/%{name}/*
77 %{_libdir}/lib%{name}.so
78 %{_libdir}/pkgconfig/%{name}.pc
81 ################################################################################
82 # package : smartcard-service-common #
83 ################################################################################
85 Summary: common smartcard service
86 Group: Development/Libraries
90 common smartcard service.
94 %manifest %{name}-common.manifest
95 %defattr(-,root,root,-)
96 %{_libdir}/lib%{name}-common.so.*
97 %{_datadir}/license/%{name}-common
100 ################################################################################
101 # package : smartcard-service-common-devel #
102 ################################################################################
103 %package common-devel
104 Summary: common smartcard service
105 Group: Development/Libraries
106 Requires: %{name}-common = %{version}-%{release}
109 %description common-devel
110 common smartcard service.
114 %manifest %{name}-common-devel.manifest
115 %defattr(-,root,root,-)
116 %{_includedir}/%{name}-common/*
117 %{_libdir}/lib%{name}-common.so
118 %{_libdir}/pkgconfig/%{name}-common.pc
121 ################################################################################
122 # package : smartcard-service-server #
123 ################################################################################
124 %global bindir /usr/apps/%{name}-server
127 Summary: server smartcard service
128 Group: Development/Libraries
129 Requires: %{name}-common = %{version}-%{release}
133 smartcard service server
137 /usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{bindir}
138 %if 0%{!?use_autostart:1}
139 ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc3.d/S79%{name}-server
140 ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc5.d/S79%{name}-server
142 ln -sf /usr/apps/%{name}-server/bin/smartcard-daemon /usr/bin/smartcard-daemon
143 %if 0%{?test_client:1}
144 ln -sf /usr/apps/%{name}-server/bin/smartcard-test-client /usr/bin/smartcard-test-client
149 %if 0%{!?use_autostart:1}
150 rm -f /etc/rc.d/rc3.d/S79%{name}-server
151 rm -f /etc/rc.d/rc5.d/S79%{name}-server
153 rm -f /usr/bin/smartcard-daemon
157 %manifest %{name}-server.manifest
158 %defattr(-,root,root,-)
159 %{bindir}/bin/smartcard-daemon
160 %if 0%{?test_client:1}
161 %{bindir}/bin/smartcard-test-client
163 %if 0%{?use_autostart:1}
164 %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service
166 %{_sysconfdir}/init.d/%{name}-server
168 %{bindir}/%{name}-server
169 %{bindir}/author-signature.xml
170 %{bindir}/signature1.xml
171 /etc/dbus-1/system.d/org.tizen.SmartcardService.conf
173 ################################################################################
175 ################################################################################
181 %if 0%{?sec_build_binary_debug_enable}
182 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
183 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
184 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
186 export LDFLAGS+="-Wl,-Bsymbolic-functions"
187 mkdir obj-arm-limux-qnueabi
188 cd obj-arm-limux-qnueabi
189 %cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client}
192 cd obj-arm-limux-qnueabi
194 %if 0%{!?use_autostart:1}
195 %__mkdir -p %{buildroot}/etc/init.d/
196 %__mkdir -p %{buildroot}/etc/rc.d/rc3.d/
197 %__mkdir -p %{buildroot}/etc/rc.d/rc5.d/
198 %__cp -af %SOURCE1 %{buildroot}/etc/init.d/%{name}-server
199 chmod 755 %{buildroot}/etc/init.d/%{name}-server
201 mkdir -p %{buildroot}/usr/share/license
202 mkdir -p %{buildroot}/etc/dbus-1/system.d/
203 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name} %{buildroot}/usr/share/license/
204 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name}-common %{buildroot}/usr/share/license/
205 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name}-server %{buildroot}%{bindir}
206 cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf %{buildroot}/etc/dbus-1/system.d/
209 %define tizen_sign_base %{bindir}
210 %define tizen_sign_level platform
211 %define tizen_author_sign 1
212 %define tizen_dist_sign 1