summaryrefslogtreecommitdiffstats
path: root/opensuse/core/qt3/qt3-extensions.spec.in
blob: 736f1ae2b8e047296e7b81d751ea30afa5ca667d (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
#
# spec file for package qt3-extensions (Version 3.3.8d)
#
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org
#

# norootforbuild

Name:         qt3-extensions
BuildRequires: cups-devel krb5-devel mysql-devel postgresql-devel qt3-devel sqlite2-devel unixODBC-devel update-desktop-files
%if %suse_version > 1020
BuildRequires: fdupes
%endif
License:      GPL, QPL
Version:      3.3.8d
Release:      1
Autoreqprov:  on
Requires:     qt3 = %version
Group:        Development/Tools/Other
Summary:      Qt3 Extensions
# COMMON-BEGIN
# COMMON-END

%description
Qt is a program library for developing applications with graphical user
interfaces. It allows you to rapidly develop professional programs. The
Qt library is available not only for Linux but for a great number of
Unices and even for Windows. Thus it is possible to write programs that
may be easily ported to those platforms.

You need a license for using Qt with a non-GPL application, which can
be acquired from sales@trolltech.com.

See /usr/share/doc/packages/qt3 for details about the new features of
the current Qt library!

%package -n qt3-devel-examples
Summary:      Programming Examples for Qt 3
Autoreqprov:  on
Group:        Development/Sources
Provides:     qt3-examples
Obsoletes:    qt3-examples

%description  -n qt3-devel-examples
Qt is a program library for developing applications with graphical user
interfaces. It allows you to rapidly develop professional programs. The
Qt library is available not only for Linux but for a great number of
Unices and even for Windows. Thus it is possible to write programs that
may be easily ported to those platforms.

You need a license for using Qt with a non-GPL application, which can
be acquired from sales@trolltech.com.

See /usr/share/doc/packages/qt3 for details about the new features of
the current Qt library!

%package -n qt3-mysql
Summary:      MySQL Plug-In for Qt
Provides:     qt3_database_plugin
Group:        Productivity/Databases/Clients

%description  -n qt3-mysql
Qt is a program library for developing applications with graphical user
interfaces. It allows you to rapidly develop professional programs. The
Qt library is available not only for Linux but for a great number of
Unices and even for Windows. Thus it is possible to write programs that
may be easily ported to those platforms.

You need a license for using Qt with a non-GPL application, which can
be acquired from sales@trolltech.com.

See /usr/share/doc/packages/qt3 for details about the new features of
the current Qt library!

%package -n qt3-unixODBC
Summary:      A UnixODBC Plug-In for Qt
Provides:     qt3_database_plugin
Group:        Productivity/Databases/Clients

%description  -n qt3-unixODBC
Qt is a program library for developing applications with graphical user
interfaces. It allows you to rapidly develop professional programs. The
Qt library is available not only for Linux but for a great number of
Unices and even for Windows. Thus it is possible to write programs that
may be easily ported to those platforms.

You need a license for using Qt with a non-GPL application, which can
be acquired from sales@trolltech.com.

See /usr/share/doc/packages/qt3 for details about the new features of
the current Qt library!

%package -n qt3-postgresql
Summary:      A PostgreSQL Plug-In for Qt
Provides:     qt3_database_plugin
Group:        Productivity/Databases/Clients

%description  -n qt3-postgresql
Qt is a program library for developing applications with graphical user
interfaces. It allows you to rapidly develop professional programs. The
Qt library is available not only for Linux but for a great number of
Unices and even for Windows. Thus it is possible to write programs that
may be easily ported to those platforms.

You need a license for using Qt with a non-GPL application, which can
be acquired from sales@trolltech.com.

See /usr/share/doc/packages/qt3 for details about the new features of
the current Qt library!

%package -n qt3-sqlite
Summary:      SQLite Database Plug-In for Qt
Provides:     qt3_database_plugin
Group:        Development/Tools/Other

%description  -n qt3-sqlite
Qt is a program library for developing applications with graphical user
interfaces. It allows you to rapidly develop professional programs. The
Qt library is available not only for Linux but for a great number of
Unices and even for Windows. Thus it is possible to write programs that
may be easily ported to those platforms.

You need a license for using Qt with a non-GPL application, which can
be acquired from sales@trolltech.com.

See /usr/share/doc/packages/qt3 for details about the new features of
the current Qt library!

%package  -n qt3-devel-tools
Summary:      User Interface Builder and other tools (designer, assistant, linguist)
Autoreqprov:  on
Requires:     qt3-devel = %version
Provides:     qt3-designer
Obsoletes:    qt3-designer
Group:        Development/Tools/GUI Builders

%description  -n qt3-devel-tools
Qt is a program library for developing applications with graphical user
interfaces. It allows you to rapidly develop professional programs. The
Qt library is available not only for Linux but for a great number of
Unices and even for Windows. Thus it is possible to write programs that
may be easily ported to those platforms.

You need a license for using Qt with a non-GPL application, which can
be acquired from sales@trolltech.com.

See /usr/share/doc/packages/qt3 for details about the new features of
the current Qt library!

%package -n qt3-man
Summary:      Qt 3 Man Pages
Autoreqprov:  on
Requires:     qt3-devel = %version
Conflicts:    qtman qt-man
Group:        Documentation/Man

%description -n qt3-man
Qt is a program library for developing applications with graphical user
interfaces. It allows you to rapidly develop professional programs. The
Qt library is available not only for Linux but for a great number of
Unices and even for Windows. Thus it is possible to write programs that
may be easily ported to those platforms.

You need a license for using Qt with a non-GPL application, which can
be acquired from sales@trolltech.com.

See /usr/share/doc/packages/qt3 for details about the new features of
the current Qt library!

%build
export QTDIR=/usr/lib/qt3/
export WLIB=%_lib
export VERSION=%suse_version
source %{SOURCE1} %{version}
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
#
# compile threaded version to build all tools.
# the lib itself becomes packaged from qt3.spec
#
call_configure -thread -shared -L$PWD/%_lib $OPTIONS
ln -sf /usr/lib/qt3/%_lib/* lib/
ln -sf /usr/lib/qt3/bin/* bin/
cd plugins/src
make %{?jobs:-j%jobs}
make INSTALL_ROOT=$RPM_BUILD_ROOT install
cd -
#
# build examples
#
cd tools/assistant/lib
make %{?jobs:-j%jobs}
cd -
cd examples
make %{?jobs:-j%jobs}
cd -
#
# build extra tools
#
cd tools
make %{?jobs:-j%jobs}
make INSTALL_ROOT=$RPM_BUILD_ROOT install
for i in qvfb qembed qconfig msg2qm mergetr ; do
  cd "$i" && make %{?jobs:-j%jobs} && install -m 0755 $i ${RPM_BUILD_ROOT}/usr/lib/qt3/bin/ && cd -
done
cd ..
install -m 0755 bin/findtr bin/qt20fix bin/qtrename140 ${RPM_BUILD_ROOT}/usr/lib/qt3/bin/
if [ %_lib = lib64 ]; then
 for i in $RPM_BUILD_ROOT/usr/lib/qt3/plugins/*/*.so; do
   mv "$i" "${i%.so}.lib64.so"
 done
fi

%install
export WLIB=%_lib
export VERSION=%suse_version
source %{SOURCE1}
post_install $RPM_BUILD_ROOT/usr/lib/qt3/
#
# create default doc dir
#
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_docdir}/qt3/
#
# create links in ld.so.conf path
#
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_libdir}
#install -d -m 0755 ${RPM_BUILD_ROOT}/usr/bin/
#ln -sf ../lib/qt3/bin/designer     ${RPM_BUILD_ROOT}/usr/bin/designer
#ln -sf ../lib/qt3/bin/linguist     ${RPM_BUILD_ROOT}/usr/bin/linguist
%suse_update_desktop_file -i designer  Qt Development GUIDesigner
%suse_update_desktop_file -i linguist  Qt Development Translation
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
perl -pi -e 's/Icon=designer/Icon=designer3/' ${RPM_BUILD_ROOT}/usr/share/applications/designer.desktop
perl -pi -e 's,Exec=designer,Exec=/usr/lib/qt3/bin/designer,' ${RPM_BUILD_ROOT}/usr/share/applications/designer.desktop
mv ${RPM_BUILD_ROOT}/usr/share/applications/designer.desktop ${RPM_BUILD_ROOT}/usr/share/applications/designer3.desktop
install -m 0644 tools/assistant/images/designer.png $RPM_BUILD_ROOT/usr/share/pixmaps/designer3.png
rm -f ${RPM_BUILD_ROOT}/usr/share/pixmaps/designer.png
perl -pi -e 's,Exec=linguist,Exec=/usr/lib/qt3/bin/linguist,' ${RPM_BUILD_ROOT}/usr/share/applications/linguist.desktop
perl -pi -e 's,Icon=linguist,Icon=linguist3,' ${RPM_BUILD_ROOT}/usr/share/applications/linguist.desktop
mv ${RPM_BUILD_ROOT}/usr/share/pixmaps/linguist.png ${RPM_BUILD_ROOT}/usr/share/pixmaps/linguist3.png

