summaryrefslogtreecommitdiffstats
path: root/redhat/extras/kdebluetooth/kdebluetooth.spec
blob: 48e255d67bee1c1ec32c7031b568bd9a95572f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# TDE 3.5.13 specific building variables
%define tde_bindir %{tde_prefix}/bin
%define tde_datadir %{tde_prefix}/share
%define tde_docdir %{tde_datadir}/doc
%define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib}
%define tde_mandir %{tde_datadir}/man
%define tde_appdir %{tde_datadir}/applications

%define tde_tdeappdir %{tde_appdir}/kde
%define tde_tdedocdir %{tde_docdir}/kde
%define tde_tdeincludedir %{tde_includedir}/kde
%define tde_tdelibdir %{tde_libdir}/trinity

%define _docdir %{tde_docdir}


Name:			trinity-kdebluetooth
Version:		1.0_beta9_r769275
Release:		2%{?dist}

Summary:		The TDE Bluetooth Framework

License:		GPLv2+
Group:			Applications/Communications
URL:			http://bluetooth.kmobiletools.org/

Source0:		kdebluetooth_1.0~beta9~r769275.orig.tar.gz
Source1:		kblueplugd.bluez3
Source2:		kblueplugd.bluez4
Source3:		kblueplugd.desktop

Patch1:			kdebluetooth-1.0_beta8-gcc43.patch
Patch2:			kdebluetooth-trinity.patch
Patch3:			kdebluetooth-fix_gcc_46_compilation.patch

Patch4:			kdebluetooth-fix_bluez4_support.patch

Patch11:		kubuntu_01_kdepot.patch
Patch12:		kubuntu_02_desktop_files.patch
Patch13:		kubuntu_06_no_autostart.patch
Patch14:		kubuntu_07_fix_header_include.patch
Patch15:		kubuntu_08_load_kdebluetooth_catalogue.patch
Patch16:		kubuntu_09_french_i18n.patch

BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	gettext
BuildRequires:	desktop-file-utils
BuildRequires:	lockdev-devel
#BuildRequires:	xmms-devel
BuildRequires:	trinity-tdelibs-devel
BuildRequires:	trinity-tdepim-devel
BuildRequires:	openobex-devel >= 1.1
BuildRequires:	libusb-devel
BuildRequires:	pkgconfig
Buildrequires:	libidn-devel
Buildrequires:	dbus-tqt-devel
BuildRequires:	automake >= 1.6.1
BuildRequires:	autoconf >= 2.52
BuildRequires:	obexftp-devel

%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires:	%{_lib}bluez-devel
%else
BuildRequires:	bluez-libs-devel
%endif

# kdesu binary
Requires:		trinity-tdebase-bin

%if 0%{?fedora} >= 8
Provides:		dbus-bluez-pin-helper
%endif

Obsoletes:		%{name}-libs < %{version}-%{release}
Provides:		%{name}-libs = %{version}-%{release}

%description
The KDE Bluetooth Framework is a set of tools built on top of Linux'
Bluetooth (Bluez) stack. The goal is to provide easy access to the most
common Bluetooth profiles and to make data exchange with Bluetooth
enabled devices as straightforward as possible.


%package devel
Summary:	Development files for %{name}
Group:		Development/Libraries
Requires:	trinity-tdelibs-devel
Requires:	bluez-libs-devel


%description devel
KDE Bluetooth framework development libraries and headers.


%prep
%setup -q -n kdebluetooth-1.0~beta9~r769275
%patch1 -p1 -b .gcc43
%patch2 -p1 -b .trinity
%patch3 -p1 -b .gcc46

%if 0%{?rhel} >= 6 || 0%{?fedora} || 0%{?mdkversion} || 0%{?mgaversion}
%patch4 -p1 -b .bluez4
%endif

%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1

# Ugly hack to modify TQT include directory inside autoconf files.
# If TQT detection fails, it fallbacks to TQT4 instead of TQT3 !
%__sed -i "admin/acinclude.m4.in" \
  -e "s|/usr/include/tqt|%{tde_includedir}/tqt|g" \
  -e "s|include/kde|include/tde|g" \
  -e "s|kde_htmldir='.*'|kde_htmldir='%{tde_tdedocdir}/HTML'|g"

%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp -f "/usr/share/libtool/"*"/ltmain.sh" "admin/ltmain.sh" || %__cp -f "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh"
%__make -f "admin/Makefile.common"


%build
unset QTDIR || : ; . /etc/profile.d/qt3.sh
export PATH="%{tde_bindir}:${PATH}"
export LDFLAGS="-L%{tde_libdir} -I%{tde_includedir}"
export KDEDIR=%{tde_prefix}

