# 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.45
+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
%if 0%{!?use_autostart:1}
-Source1: %{name}-server.init
+Source1: %{name}.init
%endif
BuildRequires: cmake
BuildRequires: pkgconfig(glib-2.0)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-common = %{version}-%{release}
+Requires: security-config
%description
%files
%manifest %{name}.manifest
+%license LICENSE.APLv2
%defattr(-,root,root,-)
-%{_libdir}/lib%{name}.so.*
-%{_datadir}/license/%{name}
+%{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
%post
-/sbin/ldconfig
-
+/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
-/sbin/ldconfig
-
-
-################################################################################
-# package : smartcard-service-devel #
-################################################################################
-%package devel
-Summary: smartcard service devel
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-
-
-%description devel
-smartcard service.
-
-
-%files devel
-%manifest %{name}-devel.manifest
-%defattr(-,root,root,-)
-%{_includedir}/%{name}/*
-%{_libdir}/lib%{name}.so
-%{_libdir}/pkgconfig/%{name}.pc
+%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
################################################################################
%files common
%manifest %{name}-common.manifest
+%license LICENSE.APLv2
%defattr(-,root,root,-)
%{_libdir}/lib%{name}-common.so.*
-%{_datadir}/license/%{name}-common
################################################################################
%{_libdir}/lib%{name}-common.so
%{_libdir}/pkgconfig/%{name}-common.pc
-
-################################################################################
-# package : smartcard-service-server #
-################################################################################
-%global bindir /usr/apps/%{name}-server
-
-%package server
-Summary: server smartcard service
-Group: Development/Libraries
-Requires: %{name}-common = %{version}-%{release}
-
-
-%description server
-smartcard service server
-
-
-%post server
-/usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{bindir}
-%if 0%{!?use_autostart:1}
- ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc3.d/S79%{name}-server
- ln -sf /etc/init.d/%{name}-server /etc/rc.d/rc5.d/S79%{name}-server
-%endif
-ln -sf /usr/apps/%{name}-server/bin/smartcard-daemon /usr/bin/smartcard-daemon
-%if 0%{?test_client:1}
- ln -sf /usr/apps/%{name}-server/bin/smartcard-test-client /usr/bin/smartcard-test-client
-%endif
-
-
-%postun server
-%if 0%{!?use_autostart:1}
- rm -f /etc/rc.d/rc3.d/S79%{name}-server
- rm -f /etc/rc.d/rc5.d/S79%{name}-server
-%endif
-rm -f /usr/bin/smartcard-daemon
-
-
-%files server
-%manifest %{name}-server.manifest
-%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}-server
-%endif
-%{bindir}/%{name}-server
-%{bindir}/author-signature.xml
-%{bindir}/signature1.xml
-/etc/dbus-1/system.d/org.tizen.SmartcardService.conf
+###
################################################################################
# common... #
%__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}-server
- chmod 755 %{buildroot}/etc/init.d/%{name}-server
+ %__cp -af %SOURCE1 %{buildroot}/etc/init.d/%{name}
+ chmod 755 %{buildroot}/etc/init.d/%{name}
%endif
-mkdir -p %{buildroot}/usr/share/license
+
mkdir -p %{buildroot}/etc/dbus-1/system.d/
-cp -af %{_builddir}/%{name}-%{version}/packaging/%{name} %{buildroot}/usr/share/license/
-cp -af %{_builddir}/%{name}-%{version}/packaging/%{name}-common %{buildroot}/usr/share/license/
-cp -af %{_builddir}/%{name}-%{version}/packaging/%{name}-server %{buildroot}%{bindir}
+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