]> git.saurik.com Git - wxWidgets.git/blame - wxX11.spec
No real changes, just remove unnecessary const workaround.
[wxWidgets.git] / wxX11.spec
CommitLineData
c5cf1acc 1%define pref /usr
f203de0c 2%define ver 2.9.2
7fd3acaf 3%define ver2 2.9
df050bd9 4%define rel 1
c5cf1acc 5
4eba1840
VS
6# Configurable settings (use --with(out) unicode on rpmbuild cmd line):
7%define unicode 0
8%{?_with_unicode: %{expand: %%define unicode 1}}
9%{?_without_unicode: %{expand: %%define unicode 0}}
10
1cd555d2 11%define portname x11univ
4eba1840
VS
12
13%if %{unicode}
1cd555d2
VZ
14 %define wxbasename wx-base-unicode
15 %define name wx-%{portname}-unicode
bae3556d 16 %define wxconfig %{portname}-unicode-%{ver2}
1cd555d2 17 %define wxconfiglink wx%{portname}u-%{ver2}-config
4eba1840 18%else
1cd555d2
VZ
19 %define wxbasename wx-base
20 %define name wx-%{portname}
bae3556d 21 %define wxconfig %{portname}-ansi-%{ver2}
1cd555d2 22 %define wxconfiglink wx%{portname}-%{ver2}-config
4eba1840
VS
23%endif
24
1cd555d2
VZ
25Summary: The X11 port of the wxWidgets library
26Name: %{name}
c5cf1acc
RR
27Version: %{ver}
28Release: %{rel}
4eba1840 29License: wxWindows Licence
c5cf1acc
RR
30Group: X11/Libraries
31Source: wxX11-%{ver}.tar.bz2
1cd555d2 32URL: http://www.wxwidgets.org
c5cf1acc
RR
33Packager: Vadim Zeitlin <vadim@wxwindows.org>
34Prefix: %{pref}
1cd555d2
VZ
35BuildRoot: %{_tmppath}/%{name}-root
36Requires: %{wxbasename} = %{ver}
c5cf1acc 37
1cd555d2 38# all packages providing an implementation of wxWidgets library (regardless of
c5cf1acc
RR
39# the toolkit used) should provide the (virtual) wxwin package, this makes it
40# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
41Provides: wxwin
4eba1840
VS
42Provides: wxX11
43
c5cf1acc 44%description
1cd555d2
VZ
45wxWidgets is a free C++ library for cross-platform GUI development.
46With wxWidgets, you can create applications for different GUIs (GTK+,
c5cf1acc
RR
47Motif/LessTif, MS Windows, Mac) from the same source code.
48
49%package devel
1cd555d2 50Summary: The X11 port of the wxWidgets library
c5cf1acc 51Group: X11/Libraries
4eba1840
VS
52Requires: %{name} = %{ver}
53Requires: %{wxbasename}-devel = %{ver}
c5cf1acc
RR
54
55%description devel
1cd555d2 56Header files for wxX11, the X11 port of the wxWidgets library.
c5cf1acc
RR
57
58%package gl
1cd555d2 59Summary: The X11 port of the wxWidgets library, OpenGL add-on.
c5cf1acc 60Group: X11/Libraries
4eba1840 61Requires: %{name} = %{ver}
c5cf1acc
RR
62
63%description gl
1cd555d2 64OpenGL add-on library for wxX11, the X11 port of the wxWidgets library.
c5cf1acc
RR
65
66%package static
67Summary: wxX11 static libraries
68Group: Development/Libraries
1cd555d2
VZ
69Requires: %{wxbasename}-static
70Requires: %{name}-devel = %{ver}
c5cf1acc
RR
71
72%description static
73Static libraries for wxX11. You need them if you want to link statically against wxX11.
74
75%prep
4eba1840 76%setup -q -n wxX11-%{ver}
c5cf1acc
RR
77
78%build
79if [ "$SMP" != "" ]; then
1cd555d2 80 export MAKE="make -j$SMP"
c5cf1acc 81else
1cd555d2 82 export MAKE="make"
c5cf1acc
RR
83fi
84
85mkdir obj-shared
86cd obj-shared
4eba1840
VS
87../configure --prefix=%{pref} --with-x11 \
88%if %{unicode}
89 --enable-unicode \
90%else
1e6b2edf 91 --disable-unicode \
4eba1840 92%endif
c5cf1acc 93$MAKE
eead5291 94cd ..
c5cf1acc
RR
95
96mkdir obj-static
97cd obj-static
4eba1840
VS
98../configure --prefix=%{pref} --with-x11 --disable-shared \
99%if %{unicode}
100 --enable-unicode \
101%else
1e6b2edf 102 --disable-unicode \
4eba1840
VS
103%endif
104 --with-opengl
c5cf1acc
RR
105$MAKE
106cd ..
107
108%install
109rm -rf $RPM_BUILD_ROOT
110(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
111(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
112
4eba1840 113# Remove headers that are part of wx-base-devel:
d10382ab
VS
114
115# --- wxBase headers list begins here ---
fb5ab396 116cat <<EOF >wxbase-headers.files
d10382ab 117wx/afterstd.h
178c7760 118wx/any.h
254696bb 119wx/anystr.h
d10382ab
VS
120wx/app.h
121wx/apptrait.h
8329fea8 122wx/archive.h
d10382ab
VS
123wx/arrimpl.cpp
124wx/arrstr.h
a8098f86
VZ
125wx/atomic.h
126wx/base64.h
d10382ab
VS
127wx/beforestd.h
128wx/buffer.h
129wx/build.h
eecc043f 130wx/chartype.h
664e1314 131wx/checkeddelete.h
d10382ab 132wx/chkconf.h
82b0b7f6 133wx/clntdata.h
541ea80f 134wx/cmdargs.h
d10382ab
VS
135wx/cmdline.h
136wx/confbase.h
137wx/config.h
a1999705 138wx/convauto.h
d10382ab 139wx/containr.h
c4ad618c 140wx/cpp.h
abde3283 141wx/crt.h
d10382ab 142wx/datetime.h
d10382ab
VS
143wx/datstrm.h
144wx/dde.h
145wx/debug.h
146wx/defs.h
147wx/dir.h
20b35a69 148wx/dlimpexp.h
16edb7b5 149wx/dlist.h
d10382ab
VS
150wx/dynarray.h
151wx/dynlib.h
152wx/dynload.h
153wx/encconv.h
154wx/event.h
00237407 155wx/evtloop.h
671a85ea 156wx/except.h
d10382ab 157wx/features.h
620c9408 158wx/flags.h
d10382ab
VS
159wx/ffile.h
160wx/file.h
161wx/fileconf.h
162wx/filefn.h
163wx/filename.h
164wx/filesys.h
165wx/fontenc.h
166wx/fontmap.h
f068697b 167wx/fs_arc.h
37671b82 168wx/fs_filter.h
d10382ab
VS
169wx/fs_mem.h
170wx/fs_zip.h
171wx/hash.h
172wx/hashmap.h
173wx/hashset.h
54e80d76 174wx/html/forcelnk.h
d10382ab
VS
175wx/iconloc.h
176wx/init.h
177wx/intl.h
178wx/iosfwrap.h
179wx/ioswrap.h
180wx/ipc.h
181wx/ipcbase.h
8ece421c 182wx/kbdstate.h
ea144923 183wx/language.h
4cbcfb73 184wx/link.h
d10382ab
VS
185wx/list.h
186wx/listimpl.cpp
187wx/log.h
188wx/longlong.h
189wx/math.h
190wx/memconf.h
191wx/memory.h
192wx/memtext.h
193wx/mimetype.h
194wx/module.h
8ece421c 195wx/mousestate.h
d10382ab 196wx/msgout.h
b589082a 197wx/msgqueue.h
d10382ab
VS
198wx/mstream.h
199wx/object.h
200wx/platform.h
fc1dea3d 201wx/platinfo.h
355debca 202wx/power.h
d10382ab
VS
203wx/process.h
204wx/ptr_scpd.h
6490a288 205wx/ptr_shrd.h
460354e9 206wx/recguard.h
d10382ab 207wx/regex.h
664e1314
VZ
208wx/scopedarray.h
209wx/scopedptr.h
d10382ab 210wx/scopeguard.h
664e1314 211wx/sharedptr.h
d10382ab 212wx/snglinst.h
c33fae85 213wx/sstream.h
b71531ad 214wx/stack.h
107d0fd4 215wx/stackwalk.h
dd65d8c8 216wx/stdpaths.h
72a7c559 217wx/stdstream.h
ef335a4f 218wx/stockitem.h
d10382ab
VS
219wx/stopwatch.h
220wx/strconv.h
221wx/stream.h
222wx/string.h
eecc043f 223wx/stringimpl.h
467175ab 224wx/stringops.h
c9f78968 225wx/strvararg.h
d10382ab 226wx/sysopt.h
56d5b4b8 227wx/tarstrm.h
d10382ab
VS
228wx/textbuf.h
229wx/textfile.h
230wx/thread.h
231wx/thrimpl.cpp
232wx/timer.h
2f4c5d00 233wx/tls.h
d10382ab 234wx/tokenzr.h
6490a288 235wx/tracker.h
ea144923 236wx/translation.h
d10382ab 237wx/txtstrm.h
7db064f6 238wx/typeinfo.h
d10382ab 239wx/types.h
eecc043f 240wx/unichar.h
dd65d8c8 241wx/uri.h
aaa03125 242wx/ustring.h
d10382ab
VS
243wx/utils.h
244wx/variant.h
245wx/vector.h
246wx/version.h
ccec9093 247wx/versioninfo.h
d10382ab 248wx/volume.h
6490a288 249wx/weakref.h
d10382ab
VS
250wx/wfstream.h
251wx/wx.h
252wx/wxchar.h
eecc043f 253wx/wxcrt.h
52de37c7 254wx/wxcrtbase.h
e7308074 255wx/wxcrtvararg.h
d10382ab 256wx/wxprec.h
6e4ae332 257wx/xlocale.h
d10382ab
VS
258wx/xti.h
259wx/xtistrm.h
260wx/zipstrm.h
261wx/zstream.h
6490a288 262wx/meta/convertible.h
6e0fbb3d 263wx/meta/if.h
7ec75d3e 264wx/meta/implicitconversion.h
6490a288 265wx/meta/int2type.h
6e0fbb3d 266wx/meta/movable.h
109e2ca4 267wx/meta/pod.h
6b8ef0b3
VZ
268wx/fswatcher.h
269wx/generic/fswatcher.h
b46b1d59 270wx/unix/app.h
fb5ab396
WS
271wx/unix/apptbase.h
272wx/unix/apptrait.h
a1873279 273wx/unix/chkconf.h
b46b1d59 274wx/unix/evtloop.h
78808897 275wx/unix/evtloopsrc.h
fb5ab396 276wx/unix/pipe.h
cf2810aa 277wx/unix/stdpaths.h
6e4ae332 278wx/unix/stackwalk.h
509f339a 279wx/unix/tls.h
6b8ef0b3 280wx/unix/fswatcher_kqueue.h
cf2810aa
VZ
281wx/unix/execute.h
282wx/unix/mimetype.h
6b8ef0b3 283wx/unix/fswatcher_inotify.h
d10382ab 284wx/fs_inet.h
d10382ab
VS
285wx/protocol/file.h
286wx/protocol/ftp.h
287wx/protocol/http.h
0576cd9e 288wx/protocol/log.h
d10382ab
VS
289wx/protocol/protocol.h
290wx/sckaddr.h
291wx/sckipc.h
292wx/sckstrm.h
293wx/socket.h
294wx/url.h
d10382ab
VS
295wx/xml/xml.h
296wx/xtixml.h
d10382ab
VS
297EOF
298# --- wxBase headers list ends here ---
299for f in `cat wxbase-headers-list` ; do
1cd555d2 300 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
4eba1840 301done
4eba1840
VS
302
303# list of all core headers:
1cd555d2 304find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
4eba1840 305
88e3652f
VS
306# remove wxBase files so that RPM doesn't complain about unpackaged files:
307rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
1cd555d2
VZ
308%if %{unicode}
309 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
310%endif
88e3652f
VS
311rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
312rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
313
c5cf1acc
RR
314%clean
315rm -rf $RPM_BUILD_ROOT
316
317%post
318/sbin/ldconfig
319
320%postun
321/sbin/ldconfig
322
1cd555d2
VZ
323%post devel
324# link wx-config when you install RPM.
325ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
326# link wx-config with explicit name.
327ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
328/sbin/ldconfig
329
330%postun devel
331/sbin/ldconfig
332
333%preun devel
334if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
335 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
336 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
337 if test "x$SUM1" = "x$SUM2" ; then
338 rm -f %{_bindir}/wx-config
339 fi
340fi
341rm -f %{_bindir}/%{wxconfiglink}
342
c5cf1acc
RR
343%post gl
344/sbin/ldconfig
345
346%postun gl
347/sbin/ldconfig
348
4eba1840 349%files
c5cf1acc
RR
350%defattr(-,root,root)
351%doc COPYING.LIB *.txt
1cd555d2
VZ
352%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
353%{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
1cd555d2
VZ
354%{_libdir}/libwx_%{portname}*_html-%{ver2}.so.*
355%{_libdir}/libwx_%{portname}*_media-%{ver2}.so.*
356%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.*
357%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.*
358
c5cf1acc 359
4eba1840 360%files devel -f core-headers.files
c5cf1acc 361%defattr(-,root,root)
1cd555d2
VZ
362%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
363%{_libdir}/libwx_%{portname}*_core-%{ver2}.so
1cd555d2
VZ
364%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
365%{_libdir}/libwx_%{portname}*_html-%{ver2}.so
366%{_libdir}/libwx_%{portname}*_media-%{ver2}.so
367%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
368%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
c5cf1acc
RR
369%dir %{_libdir}/wx
370%{_libdir}/wx/*
1cd555d2 371%{_bindir}/wxrc*
c5cf1acc
RR
372
373%files gl
374%defattr(-,root,root)
1cd555d2 375%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
c5cf1acc
RR
376
377%files static
378%defattr (-,root,root)
1cd555d2 379%{_libdir}/libwx_%{portname}*_*-%{ver2}.a
4eba1840 380