##### these files are not getting installed by "make install" ... bug ?
#
#
# install manpages
#
rm -rf $RPM_BUILD_ROOT/%{_mandir}
install -d  $RPM_BUILD_ROOT/%{_mandir}
cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}/
#
# install examples
#
install -d  ${RPM_BUILD_ROOT}/usr/lib/qt3/doc/
find ./examples/ \
  -name \*.o -o -name .obj -o -name .moc -o -name Makefile \
  | xargs rm -rf
cp -a examples ${RPM_BUILD_ROOT}/usr/lib/qt3/doc/
ln -sf /usr/lib/qt3/doc/examples ${RPM_BUILD_ROOT}/%{_docdir}/qt3/
#
# to be sure we do not package files which are packaged in other qt3 packages
#
rpm -ql qt3 qt3-devel qt3-devel-doc \
 | while read i ; do 
   [ -d "$i" ] || rm -f $RPM_BUILD_ROOT/"$i"
done
#
# we do have them in qt3-devel-doc already
#
rm -f $RPM_BUILD_ROOT/usr/lib/qt3/bin/assistant
rm -f $RPM_BUILD_ROOT/usr/lib/qt3/%_lib/libqassistantclient.*
rm -f $RPM_BUILD_ROOT/usr/lib/qt3/translations/assistant_de.qm

