Update version number for release
[platform/core/connectivity/smartcard-service.git] / packaging / smartcard-service.spec
1 Name:       smartcard-service
2 Summary:    Smartcard Service FW
3 Version:    0.1.9
4 Release:    1
5 Group:      libs
6 License:    Samsung Proprietary License
7 Source0:    %{name}-%{version}.tar.gz
8 #IFNDEF USE_AUTOSTART
9 #Source1:    smartcard-service-server.init
10 #ENDIF
11 BuildRequires: pkgconfig(glib-2.0)
12 BuildRequires: pkgconfig(security-server)
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(libssl)
15 BuildRequires: pkgconfig(dbus-glib-1)
16 BuildRequires: pkgconfig(pkgmgr)
17 BuildRequires: cmake
18 BuildRequires: gettext-tools
19
20 Requires(post):   /sbin/ldconfig
21 Requires(post):   /usr/bin/vconftool
22 requires(postun): /sbin/ldconfig
23
24 %description
25 Smartcard Service FW.
26
27 %prep
28 %setup -q
29
30 %package    devel
31 Summary:    smartcard service
32 Group:      Development/Libraries
33 Requires:   %{name} = %{version}-%{release}
34
35 %description devel
36 smartcard service.
37
38 %package -n smartcard-service-common
39 Summary:    common smartcard service
40 Group:      Development/Libraries
41 Requires:   %{name} = %{version}-%{release}
42
43 %description -n smartcard-service-common
44 common smartcard service.
45
46 %package -n smartcard-service-common-devel
47 Summary:    common smartcard service
48 Group:      Development/Libraries
49 Requires:   %{name} = %{version}-%{release}
50
51 %description -n smartcard-service-common-devel
52 common smartcard service.
53
54 %package -n smartcard-service-server
55 Summary:    server smartcard service
56 Group:      Development/Libraries
57 Requires:   %{name} = %{version}-%{release}
58
59 %description -n smartcard-service-server
60 smartcard service.
61
62 %build
63 mkdir obj-arm-limux-qnueabi
64 cd obj-arm-limux-qnueabi
65 #IFNDEF USE_AUTOSTART
66 #cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix}
67 #ELSE
68 cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DUSE_AUTOSTART=1 # daemon will be started when client makes instance by DBUS
69 #ENDIF
70 #make %{?jobs:-j%jobs}
71
72 %install
73 cd obj-arm-limux-qnueabi
74 %make_install
75 #IFNDEF USE_AUTOSTART
76 #%__mkdir -p  %{buildroot}/etc/init.d/
77 #%__mkdir -p  %{buildroot}/etc/rc.d/rc3.d/
78 #%__mkdir -p  %{buildroot}/etc/rc.d/rc5.d/
79 #%__cp -af %SOURCE1 %{buildroot}/etc/init.d/smartcard-service-server
80 #chmod 755 %{buildroot}/etc/init.d/smartcard-service-server
81 #ENDIF
82 mkdir -p %{buildroot}/usr/share/license
83 cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service %{buildroot}/usr/share/license/
84 cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-common %{buildroot}/usr/share/license/
85 cp -af %{_builddir}/%{name}-%{version}/packaging/smartcard-service-server %{buildroot}/usr/share/license/
86
87 %post
88 /sbin/ldconfig
89 #IFNDEF USE_AUTOSTART
90 #ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc3.d/S79smartcard-service-server
91 #ln -sf /etc/init.d/smartcard-service-server /etc/rc.d/rc5.d/S79smartcard-service-server
92 #ENDIF
93
94 %postun
95 /sbin/ldconfig
96 #IFNDEF USE_AUTOSTART
97 #rm -f /etc/rc.d/rc3.d/S79smartcard-service-server
98 #rm -f /etc/rc.d/rc5.d/S79smartcard-service-server
99 #ENDIF
100
101 %files
102 %manifest smartcard-service.manifest
103 %defattr(-,root,root,-)
104 /usr/lib/libsmartcard-service.so.*
105 /usr/share/license/smartcard-service
106
107 %files  devel
108 %manifest smartcard-service-devel.manifest
109 %defattr(-,root,root,-)
110 /usr/include/smartcard-service/*
111 /usr/lib/libsmartcard-service.so
112 /usr/lib/pkgconfig/smartcard-service.pc
113
114 %files -n smartcard-service-common
115 %manifest smartcard-service-common.manifest
116 %defattr(-,root,root,-)
117 /usr/lib/libsmartcard-service-common.so.*
118 /usr/share/license/smartcard-service-common
119
120 %files -n smartcard-service-common-devel
121 %manifest smartcard-service-common-devel.manifest
122 %defattr(-,root,root,-)
123 /usr/include/smartcard-service-common/*
124 /usr/lib/libsmartcard-service-common.so
125 /usr/lib/pkgconfig/smartcard-service-common.pc
126
127 %files -n smartcard-service-server
128 %manifest smartcard-service-server.manifest
129 %defattr(-,root,root,-)
130 /usr/bin/smartcard-daemon
131 #/usr/bin/smartcard-test-client
132 #IFNDEF USE_AUTOSTART
133 #/etc/init.d/smartcard-service-server
134 #ELSE
135 /usr/share/dbus-1/services/smartcard-service.service
136 #ENDIF
137 /usr/share/license/smartcard-service-server