-# 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.56
+Version: 0.1.58
Release: 0
Group: Network & Connectivity
-Requires: %{name}-common = %{version}-%{release}
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-%if 0%{!?use_autostart:1}
-Source1: %{name}.init
-%endif
BuildRequires: cmake
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: python
BuildRequires: python-xml
-BuildRequires: hash-signer
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: %{name}-common = %{version}-%{release}
-Requires: security-config
%if 0%{?gtests:1}
BuildRequires: pkgconfig(gmock)
%description
Smartcard Service FW.
-
-%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
-%if 0%{?gtests:1}
-%{_bindir}/gtest*
-%endif
-
-%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
%description common
common smartcard service.
-
-%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
%description common-devel
common 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
export LDFLAGS+=" -lgcov "
%endif
-%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
-%cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client} \
- -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
-DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
%install
-cd obj-arm-limux-qnueabi
%make_install
-%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/
+install -D -m 0644 server/org.tizen.SmartcardService.service %{buildroot}/%{_unitdir}/org.tizen.SmartcardService.service
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{_bindir}/smartcard-daemon
+%{_sysconfdir}/dbus-1/system.d/org.tizen.SmartcardService.conf
+%{_unitdir}/org.tizen.SmartcardService.service
+%if 0%{?gtests:1}
+%{_bindir}/gtest*
+%endif
+%license LICENSE.APLv2
-%define tizen_sign 1
-%define tizen_sign_base %{bindir}
-%define tizen_sign_level platform
-%define tizen_author_sign 1
-%define tizen_dist_sign 1
+%files common
+%manifest %{name}-common.manifest
+%defattr(-,root,root,-)
+%{_libdir}/lib%{name}-common.so.*
+%license LICENSE.APLv2
+
+%files common-devel
+%manifest %{name}-common-devel.manifest
+%defattr(-,root,root,-)
+%{_includedir}/%{name}-common/*
+%{_libdir}/lib%{name}-common.so
+%{_libdir}/pkgconfig/%{name}-common.pc