]>
Commit | Line | Data |
---|---|---|
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 | 15 | Summary: The Motif/Lesstif port of the wxWindows library |
4eba1840 | 16 | Name: %{name} |
a622c152 RR |
17 | Version: %{ver} |
18 | Release: %{rel} | |
4eba1840 | 19 | License: wxWindows Licence |
a622c152 | 20 | Group: X11/Libraries |
a3e78c76 | 21 | Source: wxMOTIF-%{ver}.tar.bz2 |
f6bcfd97 BP |
22 | URL: http://www.wxwindows.org |
23 | Packager: Robert Fendt <rfendt@myokay.net> | |
a622c152 RR |
24 | BuildRoot: /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 |
29 | Provides: wxwin |
30 | ||
4eba1840 VS |
31 | Provides: wxMotif |
32 | ||
33 | Requires: %{wxbasename} = %{ver} | |
34 | BuildRequires: %{wxbasename}-devel = %{ver} | |
35 | ||
a622c152 RR |
36 | %description |
37 | wxWindows is a free C++ library for cross-platform GUI development. | |
38 | With wxWindows, you can create applications for different GUIs (GTK+, | |
39 | Motif/LessTif, MS Windows, Mac) from the same source code. | |
40 | ||
f6bcfd97 BP |
41 | %package devel |
42 | Summary: The Motif/Lesstif port of the wxWindows library | |
43 | Group: X11/Libraries | |
4eba1840 VS |
44 | Requires: %{name} = %{ver} |
45 | Requires: %{wxbasename}-devel = %{ver} | |
f6bcfd97 BP |
46 | |
47 | %description devel | |
48 | Header files for wxMotif, the Motif/Lesstif port of the wxWindows library. | |
49 | ||
50 | %package gl | |
406e3e0d | 51 | Summary: The Motif/Lesstif port of the wxWindows library, OpenGL add-on. |
f6bcfd97 | 52 | Group: X11/Libraries |
4eba1840 | 53 | Requires: %{name} = %{ver} |
f6bcfd97 BP |
54 | |
55 | %description gl | |
406e3e0d VS |
56 | OpenGL add-on library for wxMotif, the Motif/Lesstif port of the wxWindows library. |
57 | ||
58 | %package static | |
59 | Summary: wxMotif static libraries | |
60 | Group: Development/Libraries | |
61 | ||
62 | %description static | |
63 | Static 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 |
69 | if [ "$SMP" != "" ]; then |
70 | export MAKE="make -j$SMP" | |
71 | else | |
72 | export MAKE="make" | |
73 | fi | |
406e3e0d | 74 | |
406e3e0d VS |
75 | mkdir obj-shared |
76 | cd obj-shared | |
86ec2935 | 77 | ../configure --prefix=%{pref} --with-odbc --with-opengl --with-motif |
f6bcfd97 | 78 | $MAKE |
406e3e0d VS |
79 | cd .. |
80 | ||
81 | mkdir obj-static | |
82 | cd obj-static | |
83 | ../configure --prefix=%{pref} --disable-shared --with-odbc --with-opengl --with-motif | |
84 | $MAKE | |
85 | cd .. | |
a622c152 RR |
86 | |
87 | %install | |
88 | rm -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 | ( | |
94 | cd $RPM_BUILD_ROOT | |
95 | for f in `rpm -ql %{wxbasename}-devel | sed -e 's,\(.*\),.\1,g'` ; do | |
96 | if test -f $f ; then rm -f $f ; fi | |
97 | done | |
98 | ) | |
99 | ||
100 | # list of all core headers: | |
101 | find $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 |
105 | rm -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 | |
121 | if test ! -f %{_bindir}/wx-config ; then | |
4eba1840 | 122 | ln -sf %{wxconfigname} %{_bindir}/wx-config |
a3e78c76 VS |
123 | fi |
124 | ||
125 | %preun devel | |
126 | # Remove wx-config if it points to this package | |
127 | if 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 | |
133 | fi | |
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 |