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}
45 %manifest %{name}.manifest
46 %defattr(-,root,root,-)
47 %{_libdir}/lib%{name}.so.*
48 %{_datadir}/license/%{name}
59 ################################################################################
60 # package : smartcard-service-devel #
61 ################################################################################
63 Summary: smartcard service devel
64 Group: Development/Libraries
65 Requires: %{name} = %{version}-%{release}
73 %manifest %{name}-devel.manifest
74 %defattr(-,root,root,-)
75 %{_includedir}/%{name}/*
76 %{_libdir}/lib%{name}.so
77 %{_libdir}/pkgconfig/%{name}.pc
80 ################################################################################
81 # package : smartcard-service-common #
82 ################################################################################
84 Summary: common smartcard service
85 Group: Development/Libraries
89 common smartcard service.
93 %manifest %{name}-common.manifest
94 %defattr(-,root,root,-)
95 %{_libdir}/lib%{name}-common.so.*
96 %{_datadir}/license/%{name}-common
99 ################################################################################
100 # package : smartcard-service-common-devel #
101 ################################################################################
102 %package common-devel
103 Summary: common smartcard service
104 Group: Development/Libraries
105 Requires: %{name}-common = %{version}-%{release}
108 %description common-devel
109 common smartcard service.
113 %manifest %{name}-common-devel.manifest
114 %defattr(-,root,root,-)
115 %{_includedir}/%{name}-common/*
116 %{_libdir}/lib%{name}-common.so
117 %{_libdir}/pkgconfig/%{name}-common.pc
120 ################################################################################
121 # package : smartcard-service-server #
122 ################################################################################
123 %global bindir /usr/apps/%{name}-server
126 Summary: server smartcard service
127 Group: Development/Libraries
128 Requires: %{name}-common = %{version}-%{release}
132 smartcard service server
136 /usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{bindir}
137 %if 0%{!?use_autostart:1}
138 ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc3.d/S79%{name}-server
139 ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc5.d/S79%{name}-server
141 ln -sf /usr/apps/%{name}-server/bin/smartcard-daemon /usr/bin/smartcard-daemon
142 %if 0%{?test_client:1}
143 ln -sf /usr/apps/%{name}-server/bin/smartcard-test-client /usr/bin/smartcard-test-client
148 %if 0%{!?use_autostart:1}
149 rm -f /etc/rc.d/rc3.d/S79%{name}-server
150 rm -f /etc/rc.d/rc5.d/S79%{name}-server
152 rm -f /usr/bin/smartcard-daemon
156 %manifest %{name}-server.manifest
157 %defattr(-,root,root,-)
158 %{bindir}/bin/smartcard-daemon
159 %if 0%{?test_client:1}
160 %{bindir}/bin/smartcard-test-client
162 %if 0%{?use_autostart:1}
163 %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service
165 %{_sysconfdir}/init.d/%{name}-server
167 %{bindir}/%{name}-server
168 %{bindir}/author-signature.xml
169 %{bindir}/signature1.xml
170 /etc/dbus-1/system.d/org.tizen.SmartcardService.conf
172 ################################################################################
174 ################################################################################
180 %if 0%{?sec_build_binary_debug_enable}
181 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
182 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
183 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
185 export LDFLAGS+="-Wl,-Bsymbolic-functions"
186 mkdir obj-arm-limux-qnueabi
187 cd obj-arm-limux-qnueabi
188 %cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client}
191 cd obj-arm-limux-qnueabi
193 %if 0%{!?use_autostart:1}
194 %__mkdir -p %{buildroot}/etc/init.d/
195 %__mkdir -p %{buildroot}/etc/rc.d/rc3.d/
196 %__mkdir -p %{buildroot}/etc/rc.d/rc5.d/
197 %__cp -af %SOURCE1 %{buildroot}/etc/init.d/%{name}-server
198 chmod 755 %{buildroot}/etc/init.d/%{name}-server
200 mkdir -p %{buildroot}/usr/share/license
201 mkdir -p %{buildroot}/etc/dbus-1/system.d/
202 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name} %{buildroot}/usr/share/license/
203 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name}-common %{buildroot}/usr/share/license/
204 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name}-server %{buildroot}%{bindir}
205 cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf %{buildroot}/etc/dbus-1/system.d/
208 %define tizen_sign_base %{bindir}
209 %define tizen_sign_level platform
210 %define tizen_author_sign 1
211 %define tizen_dist_sign 1