remove common library
[platform/core/connectivity/nfc-manager-neard.git] / packaging / nfc-manager.spec
1 Name:       nfc-manager
2 Summary:    NFC framework manager
3 Version: 0.1.2
4 Release:    0
5 Group:      Network & Connectivity/NFC
6 License:    Flora Software License
7 Source0:    %{name}-%{version}.tar.gz
8 Source1:    %{name}.service
9 Source1001:     %{name}.manifest
10 BuildRequires: cmake
11 BuildRequires: pkgconfig(aul)
12 BuildRequires: pkgconfig(glib-2.0)
13 BuildRequires: pkgconfig(gobject-2.0)
14 BuildRequires: pkgconfig(security-server)
15 BuildRequires: pkgconfig(vconf)
16 BuildRequires: pkgconfig(dlog)
17 BuildRequires: pkgconfig(tapi)
18 BuildRequires: pkgconfig(bluetooth-api)
19 BuildRequires: pkgconfig(capi-network-wifi)
20 BuildRequires: pkgconfig(mm-sound)
21 BuildRequires: pkgconfig(appsvc)
22 BuildRequires: pkgconfig(svi)
23 BuildRequires: pkgconfig(capi-media-wav-player)
24 BuildRequires: pkgconfig(libssl)
25 BuildRequires: pkgconfig(pkgmgr)
26 BuildRequires: pkgconfig(pkgmgr-info)
27 BuildRequires: pkgconfig(ecore-x)
28 BuildRequires: pkgconfig(pmapi)
29 BuildRequires: python
30 BuildRequires: python-xml
31 BuildRequires: gettext-tools
32 Requires(post):   /sbin/ldconfig
33 Requires(post):   /usr/bin/vconftool
34 Requires(postun): /sbin/ldconfig
35 Requires:         nfc-client-lib = %{version}
36
37
38 %description
39 Tizen NFC framework manager.
40
41
42 %prep
43 %setup -q
44 cp %{SOURCE1001} .
45
46
47 %package -n nfc-common-devel
48 Summary:    NFC common library (devel)
49 Group:      Network & Connectivity/Development
50
51
52 %description -n nfc-common-devel
53 NFC manager common header for internal development.
54
55
56 %package -n nfc-client-lib
57 Summary:    NFC client library
58 Group:      Network & Connectivity/NFC
59
60
61 %description -n nfc-client-lib
62 NFC manager Client library for NFC client applications.
63
64
65 %package -n nfc-client-lib-devel
66 Summary:    NFC client library (devel)
67 Group:      Network & Connectivity/Development
68 Requires:   nfc-client-lib = %{version}
69
70
71 %description -n nfc-client-lib-devel
72 NFC manager Client library for developing NFC client applications.
73
74
75
76 #%%package -n nfc-client-test
77 #Summary:    NFC client test
78 #Group:      Network & Connectivity/NFC
79 #Requires:   %%{name} = %%{version}
80
81
82 #%%description -n nfc-client-test
83 #NFC client test (devel)
84
85
86 %build
87 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
88 %cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
89
90
91 %install
92 %make_install
93
94 mkdir -p %{buildroot}/opt/usr/share/nfc_debug
95
96 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
97 cp -af %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/
98 ln -s ../%{name}.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/%{name}.service
99
100 %post
101 /sbin/ldconfig
102
103 systemctl daemon-reload
104 if [ $1 == 1 ]; then
105     systemctl restart %{name}.service
106 fi
107
108
109 %post -n nfc-client-lib
110 /sbin/ldconfig
111 vconftool set -t bool db/nfc/feature 0 -u 5000 -f
112 vconftool set -t int db/nfc/se_type 0 -u 5000 -f
113 vconftool set -t bool db/nfc/predefined_item_state 0 -u 5000 -f
114 vconftool set -t string db/nfc/predefined_item "None" -u 5000 -f
115 vconftool set -t bool db/nfc/enable 0 -u 5000 -f
116
117 %postun
118 /sbin/ldconfig
119 if [ $1 == 0 ]; then
120     systemctl stop %{name}.service
121 fi
122 systemctl daemon-reload
123
124
125 %postun -n nfc-client-lib -p /sbin/ldconfig
126
127
128 %files
129 %manifest %{name}.manifest
130 %defattr(-,root,root,-)
131 %{_bindir}/nfc-manager-daemon
132 #%%{_bindir}/ndef-tool
133 %{_libdir}/systemd/system/%{name}.service
134 %{_libdir}/systemd/system/multi-user.target.wants/%{name}.service
135 %{_datadir}/dbus-1/services/org.tizen.NetNfcService.service
136 %{_datadir}/packages/%{name}.xml
137 %{_datadir}/nfc-manager-daemon/sounds/*
138 %attr(0775,-,5000) %dir /opt/usr/share/nfc_debug
139 %license LICENSE.Flora
140
141
142 %files -n nfc-client-lib
143 %manifest %{name}.manifest
144 %defattr(-,root,root,-)
145 %{_libdir}/libnfc.so.*
146 %license LICENSE.Flora
147
148
149 %files -n nfc-client-lib-devel
150 %defattr(-,root,root,-)
151 %{_libdir}/libnfc.so
152 %{_libdir}/pkgconfig/nfc.pc
153 %{_includedir}/nfc/*.h
154
155
156 %files -n nfc-common-devel
157 %defattr(-,root,root,-)
158 %{_libdir}/pkgconfig/nfc-common.pc
159 %{_includedir}/nfc-common/*.h
160
161
162 #%%files -n nfc-client-test
163 #%%manifest nfc-client-test.manifest
164 #%%defattr(-,root,root,-)
165 #%%{_bindir}/nfc_client
166 #%%license LICENSE.Flora