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 FW
11 Source0: %{name}-%{version}.tar.gz
12 %if 0%{!?use_autostart:1}
13 Source1: smartcard-service-server.init
16 BuildRequires: pkgconfig(glib-2.0)
17 BuildRequires: pkgconfig(gio-unix-2.0)
18 BuildRequires: pkgconfig(security-server)
19 BuildRequires: pkgconfig(dlog)
20 BuildRequires: pkgconfig(aul)
21 BuildRequires: pkgconfig(libssl)
22 BuildRequires: pkgconfig(pkgmgr)
23 BuildRequires: pkgconfig(pkgmgr-info)
25 BuildRequires: python-xml
27 Requires(post): /sbin/ldconfig
28 Requires(postun): /sbin/ldconfig
29 Requires: smartcard-service-common = %{version}-%{release}
41 Summary: smartcard service
42 Group: Development/Libraries
43 Requires: %{name} = %{version}-%{release}
50 %package -n smartcard-service-common
51 Summary: common smartcard service
52 Group: Development/Libraries
55 %description -n smartcard-service-common
56 common smartcard service.
59 %package -n smartcard-service-common-devel
60 Summary: common smartcard service
61 Group: Development/Libraries
62 Requires: smartcard-service-common = %{version}-%{release}
65 %description -n smartcard-service-common-devel
66 common smartcard service.
69 %package -n smartcard-service-server
70 Summary: server smartcard service
71 Group: Development/Libraries
72 Requires: smartcard-service-common = %{version}-%{release}
75 %description -n smartcard-service-server
80 mkdir obj-arm-limux-qnueabi
81 cd obj-arm-limux-qnueabi
82 %cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} %{?use_autostart} %{?use_gdbus} %{?test_client}
83 #make %{?jobs:-j%jobs}
87 cd obj-arm-limux-qnueabi
89 %if 0%{!?use_autostart:1}
90 %__mkdir -p %{buildroot}/etc/init.d/
91 %__mkdir -p %{buildroot}/etc/rc.d/rc3.d/
92 %__mkdir -p %{buildroot}/etc/rc.d/rc5.d/
93 %__cp -af %SOURCE1 %{buildroot}/etc/init.d/smartcard-service-server
94 chmod 755 %{buildroot}/etc/init.d/smartcard-service-server
96 mkdir -p %{buildroot}/usr/share/license
97 cp -af %{_builddir}/%{name}-%{version}/packaging/%{name} %{buildroot}/usr/share/license/
98 cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-common %{buildroot}/usr/share/license/
99 cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-server %{buildroot}/usr/share/license/
104 %if 0%{!?use_autostart:1}
105 ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc3.d/S79smartcard-service-server
106 ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc5.d/S79smartcard-service-server
112 %if 0%{!?use_autostart:1}
113 rm -f /etc/rc.d/rc3.d/S79smartcard-service-server
114 rm -f /etc/rc.d/rc5.d/S79smartcard-service-server
119 %manifest %{name}.manifest
120 %defattr(-,root,root,-)
121 %{_libdir}/libsmartcard-service.so.*
122 %{_datadir}/license/%{name}
126 %manifest smartcard-service-devel.manifest
127 %defattr(-,root,root,-)
128 %{_includedir}/%{name}/*
129 %{_libdir}/libsmartcard-service.so
130 %{_libdir}/pkgconfig/%{name}.pc
133 %files -n smartcard-service-common
134 %manifest smartcard-service-common.manifest
135 %defattr(-,root,root,-)
136 %{_libdir}/libsmartcard-service-common.so.*
137 %{_datadir}/license/smartcard-service-common
140 %files -n smartcard-service-common-devel
141 %manifest smartcard-service-common-devel.manifest
142 %defattr(-,root,root,-)
143 %{_includedir}/smartcard-service-common/*
144 %{_libdir}/libsmartcard-service-common.so
145 %{_libdir}/pkgconfig/smartcard-service-common.pc
148 %files -n smartcard-service-server
149 %manifest smartcard-service-server.manifest
150 %defattr(-,root,root,-)
151 %{_bindir}/smartcard-daemon
152 %{_datadir}/packages/smartcard-service-server.xml
153 %if 0%{?test_client:1}
154 %{_bindir}/smartcard-test-client
156 %if 0%{?use_autostart:1}
157 %{_datadir}/dbus-1/services/org.tizen.smartcard_service.service
159 %{_sysconfdir}/init.d/smartcard-service-server
161 %{_datadir}/license/smartcard-service-server