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