1 # FOR COMMENTING DEFINITION, MUST USE %% instead of %
2 %global use_autostart "-DUSE_AUTOSTART=1"
3 %global use_gdbus "-DUSE_GDBUS=1"
4 %global test_client "-DTEST_CLIENT=1"
6 Name: smartcard-service
7 Summary: Smartcard Service FW
12 Source0: %{name}-%{version}.tar.gz
13 %if 0%{!?use_autostart:1}
14 Source1: smartcard-service-server.init
17 BuildRequires: pkgconfig(glib-2.0)
18 BuildRequires: pkgconfig(gio-unix-2.0)
19 BuildRequires: pkgconfig(security-server)
20 BuildRequires: pkgconfig(dlog)
21 BuildRequires: pkgconfig(vconf)
22 BuildRequires: pkgconfig(aul)
23 BuildRequires: pkgconfig(libssl)
24 BuildRequires: pkgconfig(pkgmgr)
25 BuildRequires: pkgconfig(pkgmgr-info)
27 BuildRequires: pkgconfig(dbus-glib-1)
31 BuildRequires: python-xml
33 Requires(post): /sbin/ldconfig
34 Requires(postun): /sbin/ldconfig
35 Requires: smartcard-service-common = %{version}-%{release}
47 Summary: smartcard service
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
56 %package -n smartcard-service-common
57 Summary: common smartcard service
58 Group: Development/Libraries
61 %description -n smartcard-service-common
62 common smartcard service.
65 %package -n smartcard-service-common-devel
66 Summary: common smartcard service
67 Group: Development/Libraries
68 Requires: smartcard-service-common = %{version}-%{release}
71 %description -n smartcard-service-common-devel
72 common smartcard service.
75 %package -n smartcard-service-server
76 Summary: server smartcard service
77 Group: Development/Libraries
78 Requires: smartcard-service-common = %{version}-%{release}
81 %description -n smartcard-service-server
86 mkdir obj-arm-limux-qnueabi
87 cd obj-arm-limux-qnueabi
88 %cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client}
89 #make %{?jobs:-j%jobs}
93 cd obj-arm-limux-qnueabi
95 %if 0%{!?use_autostart:1}
96 %__mkdir -p %{buildroot}/etc/init.d/
97 %__mkdir -p %{buildroot}/etc/rc.d/rc3.d/
98 %__mkdir -p %{buildroot}/etc/rc.d/rc5.d/
99 %__cp -af %SOURCE1 %{buildroot}/etc/init.d/smartcard-service-server
100 chmod 755 %{buildroot}/etc/init.d/smartcard-service-server
102 mkdir -p %{buildroot}/usr/share/license
103 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name} %{buildroot}/usr/share/license/
104 cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-common %{buildroot}/usr/share/license/
105 cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-server %{buildroot}/usr/share/license/
110 %if 0%{!?use_autostart:1}
111 ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc3.d/S79smartcard-service-server
112 ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc5.d/S79smartcard-service-server
118 %if 0%{!?use_autostart:1}
119 rm -f /etc/rc.d/rc3.d/S79smartcard-service-server
120 rm -f /etc/rc.d/rc5.d/S79smartcard-service-server
125 %manifest %{name}.manifest
126 %defattr(-,root,root,-)
127 %{_libdir}/libsmartcard-service.so.*
128 %{_datadir}/license/%{name}
132 %manifest smartcard-service-devel.manifest
133 %defattr(-,root,root,-)
134 %{_includedir}/%{name}/*
135 %{_libdir}/libsmartcard-service.so
136 %{_libdir}/pkgconfig/%{name}.pc
139 %files -n smartcard-service-common
140 %manifest smartcard-service-common.manifest
141 %defattr(-,root,root,-)
142 %{_libdir}/libsmartcard-service-common.so.*
143 %{_datadir}/license/smartcard-service-common
146 %files -n smartcard-service-common-devel
147 %manifest smartcard-service-common-devel.manifest
148 %defattr(-,root,root,-)
149 %{_includedir}/smartcard-service-common/*
150 %{_libdir}/libsmartcard-service-common.so
151 %{_libdir}/pkgconfig/smartcard-service-common.pc
154 %files -n smartcard-service-server
155 %manifest smartcard-service-server.manifest
156 %defattr(-,root,root,-)
157 %{_bindir}/smartcard-daemon
158 %{_datadir}/packages/smartcard-service-server.xml
159 %if 0%{?test_client:1}
160 %{_bindir}/smartcard-test-client
162 %if 0%{?use_autostart:1}
163 %{_datadir}/dbus-1/services/org.tizen.smartcard_service.service
165 %{_sysconfdir}/init.d/smartcard-service-server
167 %{_datadir}/license/smartcard-service-server