Apply coding rule
[platform/core/connectivity/smartcard-service.git] / packaging / smartcard-service.spec
old mode 100644 (file)
new mode 100755 (executable)
index c9a9970..d431a90
@@ -1,29 +1,35 @@
 # 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.43
+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)
 BuildRequires: pkgconfig(gio-unix-2.0)
-BuildRequires: pkgconfig(security-server)
 BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(aul)
 BuildRequires: pkgconfig(libssl)
+BuildRequires: pkgconfig(libcrypto)
 BuildRequires: pkgconfig(pkgmgr)
 BuildRequires: pkgconfig(pkgmgr-info)
+BuildRequires: pkgconfig(cynara-client)
+BuildRequires: pkgconfig(cynara-creds-gdbus)
+BuildRequires: pkgconfig(cynara-session)
+
 BuildRequires: python
 BuildRequires: python-xml
 BuildRequires: hash-signer
@@ -31,6 +37,7 @@ BuildRequires: hash-signer
 Requires(post):   /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 Requires:         %{name}-common = %{version}-%{release}
+Requires: security-config
 
 
 %description
@@ -39,38 +46,40 @@ Smartcard Service FW.
 
 %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
 
 
 ################################################################################
@@ -87,9 +96,9 @@ common smartcard service.
 
 %files common
 %manifest %{name}-common.manifest
+%license LICENSE.APLv2
 %defattr(-,root,root,-)
 %{_libdir}/lib%{name}-common.so.*
-%{_datadir}/license/%{name}-common
 
 
 ################################################################################
@@ -112,59 +121,7 @@ common smartcard service.
 %{_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
-%{_datadir}/packages/%{name}-server.xml
-%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
-
+###
 
 ################################################################################
 # common...                                                                    #
@@ -183,8 +140,6 @@ export LDFLAGS+="-Wl,-Bsymbolic-functions"
 mkdir obj-arm-limux-qnueabi
 cd obj-arm-limux-qnueabi
 %cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client}
-#make %{?jobs:-j%jobs}
-
 
 %install
 cd obj-arm-limux-qnueabi
@@ -193,13 +148,13 @@ cd obj-arm-limux-qnueabi
        %__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
-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}
+
+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}