summaryrefslogtreecommitdiffstats
path: root/redhat/kdelibs/trinity-kdelibs-3.5.12.spec
blob: 7732731f0a6b146c145057f13a6e749879cf3d19 (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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# Default version for this component
%if "%{?version}" == ""
%define version 3.5.12
%endif
%define release 10

# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
%define _variant .opt
%define _docdir %{_prefix}/share/doc
%endif

# TDE 3.5.12 specific variables
BuildRequires:	autoconf automake libtool m4
%define tde_docdir %{_docdir}
%define tde_libdir %{_libdir}/kde3

# Older RHEL/Fedora versions use packages named "qt", "qt-devel", ..
# whereas newer versions use "qt3", "qt3-devel" ...
%if 0%{?rhel} >= 6 || 0%{?fedora} >= 8
%define _qt_suffix 3
%endif


Name:		trinity-kdelibs
Version:	%{version}
Release:	%{?release}%{?dist}%{?_variant}
License:	GPL
Summary:	TDE Libraries
Group:		System Environment/Libraries

Vendor:		Trinity Project
Packager:	Francois Andriot <francois.andriot@free.fr>
URL:		http://www.trinitydesktop.org/

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

Source0:	kdelibs-%{version}.tar.gz

# TDE 3.5.12 patches for RHEL/Fedora build
## [kdelibs/kio/kio] Removes the maximum line length detection
Patch0:		kdelibs-3.5.13-maxlinelength.patch
## [kdecore] sets TDE 3.5.12 defaults directories
Patch1:		kdelibs-3.5.12-kstandarddirs_trinity.patch
## [kdelibs/kdecore] fixed a conflict between fixx11h.h and Xdefs.h
Patch2:		kdelibs-3.5.12-fixx11h.patch

BuildRequires:	libtool
BuildRequires:	tqtinterface-devel
BuildRequires:	trinity-arts-devel
BuildRequires:	avahi-devel
BuildRequires:	lua-devel
BuildRequires:	krb5-devel libxslt-devel cups-devel libart_lgpl-devel pcre-devel
BuildRequires:	libutempter-devel
BuildRequires:	bzip2-devel
BuildRequires:	openssl-devel
BuildRequires:	gcc-c++
BuildRequires:	alsa-lib-devel
BuildRequires:	libidn-devel
BuildRequires:	qt%{?_qt_suffix}-devel
BuildRequires:	avahi-qt3-devel
BuildRequires:	jasper-devel
BuildRequires:	libtiff-devel
BuildRequires:	OpenEXR-devel
BuildRequires:	libtool-ltdl-devel
BuildRequires:	glib2-devel

Requires:		tqtinterface
Requires:		trinity-arts
Requires:		avahi
Requires:		qt%{?_qt_suffix}
Requires:		avahi-qt3


#Provides:	kdelibs%{?_qt_suffix} = %{version}
%if "%{?_prefix}" == "/usr"
Obsoletes:		kdelibs%{?_qt_suffix} <= 3.5.10
%endif

%description
Libraries for the Trinity Desktop Environment:
KDE Libraries included: kdecore (KDE core library), kdeui (user interface),
kfm (file manager), khtmlw (HTML widget), kio (Input/Output, networking),
kspell (spelling checker), jscript (javascript), kab (addressbook),
kimgio (image manipulation).


%package devel
Summary:	%{name} - Development files
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	kdelibs%{?_qt_suffix}-devel = %{version}
%if "%{?_prefix}" == "/usr"
Obsoletes:	kdelibs%{?_qt_suffix}-devel <= 3.5.10
%endif

%description devel
This package includes the header files you will need to compile
applications for TDE.

%package apidocs
Group:		Development/Libraries
Summary:	%{name} - API documentation
Requires:	%{name} = %{version}-%{release}
Provides:	kdelibs%{?_qt_suffix}-apidocs = %{version}
%if "%{?_prefix}" == "/usr"
Obsoletes:	kdelibs%{?_qt_suffix}-apidocs <= 3.5.10
%endif

%description apidocs
This package includes the TDE API documentation in HTML
format for easy browsing


%prep
%setup -q -n kdelibs
%patch0 -p1
%patch1 -p1
%patch2 -p3

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


%build
unset QTDIR || : ; . /etc/profile.d/qt.sh
export PATH="%{_bindir}:${PATH}"
export LD_LIBRARY_PATH="%{_libdir}"
export LDFLAGS="-L%{_libdir} -I%{_includedir}"

# On older RHEL, libXrandr is too old so krandr cannot be compiled.
# Kspell2 does not compile either.
%if 0%{?rhel} && 0%{?rhel} <= 5
export DO_NOT_COMPILE="krandr"
%endif

%configure \
  --disable-rpath \
  --enable-new-ldflags \
  --disable-dependency-tracking \
  --disable-debug --disable-warnings --enable-final \
  --disable-fast-malloc \
  --enable-cups \
  --enable-mitshm \
  --enable-pie \
  --enable-sendfile \
  --with-distribution="$(cat /etc/redhat-release 2>/dev/null)" \
  --with-alsa \
  --without-aspell \
  --without-hspell \
  --disable-libfam \
  --enable-dnotify \
  --enable-inotify \
  --with-utempter \
  --with-jasper \
  --with-openexr \
  --with-xinerama \
  --enable-closure \
  --with-extra-includes=%{_includedir}/tqt
  
# Do NOT use %{?_smp_mflags} for this package, or it will fail to build !
%__make


%install
%__rm -rf %{?buildroot}
%__make install DESTDIR=%{?buildroot}

%if "%{?_prefix}" != "/usr"
%__mkdir_p "%{?buildroot}%{_sysconfdir}/ld.so.conf.d"
cat <<EOF >"%{?buildroot}%{_sysconfdir}/ld.so.conf.d/trinity.conf"
%{_libdir}
EOF
%endif

# Moves the XDG configuration files to TDE directory
%if "%{_prefix}" != "/usr"
%__install -p -D -m644 \
	"%{?buildroot}%{_sysconfdir}/xdg/menus/applications.menu" \
	"%{?buildroot}%{_prefix}/etc/xdg/menus/kde-applications.menu"
%__rm -rf "%{?buildroot}%{_sysconfdir}/xdg"
%else
%__mv -f "%{?buildroot}%{_sysconfdir}/xdg/menus/applications.menu" "%{?buildroot}%{_sysconfdir}/xdg/menus/kde-applications.menu"
%endif


%clean
%__rm -rf %{?buildroot}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING* README TODO
%{_bindir}/artsmessage
%{_bindir}/cupsdconf
%{_bindir}/cupsdoprint
%{_bindir}/dcop
%{_bindir}/dcopclient
%{_bindir}/dcopfind
%{_bindir}/dcopobject
%{_bindir}/dcopquit
%{_bindir}/dcopref
%{_bindir}/dcopserver
%{_bindir}/dcopserver_shutdown
%{_bindir}/dcopstart
%{_bindir}/filesharelist
%{_bindir}/fileshareset
%{_bindir}/imagetops
%{_bindir}/kab2kabc
%{_bindir}/kaddprinterwizard
%{_bindir}/kbuildsycoca
%{_bindir}/kcmshell
%{_bindir}/kconf_update
%{_bindir}/kcookiejar
%{_bindir}/kde-config
%{_bindir}/kde-menu
%{_bindir}/kded
%{_bindir}/kdeinit
%{_bindir}/kdeinit_shutdown
%{_bindir}/kdeinit_wrapper
%{_bindir}/kdesu_stub
%{_bindir}/kdontchangethehostname
%{_bindir}/kdostartupconfig
%{_bindir}/kfile
%{_bindir}/kfmexec
%{_bindir}/khotnewstuff
%{_bindir}/kinstalltheme
%{_bindir}/kio_http_cache_cleaner
%{_bindir}/kio_uiserver
%{_bindir}/kioexec
%{_bindir}/kioslave
%{_bindir}/klauncher
%{_bindir}/kmailservice
%{_bindir}/kmimelist
%attr(4755,root,root) %{_bindir}/kpac_dhcp_helper
%{_bindir}/ksendbugmail
%{_bindir}/kshell
%{_bindir}/kstartupconfig
%{_bindir}/ktelnetservice
%{_bindir}/ktradertest
%{_bindir}/kwrapper
%{_bindir}/lnusertemp
%{_bindir}/make_driver_db_cups
%{_bindir}/make_driver_db_lpr
%{_bindir}/meinproc
%{_bindir}/networkstatustestservice
%{_bindir}/start_kdeinit
%{_bindir}/start_kdeinit_wrapper
%attr(4755,root,root) %{_bindir}/kgrantpty
%{_libdir}/lib*.so.*
%{_libdir}/libkdeinit_*.so
%{_libdir}/lib*.la
%{tde_libdir}/
%{_datadir}/applications/kde/*.desktop
%{_datadir}/autostart/kab2kabc.desktop
%{_datadir}/applnk/kio_iso.desktop
%{_datadir}/apps/*
%exclude %{_datadir}/apps/ksgmltools2/
%config(noreplace) %{_datadir}/config/*
%{_datadir}/emoticons/*
%{_datadir}/icons/default.kde
%{_datadir}/mimelnk/magic
%{_datadir}/mimelnk/*/*.desktop
%{_datadir}/services/*
%{_datadir}/servicetypes/*
%{_datadir}/icons/crystalsvg/
%{tde_docdir}/HTML/en/kspell
# remove conflicts with kdelibs-4
%if "%{?_prefix}" != "/usr"
%{_bindir}/checkXML
%{_bindir}/ksvgtopng
%{_bindir}/kunittestmodrunner
%{_bindir}/preparetips
%{_datadir}/icons/hicolor/index.theme
%{_datadir}/locale/all_languages
%{tde_docdir}/HTML/en/common/*
%else
%exclude %{_bindir}/checkXML
%exclude %{_bindir}/ksvgtopng
%exclude %{_bindir}/kunittestmodrunner
%exclude %{_bindir}/preparetips
%exclude %{_datadir}/config/colors
%exclude %{_datadir}/config/kdebug.areas
%exclude %{_datadir}/config/kdebugrc
%exclude %{_datadir}/config/ksslcalist
%exclude %{_datadir}/config/ui/ui_standards.rc
%exclude %{_datadir}/icons/hicolor/index.theme
%exclude %{_datadir}/locale/all_languages
%exclude %{tde_docdir}/HTML/en/common/*
%endif
# ld.so.conf needed only if installed under '/opt/trinity'
%if "%{?_prefix}" != "/usr"
%{_sysconfdir}/ld.so.conf.d/trinity.conf
%endif

# Avoid conflict with 'redhat-menus' package
%if "%{_prefix}" == "/usr"
%{_sysconfdir}/xdg/menus/kde-applications.menu
%else
%{_prefix}/etc/xdg/menus/kde-applications.menu
%endif

%files devel
%defattr(-,root,root,-)
%{_bindir}/dcopidl*
%{_bindir}/kconfig_compiler
%{_bindir}/makekdewidgets
%{_datadir}/apps/ksgmltools2/
%{_includedir}/
%{_libdir}/lib*.so
%{_libdir}/lib*.a
%exclude %{_libdir}/libkdeinit_*.so

%files apidocs
%defattr(-,root,root,-)
%{_docdir}/%{name}-%{version}/
%{tde_docdir}/HTML/en/kdelibs*


%changelog
* Fri Dec 09 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-10
- Fix conflict with distro-provided KDE
- Fix HTML directory location
- Change defaults TDE directory to '/etc/trinity' and '~/.trinity'
- Removes 'ld.so.conf.d' when installed under '/usr'

* Sun Nov 29 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-9
- Moves XDG files in TDE prefix to avoid conflict with distro-provided KDE
- Disable 'max line length' detection
- Add missing BuildRequires

* Fri Sep 16 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-8
- Add support for RHEL 5.

* Thu Sep 15 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-7
- Add missings 'BuildRequires'
- Re-add lost 'ld.so.conf' file

* Mon Sep 12 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-6
- Add "Group" field

* Sun Sep 04 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-5
- Import to GIT
- Removes cmake stuff, build with autotools only

* Tue Aug 23 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-4
- Add missing BuildRequires

* Mon Aug 22 2011 Francois Andriot <francois.andriot@free.fr> - 3.5.12-3
- Correct macro to install under "/opt", if desired

* Sun Dec 19 2010 Francois Andriot <francois.andriot@free.fr> - 3.5.12-2
- Rebuilt 

* Fri Dec 17 2010 Francois Andriot <francois.andriot@free.fr> - 3.5.12-1
- Add macro _kde3_prefix to define custom installation prefix (ex: /opt/trinity)
- Add '--with-extra-includes=%{_includedir}/tqt'

* Wed Dec 14 2010 Francois Andriot <francois.andriot@free.fr> - 3.5.12-0
- Initial version