1 # FOR COMMENTING DEFINITION, MUST USE %% instead of %
2 %global use_autostart "-DUSE_AUTOSTART=1"
3 #%%global test_client "-DTEST_CLIENT=1"
5 Name: smartcard-service
6 Summary: Smartcard Service
9 Group: Network & Connectivity/Service
11 Source0: %{name}-%{version}.tar.gz
12 %if 0%{!?use_autostart:1}
13 Source1: smartcard-service-server.init
16 Source1001: %{name}.manifest
17 Source1002: %{name}-devel.manifest
18 Source1003: smartcard-service-common.manifest
19 Source1004: smartcard-service-common-devel.manifest
20 Source1005: smartcard-service-server.manifest
21 BuildRequires: pkgconfig(glib-2.0)
22 BuildRequires: pkgconfig(gio-unix-2.0)
23 BuildRequires: pkgconfig(security-server)
24 BuildRequires: pkgconfig(dlog)
25 BuildRequires: pkgconfig(aul)
26 BuildRequires: pkgconfig(libssl)
27 BuildRequires: pkgconfig(pkgmgr)
28 BuildRequires: pkgconfig(pkgmgr-info)
30 BuildRequires: python-xml
32 Requires(post): /sbin/ldconfig
33 Requires(postun): /sbin/ldconfig
34 Requires: smartcard-service-common = %{version}-%{release}
38 A library for Smartcard applications.
43 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} .
47 Summary: Smartcard service
48 Group: Network & Connectivity/Development
49 Requires: %{name} = %{version}-%{release}
52 For developing Smartcard applications.
55 %package -n smartcard-service-common
56 Summary: Common smartcard service
57 Group: Network & Connectivity/Service
59 %description -n smartcard-service-common
60 Common smartcard service for developing internally
63 %package -n smartcard-service-common-devel
64 Summary: Common smartcard service
65 Group: Network & Connectivity/Development
66 Requires: smartcard-service-common = %{version}-%{release}
68 %description -n smartcard-service-common-devel
69 For developing smartcard services internally.
72 %package -n smartcard-service-server
73 Summary: Smartcard service server
74 Group: Network & Connectivity/Service
75 Requires: smartcard-service-common = %{version}-%{release}
77 %description -n smartcard-service-server
78 Server for smartcard service
82 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
83 %cmake . %{?use_autostart} %{?test_client} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
87 %if 0%{!?use_autostart:1}
88 %__mkdir -p %{buildroot}/etc/init.d/
89 %__mkdir -p %{buildroot}/etc/rc.d/rc3.d/
90 %__mkdir -p %{buildroot}/etc/rc.d/rc5.d/
91 %__cp -af %SOURCE1 %{buildroot}/etc/init.d/smartcard-service-server
92 chmod 755 %{buildroot}/etc/init.d/smartcard-service-server
97 %if 0%{!?use_autostart:1}
98 ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc3.d/S79smartcard-service-server
99 ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc5.d/S79smartcard-service-server
104 %if 0%{!?use_autostart:1}
105 rm -f /etc/rc.d/rc3.d/S79smartcard-service-server
106 rm -f /etc/rc.d/rc5.d/S79smartcard-service-server
109 %post -n smartcard-service-common
112 %postun -n smartcard-service-common
117 %manifest %{name}.manifest
118 %defattr(-,root,root,-)
119 %{_libdir}/libsmartcard-service.so.*
120 %license LICENSE.APLv2
124 %manifest smartcard-service-devel.manifest
125 %defattr(-,root,root,-)
126 %{_includedir}/%{name}/*
127 %{_libdir}/libsmartcard-service.so
128 %{_libdir}/pkgconfig/%{name}.pc
131 %files -n smartcard-service-common
132 %manifest smartcard-service-common.manifest
133 %defattr(-,root,root,-)
134 %{_libdir}/libsmartcard-service-common.so.*
135 %license LICENSE.APLv2
138 %files -n smartcard-service-common-devel
139 %manifest smartcard-service-common-devel.manifest
140 %defattr(-,root,root,-)
141 %{_includedir}/smartcard-service-common/*
142 %{_libdir}/libsmartcard-service-common.so
143 %{_libdir}/pkgconfig/smartcard-service-common.pc
146 %files -n smartcard-service-server
147 %manifest smartcard-service-server.manifest
148 %defattr(-,root,root,-)
149 %{_bindir}/smartcard-daemon
150 %{_datadir}/packages/smartcard-service-server.xml
151 %if 0%{?test_client:1}
152 %{_bindir}/smartcard-test-client
154 %if 0%{?use_autostart:1}
155 %{_datadir}/dbus-1/system-services/org.tizen.smartcard_service.service
157 %{_sysconfdir}/init.d/smartcard-service-server
159 %license LICENSE.APLv2