for l in $RPM_BUILD_ROOT/usr/lib/qt3/%_lib/*.a; do
  strip --strip-unneeded $l
done

%if %suse_version > 1020
%fdupes -s $RPM_BUILD_ROOT
%endif


%pre
if test -L usr/lib/qt3; then
  rm usr/lib/qt3
fi

%clean
rm -rf ${RPM_BUILD_ROOT}

%post
%run_ldconfig

%post -n qt3-devel-tools
%run_ldconfig

%files
%defattr(-,root,root)
/usr/lib/qt3/bin/qembed
/usr/lib/qt3/bin/qvfb

%files -n qt3-mysql
%defattr(-,root,root)
%dir /usr/lib/qt3/plugins/sqldrivers
/usr/lib/qt3/plugins/sqldrivers/libqsqlmysql*.so

%files -n qt3-postgresql
%defattr(-,root,root)
%dir /usr/lib/qt3/plugins/sqldrivers
/usr/lib/qt3/plugins/sqldrivers/libqsqlpsql*.so

%files -n qt3-unixODBC
%defattr(-,root,root)
%dir /usr/lib/qt3/plugins/sqldrivers
/usr/lib/qt3/plugins/sqldrivers/libqsqlodbc*.so

%files -n qt3-sqlite
%defattr(-,root,root)
%dir /usr/lib/qt3/plugins/sqldrivers
/usr/lib/qt3/plugins/sqldrivers/libqsqlite*.so

%files -n qt3-devel-tools
%defattr(-,root,root)
#/usr/bin/designer
#/usr/bin/linguist
/usr/lib/qt3/bin/createcw
/usr/lib/qt3/bin/makeqpf
/usr/lib/qt3/bin/qconfig
/usr/lib/qt3/bin/findtr
/usr/lib/qt3/bin/qt20fix
/usr/lib/qt3/bin/qtrename140
/usr/lib/qt3/bin/msg2qm
/usr/lib/qt3/bin/mergetr
/usr/lib/qt3/bin/designer
/usr/lib/qt3/bin/linguist
/usr/lib/qt3/bin/qm2ts
/usr/lib/qt3/bin/lrelease
/usr/lib/qt3/bin/lupdate
/usr/lib/qt3/templates
/usr/lib/qt3/plugins/designer
/usr/lib/qt3/phrasebooks
/usr/lib/qt3/%_lib/libdesignercore.*
/usr/lib/qt3/%_lib/libeditor.*
/usr/share/applications/*
/usr/share/pixmaps/designer3.png
/usr/share/pixmaps/linguist3.png

%files -n qt3-devel-examples
%defattr(-,root,root)
%dir /usr/lib/qt3/doc
/%{_docdir}/qt3/examples
/usr/lib/qt3/doc/examples

%files -n qt3-man
%defattr(-,root,root)
%{_mandir}/man*/*

%changelog -n qt3-extensions