]> git.saurik.com Git - wxWidgets.git/blame - wxMotif.spec
Fixed Unicode glitch
[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}
34BuildRequires: %{wxbasename}-devel = %{ver}
35
a622c152
RR
36%description
37wxWindows is a free C++ library for cross-platform GUI development.
38With wxWindows, you can create applications for different GUIs (GTK+,
39Motif/LessTif, MS Windows, Mac) from the same source code.
40
f6bcfd97
BP
41%package devel
42Summary: The Motif/Lesstif port of the wxWindows library
43Group: X11/Libraries
4eba1840
VS
44Requires: %{name} = %{ver}
45Requires: %{wxbasename}-devel = %{ver}
f6bcfd97
BP
46
47%description devel
48Header files for wxMotif, the Motif/Lesstif port of the wxWindows library.
49
50%package gl
406e3e0d 51Summary: The Motif/Lesstif port of the wxWindows library, OpenGL add-on.
f6bcfd97 52Group: X11/Libraries
4eba1840 53Requires: %{name} = %{ver}
f6bcfd97
BP
54
55%description gl
406e3e0d
VS
56OpenGL add-on library for wxMotif, the Motif/Lesstif port of the wxWindows library.
57
58%package static
59Summary: wxMotif static libraries
60Group: Development/Libraries
61
62%description static
63Static libraries for wxMotif. You need them if you want to link statically against wxMotif.
64
a622c152 65%prep
4eba1840 66%setup -q -n wxMOTIF-%{ver}
a622c152
RR
67
68%build
f6bcfd97
BP
69if [ "$SMP" != "" ]; then
70 export MAKE="make -j$SMP"
71else
72 export MAKE="make"
73fi
406e3e0d 74
406e3e0d
VS
75mkdir obj-shared
76cd obj-shared
86ec2935 77../configure --prefix=%{pref} --with-odbc --with-opengl --with-motif
f6bcfd97 78$MAKE
406e3e0d
VS
79cd ..
80
81mkdir obj-static
82cd obj-static
83../configure --prefix=%{pref} --disable-shared --with-odbc --with-opengl --with-motif
84$MAKE
85cd ..
a622c152
RR
86
87%install
88rm -rf $RPM_BUILD_ROOT
406e3e0d
VS
89(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
90(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
a622c152 91
4eba1840
VS
92# Remove headers that are part of wx-base-devel:
93(
94cd $RPM_BUILD_ROOT
95for f in `rpm -ql %{wxbasename}-devel | sed -e 's,\(.*\),.\1,g'` ; do
96 if test -f $f ; then rm -f $f ; fi
97done
98)
99
100# list of all core headers:
101find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
102
acea2a0b 103
a622c152
RR
104%clean
105rm -rf $RPM_BUILD_ROOT
106
107%post
108/sbin/ldconfig
109
110%postun
111/sbin/ldconfig
112
a3e78c76
VS
113%post gl
114/sbin/ldconfig
115
116%postun gl
117/sbin/ldconfig
118
119%post devel
120# Install wx-config if there isn't any
121if test ! -f %{_bindir}/wx-config ; then
4eba1840 122 ln -sf %{wxconfigname} %{_bindir}/wx-config
a3e78c76
VS
123fi
124
125%preun devel
126# Remove wx-config if it points to this package
127if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
4eba1840 128 SUM1=`md5sum %{_bindir}/%{wxconfigname} | cut -c 0-32`
a3e78c76
VS
129 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
130 if test "x$SUM1" = "x$SUM2" ; then
131 rm -f %{_bindir}/wx-config
132 fi
133fi
134
135
4eba1840
VS
136%files
137%defattr(-,root,root)
a3e78c76
VS
138%doc COPYING.LIB *.txt
139%dir %{_datadir}/wx
140%{_datadir}/wx/*
4eba1840
VS
141%{_libdir}/libwx_%{portname}*_core*.so.*
142%{_libdir}/libwx_%{portname}*_html*.so.*
143%{_libdir}/libwx_%{portname}*_adv*.so.*
144%{_libdir}/libwx_%{portname}*_dbgrid*.so.*
f6bcfd97 145
4eba1840
VS
146%files devel -f core-headers.files
147%defattr(-,root,root)
148%{_libdir}/libwx_%{portname}*_core*.so
149%{_libdir}/libwx_%{portname}*_html*.so
150%{_libdir}/libwx_%{portname}*_adv*.so
151%{_libdir}/libwx_%{portname}*_dbgrid*.so
152%{_libdir}/libwx_%{portname}*_gl*.so
a3e78c76
VS
153%dir %{_libdir}/wx
154%{_libdir}/wx/*
4eba1840 155%{_bindir}/%{wxconfigname}
a622c152 156
f6bcfd97 157%files gl
a3e78c76 158%defattr(-,root,root)
4eba1840 159%{_libdir}/libwx_%{portname}*_gl*.so.*
406e3e0d
VS
160
161%files static
162%defattr (-,root,root)
4eba1840 163%{_libdir}/libwx_%{portname}*.a