# FIXME: dbus-tqt headers are not found without this ...
export CXXFLAGS="${CXXFLAGS} -I%{tde_includedir}/dbus-1.0"

%configure \
  --prefix=%{tde_prefix} \
  --exec-prefix=%{tde_prefix} \
  --bindir=%{tde_bindir} \
  --libdir=%{tde_libdir} \
  --includedir=%{tde_tdeincludedir} \
  --datadir=%{tde_datadir} \
  --disable-rpath		\
  --enable-new-ldflags		\
  --disable-debug			\
  --disable-dependency-tracking		\
  --enable-final				\
  --enable-closure			\
  --with-extra-includes=%{tde_includedir}/tqt

%__make %{?_smp_mflags} LIBTOOL=$(which libtool)


%install
export PATH="%{tde_bindir}:${PATH}"
%__rm -rf $RPM_BUILD_ROOT
%__make install DESTDIR=$RPM_BUILD_ROOT

# icons
for DESK_PATH in applications/kde applnk/Utilities ; do
	desktop-file-install												\
		--mode=644														\
		--vendor=""														\
		--dir=$RPM_BUILD_ROOT%{tde_datadir}/applications/kde				\
		--remove-category="Network"										\
		--add-category="System"											\
		--delete-original												\
		$RPM_BUILD_ROOT%{tde_datadir}/$DESK_PATH/*.desktop ||:
done

# Locales
PROG_LIST="kbluelock kbluemon kbluetooth kinputwizard
			kcm_btpaired  kio_bluetooth kio_obex2 kio_sdp
			libkbluetooth kdebluetooth"
for PROG in $PROG_LIST ; do
	%find_lang $PROG && cat $PROG.lang >> %{name}.lang	||:
done

# Unwanted files
%__rm -f %{buildroot}%{_datadir}/applnk/Settings/Network/Bluetooth/.directory
%__rm -f %{buildroot}%{tde_libdir}/*.a
%__rm -f %{buildroot}%{tde_tdelibdir}/kcm_btpaired.a
%__rm -f %{buildroot}%{tde_tdelibdir}/kio_bluetooth.a
%__rm -f %{buildroot}%{tde_tdelibdir}/kio_obex.a
%__rm -f %{buildroot}%{tde_tdelibdir}/kio_sdp.a
%__rm -f %{buildroot}%{tde_datadir}/applnk/Settings/Network/Bluetooth/.directory

# Installs 'kblueplugd'
%if 0%{?rhel} >= 6 || 0%{?fedora} || 0%{?mdkversion} || 0%{?mgaversion}
%__install -D -m 755 %{SOURCE2} %{buildroot}%{tde_bindir}/kblueplugd
%else
%__install -D -m 755 %{SOURCE1} %{buildroot}%{tde_bindir}/kblueplugd
%endif
%__install -D -m 644 %{SOURCE3} %{buildroot}%{tde_datadir}/autostart/kblueplugd.desktop

%clean
%__rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{tde_datadir}/icons/hicolor ||:
gtk-update-icon-cache -qf %{tde_datadir}/icons/hicolor 2> /dev/null ||:
/sbin/ldconfig || :
update-desktop-database %{tde_appdir} 2> /dev/null || : 


%postun
touch --no-create %{tde_datadir}/icons/hicolor ||:
gtk-update-icon-cache -qf %{tde_datadir}/icons/hicolor 2> /dev/null ||:
/sbin/ldconfig || :
update-desktop-database %{tde_appdir} 2> /dev/null || : 

%post devel
/sbin/ldconfig || :

%postun devel
/sbin/ldconfig || :

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING INSTALL README
%{tde_bindir}/kbluelock
%{tde_bindir}/kbluemon
%{tde_bindir}/kblueplugd
%{tde_bindir}/kbluetooth
%{tde_bindir}/kbtobexclient
%{tde_bindir}/kioobex_start
%{tde_bindir}/kinputwizard
%{tde_datadir}/applnk/.hidden/*.desktop
%{tde_datadir}/apps/konqsidebartng/virtual_folders/services/*.desktop
%{tde_datadir}/apps/konqueror/servicemenus/kbtobexclient_sendfile.desktop
%{tde_datadir}/apps/kbtobexclient/kbtobexclientui.rc
%{tde_datadir}/apps/kdebluetooth/
%{tde_tdeappdir}/dunhandler.desktop
%{tde_tdeappdir}/faxhandler.desktop
%{tde_tdeappdir}/kbluelock.desktop
%{tde_tdeappdir}/kbluemon.desktop
%{tde_tdeappdir}/kbluetooth.desktop
%{tde_tdeappdir}/kbtobexclient.desktop
%{tde_tdeappdir}/kbtobexsrv.desktop
%{tde_tdeappdir}/kcm_btpaired.desktop
%{tde_tdeappdir}/kinputwizard.desktop
%{tde_datadir}/autostart/kblueplugd.desktop
%{tde_datadir}/desktop-directories/kde-settings-network-bluetooth.directory
%{tde_datadir}/icons/hicolor/*/apps/kbluetooth.png
%{tde_datadir}/icons/hicolor/*/apps/kdebluetooth.png
%{tde_datadir}/icons/hicolor/*/apps/kbluelock.png
%{tde_datadir}/icons/hicolor/scalable/apps/kdebluetooth.svgz
%{tde_datadir}/mimelnk/bluetooth/av-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/computer-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/dun-profile.desktop
%{tde_datadir}/mimelnk/bluetooth/fax-profile.desktop
%{tde_datadir}/mimelnk/bluetooth/handsfree-profile.desktop
%{tde_datadir}/mimelnk/bluetooth/headset-profile.desktop
%{tde_datadir}/mimelnk/bluetooth/imaging-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/keyboard-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/lan-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/misc-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/mouse-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/obex-ftp-profile.desktop
%{tde_datadir}/mimelnk/bluetooth/obexobjectpush-profile.desktop
%{tde_datadir}/mimelnk/bluetooth/peripheral-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/phone-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/serial-port-profile.desktop
%{tde_datadir}/mimelnk/bluetooth/synchronization-profile.desktop
%{tde_datadir}/mimelnk/bluetooth/unknown-device-class.desktop
%{tde_datadir}/mimelnk/bluetooth/unknown-profile.desktop
%{tde_datadir}/services/bluetooth.protocol
%{tde_datadir}/services/btsdp.protocol
%{tde_datadir}/services/kbluetooth_kbtobexsrv.desktop
%{tde_datadir}/services/kbluetooth_kbtobexsrv.sdp.xml
%{tde_datadir}/services/obex.protocol
%{tde_datadir}/services/sdpmime-dun-profile.desktop
%{tde_datadir}/services/sdpmime-fax-profile.desktop
%{tde_datadir}/services/sdpmime-handsfree-profile.desktop
%{tde_datadir}/services/sdpmime-headset-profile.desktop
%{tde_datadir}/services/sdpmime-obex-client-profile.desktop
%{tde_datadir}/services/sdpmime-obex-ftp-profile.desktop
%{tde_datadir}/services/sdpmime-serial-port-profile.desktop
%{tde_datadir}/services/sdpmime-synchronization-profile.desktop
%{tde_datadir}/servicetypes/sdpservicehandler.desktop
%{tde_libdir}/kdebluetooth/servers/kbtobexsrv
%{tde_libdir}/libkbluetooth.so.0
%{tde_libdir}/libkbluetooth.so.0.0.0
%{tde_libdir}/libqobex.so.0
%{tde_libdir}/libqobex.so.0.0.9
%{tde_tdelibdir}/kcm_btpaired.la
%{tde_tdelibdir}/kcm_btpaired.so
%{tde_tdelibdir}/kio_bluetooth.la
%{tde_tdelibdir}/kio_bluetooth.so
%{tde_tdelibdir}/kio_obex.la
%{tde_tdelibdir}/kio_obex.so
%{tde_tdelibdir}/kio_sdp.la
%{tde_tdelibdir}/kio_sdp.so
%lang(ca) %{tde_tdedocdir}/HTML/ca/kdebluetooth/
%lang(da) %{tde_tdedocdir}/HTML/da/kdebluetooth/
%lang(en) %{tde_tdedocdir}/HTML/en/kdebluetooth/
%lang(es) %{tde_tdedocdir}/HTML/es/kdebluetooth/
%lang(et) %{tde_tdedocdir}/HTML/et/kdebluetooth/
%lang(fr) %{tde_tdedocdir}/HTML/fr/kdebluetooth/
%lang(it) %{tde_tdedocdir}/HTML/it/kdebluetooth/
%lang(nl) %{tde_tdedocdir}/HTML/nl/kdebluetooth/
%lang(pt) %{tde_tdedocdir}/HTML/pt/kdebluetooth/
%lang(ru) %{tde_tdedocdir}/HTML/ru/kdebluetooth/
%lang(sv) %{tde_tdedocdir}/HTML/sv/kdebluetooth/



%files devel
%defattr(-,root,root,-)
%{tde_tdeincludedir}/libkbluetooth/
%{tde_tdeincludedir}/qobex/
%{tde_libdir}/libkbluetooth.la
%{tde_libdir}/libkbluetooth.so
%{tde_libdir}/libqobex.la
%{tde_libdir}/libqobex.so


%changelog