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(aul)
22 BuildRequires: pkgconfig(libssl)
23 BuildRequires: pkgconfig(pkgmgr)
24 BuildRequires: pkgconfig(pkgmgr-info)
26 BuildRequires: pkgconfig(dbus-glib-1)
31 BuildRequires: python-xml
34 Requires(post): /sbin/ldconfig
35 Requires(postun): /sbin/ldconfig
36 Requires: smartcard-service-common = %{version}-%{release}
48 Summary: smartcard service
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
57 %package -n smartcard-service-common
58 Summary: common smartcard service
59 Group: Development/Libraries
62 %description -n smartcard-service-common
63 common smartcard service.
66 %package -n smartcard-service-common-devel
67 Summary: common smartcard service
68 Group: Development/Libraries
69 Requires: smartcard-service-common = %{version}-%{release}
72 %description -n smartcard-service-common-devel
73 common smartcard service.
76 %package -n smartcard-service-server
77 Summary: server smartcard service
78 Group: Development/Libraries
79 Requires: smartcard-service-common = %{version}-%{release}
82 %description -n smartcard-service-server
87 mkdir obj-arm-limux-qnueabi
88 cd obj-arm-limux-qnueabi
89 %cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client}
90 #make %{?jobs:-j%jobs}
94 cd obj-arm-limux-qnueabi
96 %if 0%{!?use_autostart:1}
97 %__mkdir -p %{buildroot}/etc/init.d/
98 %__mkdir -p %{buildroot}/etc/rc.d/rc3.d/
99 %__mkdir -p %{buildroot}/etc/rc.d/rc5.d/
100 %__cp -af %SOURCE1 %{buildroot}/etc/init.d/smartcard-service-server
101 chmod 755 %{buildroot}/etc/init.d/smartcard-service-server
103 mkdir -p %{buildroot}/usr/share/license
104 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name} %{buildroot}/usr/share/license/
105 cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-common %{buildroot}/usr/share/license/
106 cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-server %{buildroot}/usr/share/license/
111 %if 0%{!?use_autostart:1}
112 ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc3.d/S79smartcard-service-server
113 ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc5.d/S79smartcard-service-server
119 %if 0%{!?use_autostart:1}
120 rm -f /etc/rc.d/rc3.d/S79smartcard-service-server
121 rm -f /etc/rc.d/rc5.d/S79smartcard-service-server
126 %manifest %{name}.manifest
127 %defattr(-,root,root,-)
128 %{_libdir}/libsmartcard-service.so.*
129 %{_datadir}/license/%{name}
133 %manifest smartcard-service-devel.manifest
134 %defattr(-,root,root,-)
135 %{_includedir}/%{name}/*
136 %{_libdir}/libsmartcard-service.so
137 %{_libdir}/pkgconfig/%{name}.pc
140 %files -n smartcard-service-common
141 %manifest smartcard-service-common.manifest
142 %defattr(-,root,root,-)
143 %{_libdir}/libsmartcard-service-common.so.*
144 %{_datadir}/license/smartcard-service-common
147 %files -n smartcard-service-common-devel
148 %manifest smartcard-service-common-devel.manifest
149 %defattr(-,root,root,-)
150 %{_includedir}/smartcard-service-common/*
151 %{_libdir}/libsmartcard-service-common.so
152 %{_libdir}/pkgconfig/smartcard-service-common.pc
155 %files -n smartcard-service-server
156 %manifest smartcard-service-server.manifest
157 %defattr(-,root,root,-)
158 %{_bindir}/smartcard-daemon
159 %{_datadir}/packages/smartcard-service-server.xml
160 %if 0%{?test_client:1}
161 %{_bindir}/smartcard-test-client
163 %if 0%{?use_autostart:1}
164 %{_datadir}/dbus-1/services/org.tizen.smartcard_service.service
166 %{_sysconfdir}/init.d/smartcard-service-server
168 %{_datadir}/license/smartcard-service-server