]> git.saurik.com Git - wxWidgets.git/blame - wxMotif.spec
use SYMROOT instead of DERIVED_SOURCES_DIR
[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
c31752da
JS
6%define ver 2.5.0
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
116wx/dynarray.h
117wx/dynlib.h
118wx/dynload.h
119wx/encconv.h
120wx/event.h
121wx/features.h
122wx/ffile.h
123wx/file.h
124wx/fileconf.h
125wx/filefn.h
126wx/filename.h
127wx/filesys.h
128wx/fontenc.h
129wx/fontmap.h
130wx/fs_mem.h
131wx/fs_zip.h
132wx/hash.h
133wx/hashmap.h
134wx/hashset.h
135wx/iconloc.h
136wx/init.h
137wx/intl.h
138wx/iosfwrap.h
139wx/ioswrap.h
140wx/ipc.h
141wx/ipcbase.h
142wx/isql.h
143wx/isqlext.h
144wx/list.h
145wx/listimpl.cpp
146wx/log.h
147wx/longlong.h
148wx/math.h
149wx/memconf.h
150wx/memory.h
151wx/memtext.h
152wx/mimetype.h
153wx/module.h
154wx/msgout.h
155wx/msgout.h
156wx/mstream.h
157wx/object.h
158wx/platform.h
159wx/process.h
160wx/ptr_scpd.h
161wx/regex.h
162wx/scopeguard.h
163wx/snglinst.h
164wx/stopwatch.h
165wx/strconv.h
166wx/stream.h
167wx/string.h
168wx/sysopt.h
169wx/textbuf.h
170wx/textfile.h
171wx/thread.h
172wx/thrimpl.cpp
173wx/timer.h
174wx/tokenzr.h
175wx/txtstrm.h
176wx/types.h
177wx/utils.h
178wx/variant.h
179wx/vector.h
180wx/version.h
181wx/volume.h
182wx/wfstream.h
183wx/wx.h
184wx/wxchar.h
185wx/wxprec.h
186wx/xti.h
187wx/xtistrm.h
188wx/zipstrm.h
189wx/zstream.h
190wx/msw/apptrait.h
191wx/msw/apptbase.h
192wx/msw/chkconf.h
193wx/msw/crashrpt.h
194wx/msw/dde.h
195wx/msw/gccpriv.h
196wx/msw/mimetype.h
197wx/msw/winundef.h
198wx/msw/wrapcctl.h
199wx/msw/wrapwin.h
200wx/fs_inet.h
201wx/gsocket.h
202wx/protocol/file.h
203wx/protocol/ftp.h
204wx/protocol/http.h
205wx/protocol/protocol.h
206wx/sckaddr.h
207wx/sckipc.h
208wx/sckstrm.h
209wx/socket.h
210wx/url.h
211wx/msw/gsockmsw.h
212wx/xml/xml.h
213wx/xtixml.h
214wx/db.h
215wx/dbkeyg.h
216wx/dbtable.h
217EOF
218# --- wxBase headers list ends here ---
219for f in `cat wxbase-headers-list` ; do
220 rm -f $RPM_BUILD_ROOT%{_includedir}/$f
4eba1840 221done
4eba1840
VS
222
223# list of all core headers:
224find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
225
acea2a0b 226
a622c152
RR
227%clean
228rm -rf $RPM_BUILD_ROOT
229
230%post
231/sbin/ldconfig
232
233%postun
234/sbin/ldconfig
235
a3e78c76
VS
236%post gl
237/sbin/ldconfig
238
239%postun gl
240/sbin/ldconfig
241
242%post devel
243# Install wx-config if there isn't any
244if test ! -f %{_bindir}/wx-config ; then
4eba1840 245 ln -sf %{wxconfigname} %{_bindir}/wx-config
a3e78c76
VS
246fi
247
248%preun devel
249# Remove wx-config if it points to this package
250if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
4eba1840 251 SUM1=`md5sum %{_bindir}/%{wxconfigname} | cut -c 0-32`
a3e78c76
VS
252 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
253 if test "x$SUM1" = "x$SUM2" ; then
254 rm -f %{_bindir}/wx-config
255 fi
256fi
257
258
4eba1840
VS
259%files
260%defattr(-,root,root)
a3e78c76
VS
261%doc COPYING.LIB *.txt
262%dir %{_datadir}/wx
263%{_datadir}/wx/*
4eba1840
VS
264%{_libdir}/libwx_%{portname}*_core*.so.*
265%{_libdir}/libwx_%{portname}*_html*.so.*
266%{_libdir}/libwx_%{portname}*_adv*.so.*
267%{_libdir}/libwx_%{portname}*_dbgrid*.so.*
f6bcfd97 268
4eba1840
VS
269%files devel -f core-headers.files
270%defattr(-,root,root)
271%{_libdir}/libwx_%{portname}*_core*.so
272%{_libdir}/libwx_%{portname}*_html*.so
273%{_libdir}/libwx_%{portname}*_adv*.so
274%{_libdir}/libwx_%{portname}*_dbgrid*.so
275%{_libdir}/libwx_%{portname}*_gl*.so
a3e78c76
VS
276%dir %{_libdir}/wx
277%{_libdir}/wx/*
4eba1840 278%{_bindir}/%{wxconfigname}
a622c152 279
f6bcfd97 280%files gl
a3e78c76 281%defattr(-,root,root)
4eba1840 282%{_libdir}/libwx_%{portname}*_gl*.so.*
406e3e0d
VS
283
284%files static
285%defattr (-,root,root)
4eba1840 286%{_libdir}/libwx_%{portname}*.a