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