]> git.saurik.com Git - wxWidgets.git/blame - wxMotif.spec
added comments to the makefile; added WX_CONFIG var to be able to use a different...
[wxWidgets.git] / wxMotif.spec
CommitLineData
f6bcfd97
BP
1# RPM .spec file for wxMotif. Based on the .spec file for wxGTK
2# (c) by Robert Roebling. Modifications (c) 2000/03 by Robert Fendt.
3
a622c152
RR
4# Note that this is NOT a relocatable package
5%define pref /usr
93f467a3 6%define ver 2.5.1
c31752da 7%define ver2 2.5
014e19de 8%define rel 1
a622c152 9
4eba1840
VS
10%define portname motif
11%define name wx-%{portname}
12%define wxbasename wx-base
13%define wxconfigname wx%{portname}-%{ver2}-config
14
f6bcfd97 15Summary: The Motif/Lesstif port of the wxWindows library
4eba1840 16Name: %{name}
a622c152
RR
17Version: %{ver}
18Release: %{rel}
4eba1840 19License: wxWindows Licence
a622c152 20Group: X11/Libraries
a3e78c76 21Source: wxMOTIF-%{ver}.tar.bz2
f6bcfd97
BP
22URL: http://www.wxwindows.org
23Packager: Robert Fendt <rfendt@myokay.net>
a622c152
RR
24BuildRoot: /tmp/wxmotif_root
25
26# all packages providing an implementation of wxWindows library (regardless of
27# the toolkit used) should provide the (virtual) wxwin package, this makes it
6e711d5c 28# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
a622c152
RR
29Provides: wxwin
30
4eba1840
VS
31Provides: wxMotif
32
33Requires: %{wxbasename} = %{ver}
4eba1840 34
a622c152
RR
35%description
36wxWindows is a free C++ library for cross-platform GUI development.
37With wxWindows, you can create applications for different GUIs (GTK+,
38Motif/LessTif, MS Windows, Mac) from the same source code.
39
f6bcfd97
BP
40%package devel
41Summary: The Motif/Lesstif port of the wxWindows library
42Group: X11/Libraries
4eba1840
VS
43Requires: %{name} = %{ver}
44Requires: %{wxbasename}-devel = %{ver}
f6bcfd97
BP
45
46%description devel
47Header files for wxMotif, the Motif/Lesstif port of the wxWindows library.
48
49%package gl
406e3e0d 50Summary: The Motif/Lesstif port of the wxWindows library, OpenGL add-on.
f6bcfd97 51Group: X11/Libraries
4eba1840 52Requires: %{name} = %{ver}
f6bcfd97
BP
53
54%description gl
406e3e0d
VS
55OpenGL add-on library for wxMotif, the Motif/Lesstif port of the wxWindows library.
56
57%package static
58Summary: wxMotif static libraries
59Group: Development/Libraries
60
61%description static
62Static libraries for wxMotif. You need them if you want to link statically against wxMotif.
63
a622c152 64%prep
4eba1840 65%setup -q -n wxMOTIF-%{ver}
a622c152
RR
66
67%build
f6bcfd97
BP
68if [ "$SMP" != "" ]; then
69 export MAKE="make -j$SMP"
70else
71 export MAKE="make"
72fi
406e3e0d 73
406e3e0d
VS
74mkdir obj-shared
75cd obj-shared
86ec2935 76../configure --prefix=%{pref} --with-odbc --with-opengl --with-motif
f6bcfd97 77$MAKE
406e3e0d
VS
78cd ..
79
80mkdir obj-static
81cd obj-static
82../configure --prefix=%{pref} --disable-shared --with-odbc --with-opengl --with-motif
83$MAKE
84cd ..
a622c152
RR
85
86%install
87rm -rf $RPM_BUILD_ROOT
406e3e0d
VS
88(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
89(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
a622c152 90
4eba1840 91# Remove headers that are part of wx-base-devel:
d10382ab
VS
92
93# --- wxBase headers list begins here ---
94cat <<EOF >wxbase-headers-list
95wx/afterstd.h
96wx/app.h
97wx/apptrait.h
98wx/arrimpl.cpp
99wx/arrstr.h
100wx/beforestd.h
101wx/buffer.h
102wx/build.h
103wx/chkconf.h
104wx/clntdata.h
105wx/cmdline.h
106wx/confbase.h
107wx/config.h
108wx/containr.h
109wx/datetime.h
110wx/datetime.inl
111wx/datstrm.h
112wx/dde.h
113wx/debug.h
114wx/defs.h
115wx/dir.h
20b35a69 116wx/dlimpexp.h
d10382ab
VS
117wx/dynarray.h
118wx/dynlib.h
119wx/dynload.h
120wx/encconv.h
121wx/event.h
671a85ea 122wx/except.h
d10382ab
VS
123wx/features.h
124wx/ffile.h
125wx/file.h
126wx/fileconf.h
127wx/filefn.h
128wx/filename.h
129wx/filesys.h
130wx/fontenc.h
131wx/fontmap.h
132wx/fs_mem.h
133wx/fs_zip.h
b71531ad 134wx/gzstream.h
d10382ab
VS
135wx/hash.h
136wx/hashmap.h
137wx/hashset.h
138wx/iconloc.h
139wx/init.h
140wx/intl.h
141wx/iosfwrap.h
142wx/ioswrap.h
143wx/ipc.h
144wx/ipcbase.h
145wx/isql.h
146wx/isqlext.h
147wx/list.h
148wx/listimpl.cpp
149wx/log.h
150wx/longlong.h
151wx/math.h
152wx/memconf.h
153wx/memory.h
154wx/memtext.h
155wx/mimetype.h
156wx/module.h
157wx/msgout.h
158wx/msgout.h
159wx/mstream.h
160wx/object.h
161wx/platform.h
162wx/process.h
163wx/ptr_scpd.h
164wx/regex.h
165wx/scopeguard.h
166wx/snglinst.h
b71531ad 167wx/stack.h
d10382ab
VS
168wx/stopwatch.h
169wx/strconv.h
170wx/stream.h
171wx/string.h
172wx/sysopt.h
173wx/textbuf.h
174wx/textfile.h
175wx/thread.h
176wx/thrimpl.cpp
177wx/timer.h
178wx/tokenzr.h
179wx/txtstrm.h
180wx/types.h
181wx/utils.h
182wx/variant.h
183wx/vector.h
184wx/version.h
185wx/volume.h
186wx/wfstream.h
187wx/wx.h
188wx/wxchar.h
189wx/wxprec.h
190wx/xti.h
191wx/xtistrm.h
192wx/zipstrm.h
193wx/zstream.h
194wx/msw/apptrait.h
195wx/msw/apptbase.h
196wx/msw/chkconf.h
197wx/msw/crashrpt.h
198wx/msw/dde.h
199wx/msw/gccpriv.h
200wx/msw/mimetype.h
201wx/msw/winundef.h
202wx/msw/wrapcctl.h
203wx/msw/wrapwin.h
204wx/fs_inet.h
205wx/gsocket.h
206wx/protocol/file.h
207wx/protocol/ftp.h
208wx/protocol/http.h
209wx/protocol/protocol.h
210wx/sckaddr.h
211wx/sckipc.h
212wx/sckstrm.h
213wx/socket.h
214wx/url.h
215wx/msw/gsockmsw.h
216wx/xml/xml.h
217wx/xtixml.h
218wx/db.h
219wx/dbkeyg.h
220wx/dbtable.h
221EOF
222# --- wxBase headers list ends here ---
223for f in `cat wxbase-headers-list` ; do
224 rm -f $RPM_BUILD_ROOT%{_includedir}/$f
4eba1840 225done
4eba1840
VS
226
227# list of all core headers:
228find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
229
88e3652f
VS
230# remove wxBase files so that RPM doesn't complain about unpackaged files:
231rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
232rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
233rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
234
acea2a0b 235
a622c152
RR
236%clean
237rm -rf $RPM_BUILD_ROOT
238
239%post
240/sbin/ldconfig
241
242%postun
243/sbin/ldconfig
244
a3e78c76
VS
245%post gl
246/sbin/ldconfig
247
248%postun gl
249/sbin/ldconfig
250
251%post devel
252# Install wx-config if there isn't any
253if test ! -f %{_bindir}/wx-config ; then
4eba1840 254 ln -sf %{wxconfigname} %{_bindir}/wx-config
a3e78c76
VS
255fi
256
257%preun devel
258# Remove wx-config if it points to this package
259if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
4eba1840 260 SUM1=`md5sum %{_bindir}/%{wxconfigname} | cut -c 0-32`
a3e78c76
VS
261 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
262 if test "x$SUM1" = "x$SUM2" ; then
263 rm -f %{_bindir}/wx-config
264 fi
265fi
266
267
4eba1840
VS
268%files
269%defattr(-,root,root)
a3e78c76
VS
270%doc COPYING.LIB *.txt
271%dir %{_datadir}/wx
272%{_datadir}/wx/*
4eba1840
VS
273%{_libdir}/libwx_%{portname}*_core*.so.*
274%{_libdir}/libwx_%{portname}*_html*.so.*
275%{_libdir}/libwx_%{portname}*_adv*.so.*
276%{_libdir}/libwx_%{portname}*_dbgrid*.so.*
f6bcfd97 277
4eba1840
VS
278%files devel -f core-headers.files
279%defattr(-,root,root)
280%{_libdir}/libwx_%{portname}*_core*.so
281%{_libdir}/libwx_%{portname}*_html*.so
282%{_libdir}/libwx_%{portname}*_adv*.so
283%{_libdir}/libwx_%{portname}*_dbgrid*.so
284%{_libdir}/libwx_%{portname}*_gl*.so
a3e78c76
VS
285%dir %{_libdir}/wx
286%{_libdir}/wx/*
4eba1840 287%{_bindir}/%{wxconfigname}
a622c152 288
f6bcfd97 289%files gl
a3e78c76 290%defattr(-,root,root)
4eba1840 291%{_libdir}/libwx_%{portname}*_gl*.so.*
406e3e0d
VS
292
293%files static
294%defattr (-,root,root)
4eba1840 295%{_libdir}/libwx_%{portname}*.a