X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Fsmartcard-service.spec;h=d431a909a2eaac6e02ad825c05258f88bef21aba;hb=9bd333179cc24360bc7b910538d32696127dbba4;hp=9373629dea5434b6680dfe7a1503842c73557928;hpb=1cf658ba427b4e29bb2c682daf1ec34166f9728c;p=platform%2Fcore%2Fconnectivity%2Fsmartcard-service.git diff --git a/packaging/smartcard-service.spec b/packaging/smartcard-service.spec old mode 100644 new mode 100755 index 9373629..d431a90 --- a/packaging/smartcard-service.spec +++ b/packaging/smartcard-service.spec @@ -1,141 +1,163 @@ +# FOR COMMENTING DEFINITION, MUST USE %% instead of % +%global use_autostart "-DUSE_AUTOSTART=1" +#%%global test_client "-DTEST_CLIENT=1" +%global bindir /usr/apps/%{name} + +################################################################################ +# package : smartcard-service # +################################################################################ Name: smartcard-service Summary: Smartcard Service FW -Version: 0.1.15 +Version: 0.1.54 Release: 0 -Group: libs +Group: Network & Connectivity +Requires: %{name}-common = %{version}-%{release} License: Apache-2.0 Source0: %{name}-%{version}.tar.gz -#IFNDEF USE_AUTOSTART -#Source1: smartcard-service-server.init -#ENDIF +%if 0%{!?use_autostart:1} +Source1: %{name}.init +%endif +BuildRequires: cmake BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(security-server) +BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(dlog) -BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(aul) BuildRequires: pkgconfig(libssl) -BuildRequires: pkgconfig(dbus-glib-1) +BuildRequires: pkgconfig(libcrypto) BuildRequires: pkgconfig(pkgmgr) BuildRequires: pkgconfig(pkgmgr-info) -BuildRequires: cmake -BuildRequires: gettext-tools +BuildRequires: pkgconfig(cynara-client) +BuildRequires: pkgconfig(cynara-creds-gdbus) +BuildRequires: pkgconfig(cynara-session) + +BuildRequires: python +BuildRequires: python-xml +BuildRequires: hash-signer Requires(post): /sbin/ldconfig -Requires(post): /usr/bin/vconftool -requires(postun): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +Requires: %{name}-common = %{version}-%{release} +Requires: security-config + %description Smartcard Service FW. -%prep -%setup -q -%package devel -Summary: smartcard service -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +%files +%manifest %{name}.manifest +%license LICENSE.APLv2 +%defattr(-,root,root,-) +%{bindir}/bin/smartcard-daemon +%if 0%{?test_client:1} + %{bindir}/bin/smartcard-test-client +%endif +%if 0%{?use_autostart:1} + %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service +%else + %{_sysconfdir}/init.d/%{name} +%endif +%{bindir}/%{name} +%{bindir}/author-signature.xml +%{bindir}/signature1.xml +/etc/dbus-1/system.d/org.tizen.SmartcardService.conf -%description devel -smartcard service. -%package -n smartcard-service-common +%post +/usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{bindir} +%if 0%{!?use_autostart:1} + ln -sf /etc/init.d/%{name} /etc/rc.d/rc3.d/S79%{name} + ln -sf /etc/init.d/%{name} /etc/rc.d/rc5.d/S79%{name} +%endif +ln -sf /usr/apps/%{name}/bin/smartcard-daemon /usr/bin/smartcard-daemon +%if 0%{?test_client:1} + ln -sf /usr/apps/%{name}/bin/smartcard-test-client /usr/bin/smartcard-test-client +%endif + +%postun +%if 0%{!?use_autostart:1} + rm -f /etc/rc.d/rc3.d/S79%{name} + rm -f /etc/rc.d/rc5.d/S79%{name} +%endif +rm -f /usr/bin/smartcard-daemon + + +################################################################################ +# package : smartcard-service-common # +################################################################################ +%package common Summary: common smartcard service Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -%description -n smartcard-service-common + +%description common common smartcard service. -%package -n smartcard-service-common-devel + +%files common +%manifest %{name}-common.manifest +%license LICENSE.APLv2 +%defattr(-,root,root,-) +%{_libdir}/lib%{name}-common.so.* + + +################################################################################ +# package : smartcard-service-common-devel # +################################################################################ +%package common-devel Summary: common smartcard service Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: smartcard-service-common = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} -%description -n smartcard-service-common-devel + +%description common-devel common smartcard service. -%package -n smartcard-service-server -Summary: server smartcard service -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -%description -n smartcard-service-server -smartcard service. +%files common-devel +%manifest %{name}-common-devel.manifest +%defattr(-,root,root,-) +%{_includedir}/%{name}-common/* +%{_libdir}/lib%{name}-common.so +%{_libdir}/pkgconfig/%{name}-common.pc + +### + +################################################################################ +# common... # +################################################################################ +%prep +%setup -q + %build +%if 0%{?sec_build_binary_debug_enable} +export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE" +export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE" +export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" +%endif +export LDFLAGS+="-Wl,-Bsymbolic-functions" mkdir obj-arm-limux-qnueabi cd obj-arm-limux-qnueabi -#IFNDEF USE_AUTOSTART -#cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -#ELSE -%cmake .. -DUSE_AUTOSTART=1 # daemon will be started when client makes instance by DBUS -#ENDIF -#make %{?jobs:-j%jobs} +%cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client} %install cd obj-arm-limux-qnueabi %make_install -#IFNDEF USE_AUTOSTART -#%__mkdir -p %{buildroot}/etc/init.d/ -#%__mkdir -p %{buildroot}/etc/rc.d/rc3.d/ -#%__mkdir -p %{buildroot}/etc/rc.d/rc5.d/ -#%__cp -af %SOURCE1 %{buildroot}/etc/init.d/smartcard-service-server -#chmod 755 %{buildroot}/etc/init.d/smartcard-service-server -#ENDIF -mkdir -p %{buildroot}/usr/share/license -cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service %{buildroot}/usr/share/license/ -cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-common %{buildroot}/usr/share/license/ -cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-server %{buildroot}/usr/share/license/ - -%post -/sbin/ldconfig -#IFNDEF USE_AUTOSTART -#ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc3.d/S79smartcard-service-server -#ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc5.d/S79smartcard-service-server -#ENDIF - -%postun -/sbin/ldconfig -#IFNDEF USE_AUTOSTART -#rm -f /etc/rc.d/rc3.d/S79smartcard-service-server -#rm -f /etc/rc.d/rc5.d/S79smartcard-service-server -#ENDIF - -%files -%manifest smartcard-service.manifest -%defattr(-,root,root,-) -%{_libdir}/libsmartcard-service.so.* -/usr/share/license/smartcard-service - -%files devel -%manifest smartcard-service-devel.manifest -%defattr(-,root,root,-) -%{_includedir}/smartcard-service/* -%{_libdir}/libsmartcard-service.so -%{_libdir}/pkgconfig/smartcard-service.pc - -%files -n smartcard-service-common -%manifest smartcard-service-common.manifest -%defattr(-,root,root,-) -%{_libdir}/libsmartcard-service-common.so.* -/usr/share/license/smartcard-service-common - -%files -n smartcard-service-common-devel -%manifest smartcard-service-common-devel.manifest -%defattr(-,root,root,-) -%{_includedir}/smartcard-service-common/* -%{_libdir}/libsmartcard-service-common.so -%{_libdir}/pkgconfig/smartcard-service-common.pc - -%files -n smartcard-service-server -%manifest smartcard-service-server.manifest -%defattr(-,root,root,-) -%{_bindir}/smartcard-daemon -#/usr/bin/smartcard-test-client -#IFNDEF USE_AUTOSTART -#/etc/init.d/smartcard-service-server -#ELSE -/usr/share/dbus-1/services/smartcard-service.service -#ENDIF -/usr/share/license/smartcard-service-server +%if 0%{!?use_autostart:1} + %__mkdir -p %{buildroot}/etc/init.d/ + %__mkdir -p %{buildroot}/etc/rc.d/rc3.d/ + %__mkdir -p %{buildroot}/etc/rc.d/rc5.d/ + %__cp -af %SOURCE1 %{buildroot}/etc/init.d/%{name} + chmod 755 %{buildroot}/etc/init.d/%{name} +%endif + +mkdir -p %{buildroot}/etc/dbus-1/system.d/ +cp -af %{_builddir}/%{name}-%{version}/packaging/%{name} %{buildroot}%{bindir} +cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf %{buildroot}/etc/dbus-1/system.d/ + +%define tizen_sign 1 +%define tizen_sign_base %{bindir} +%define tizen_sign_level platform +%define tizen_author_sign 1 +%define tizen_dist_sign 1