Fix the typo error and remove edbus dependency
[apps/native/ug-bluetooth-efl.git] / packaging / ug-bluetooth-efl.spec
1 # Do not create provides from emulator .so files because the main package
2 # should anchor any reverse-dependencies
3 %global __provides_exclude_from ^(.*\\.emulator)$
4
5 %define _optdir /opt
6 %define _usrdir /usr
7 %define _ugdir  %{_usrdir}/ug
8
9 Name:       ug-bluetooth-efl
10 Summary:    UI gadget about the bluetooth
11 Version:    0.5.3
12 Release:    1
13 Group:      App/Network
14 License:    Flora-1.1
15 Source0:    %{name}-%{version}.tar.gz
16 Requires(post): vconf
17 Requires(post): coreutils
18 BuildRequires: cmake
19 BuildRequires: edje-tools
20 BuildRequires: pkgconfig(edje)
21 BuildRequires: gettext-tools
22 BuildRequires: pkgconfig(elementary)
23 BuildRequires: pkgconfig(efl-extension)
24 BuildRequires: pkgconfig(bundle)
25 BuildRequires: pkgconfig(ui-gadget-1)
26 BuildRequires: pkgconfig(dlog)
27 BuildRequires: pkgconfig(vconf)
28 BuildRequires: pkgconfig(evas)
29 BuildRequires: pkgconfig(edje)
30 BuildRequires: pkgconfig(ecore)
31 BuildRequires: pkgconfig(eina)
32 BuildRequires: pkgconfig(aul)
33 BuildRequires: pkgconfig(appcore-efl)
34 BuildRequires: pkgconfig(syspopup-caller)
35 BuildRequires: pkgconfig(capi-network-bluetooth)
36 BuildRequires: pkgconfig(capi-network-connection)
37 BuildRequires: pkgconfig(capi-system-device)
38 BuildRequires: pkgconfig(capi-system-info)
39 BuildRequires: pkgconfig(motion)
40 BuildRequires: pkgconfig(dbus-glib-1)
41 BuildRequires: pkgconfig(capi-appfw-application)
42 BuildRequires: pkgconfig(notification)
43 BuildRequires: pkgconfig(glib-2.0)
44 BuildRequires: pkgconfig(gio-2.0)
45 BuildRequires: pkgconfig(dpm)
46
47 # TV profile does not have contacts-service2.
48 # Do not build for unified environment if it is TV.
49 # ==> The usage of "profile" in this spec file is allowed only for excluding TV profile
50 #   from unified building.
51 %if "%{?profile}" != "tv"
52 BuildRequires: pkgconfig(contacts-service2)
53 %else
54 # Dummy contacts for TV product optimization.
55 # Note that even if it includes contacts-service2, the behavior is not chanaged
56 # because the code determines profile at runtime.
57 Source1:      contacts.h
58 %endif
59
60 %description
61 UI gadget about the bluetooth
62
63 %ifarch %{ix86} x86_64
64 %package extension-emulator
65 Summary:    UI gadget about the bluetooth for emulator
66 Requires:   %{name} = %{version}-%{release}
67 %description extension-emulator
68 UI gadget about the bluetooth for emulator
69 %endif // ifarch %{ix86} x86_64
70
71 %prep
72 %setup -q
73
74 %build
75 # TV profile does not have contacts-service2.
76 # Do not build for unified environment if it is TV.
77 # ==> The usage of "profile" in this spec file is allowed only for excluding TV profile
78 #   from unified building.
79 %if "%{?profile}" == "tv"
80 cp %SOURCE1 common/include/contacts.h
81 %endif
82
83 LDFLAGS="$LDFLAGS -Wl,-z -Wl,nodelete"
84
85 export CFLAGS_BASE="${CFLAGS}"
86 export CXXFLAGS_BASE="${CXXFLAGS}"
87 export FFLAGS_BASE="${FFLAGS}"
88
89 # Uncomment to disable BT_HOG of mobile. (refer to the end of common/include/bt-util.h)
90 # Without TIZEN_FEATURE_DISBALE_BT_HOG, BT_HOG is enabled for mobile.
91 #export CFLAGS+=" -DTIZEN_FEATURE_DISABLE_BT_HOG"
92
93 # extension-emulator
94 %ifarch %{ix86} x86_64
95 export CFLAGS="${CFLAGS_BASE} -DTIZEN_TEST_EMUL"
96 export CXXFLAGS="${CXXFLAGS_BASE} -DTIZEN_TEST_EMUL"
97 export FFLAGS="${FFLAGS_BASE} -DTIZEN_TEST_EMUL"
98
99 mkdir -p build_emulator
100 pushd build_emulator
101 # TV profile does not have contacts-service2.
102 # Do not build for unified environment if it is TV.
103 # ==> The usage of "profile" in this spec file is allowed only for excluding TV profile
104 #   from unified building.
105 %if "%{?profile}" != "tv"
106 %cmake .. -DCMAKE_INSTALL_PREFIX=%{_ugdir}/
107 %else
108 %cmake .. -DTIZEN_WITHOUT_CONTACTS="1" -DCMAKE_INSTALL_PREFIX=%{_ugdir}/
109 %endif
110 popd
111 %endif // ifarch %{ix86} x86_64
112
113 # non-emulator
114 export CFLAGS="${CFLAGS_BASE} -DTIZEN_DEBUG_ENABLE"
115 export CXXFLAGS="${CXXFLAGS_BASE} -DTIZEN_DEBUG_ENABLE"
116 export FFLAGS="${FFLAGS_BASE} -DTIZEN_DEBUG_ENABLE"
117
118 # TV profile does not have contacts-service2.
119 # Do not build for unified environment if it is TV.
120 # ==> The usage of "profile" in this spec file is allowed only for excluding TV profile
121 #   from unified building.
122 %if "%{?profile}" != "tv"
123 %cmake . -DCMAKE_INSTALL_PREFIX=%{_ugdir}/
124 %else
125 %cmake . -DTIZEN_WITHOUT_CONTACTS="1" -DCMAKE_INSTALL_PREFIX=%{_ugdir}/
126 %endif
127
128 make %{?jobs:-j%jobs}
129
130 %post
131 mkdir -p /usr/ug/bin/
132 ln -sf /usr/bin/ug-client /usr/ug/bin/setting-bluetooth-efl
133 ln -sf /usr/bin/ug-client /usr/ug/bin/setting-bluetooth-efl-single
134
135 %install
136 rm -rf %{buildroot}
137
138 # extension-emulator
139 %ifarch %{ix86} x86_64
140 pushd build_emulator
141 %make_install
142 popd
143 pushd %{buildroot}%{_ugdir}/lib/
144 for FILE in libug-setting-bluetooth-efl.so*; do mv "${FILE}" "${FILE}.emulator"; done
145 popd
146 %endif // ifarch %{ix86} x86_64
147
148 # non-emulator
149 %make_install
150
151 %files
152 %manifest ug-bluetooth-efl.manifest
153 %license LICENSE
154 %defattr(-,root,root,-)
155 %{_ugdir}/res/help/*
156 %{_ugdir}/res/edje/ug-setting-bluetooth-efl/*.edj
157 %{_ugdir}/res/locale/*/LC_MESSAGES/*
158 %{_ugdir}/res/images/ug-setting-bluetooth-efl/*
159 %{_ugdir}/lib/libug-setting-bluetooth-efl.so
160 %{_usrdir}/share/packages/ug-bluetooth-efl.xml
161 %{_usrdir}/share/icons/default/small/ug-bluetooth-efl.png
162 %exclude %{_ugdir}/res/tables/ug-setting-bluetooth-efl/ug-bluetooth-efl_ChangeableColorTable.xml
163 %exclude %{_ugdir}/res/tables/ug-setting-bluetooth-efl/ug-bluetooth-efl_FontInfoTable.xml
164 %{_ugdir}/lib/libug-setting-bluetooth-efl.so.*
165 %exclude %{_ugdir}/lib/libug-setting-bluetooth-efl.so.emulator
166 %exclude %{_ugdir}/lib/libug-setting-bluetooth-efl.so.*.emulator
167
168 %ifarch %{ix86} x86_64
169 %post  extension-emulator
170 pushd %{_ugdir}/lib/
171 for FILE in libug-setting-bluetooth-efl.so*.emulator; do mv "${FILE}" "${FILE%.emulator}"; done
172 popd
173 /sbin/ldconfig
174 %preun extension-emulator
175 pushd %{_ugdir}/lib/
176 for FILE in libug-setting-bluetooth-efl.so*; do mv "${FILE}" "${FILE}.emulator"; done
177 popd
178 %postun extension-emulator -p /sbin/ldconfig
179 %files extension-emulator
180 %manifest ug-bluetooth-efl.manifest
181 %{_ugdir}/lib/libug-setting-bluetooth-efl.so.emulator
182 %{_ugdir}/lib/libug-setting-bluetooth-efl.so.*.emulator
183 %endif // ifarch %{ix86} x86_64