]>
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 | |
f6bcfd97 | 10 | Summary: The Motif/Lesstif port of the wxWindows library |
406e3e0d | 11 | Name: wxMotif |
a622c152 RR |
12 | Version: %{ver} |
13 | Release: %{rel} | |
14 | Copyright: wxWindows Licence | |
15 | Group: X11/Libraries | |
a3e78c76 | 16 | Source: wxMOTIF-%{ver}.tar.bz2 |
f6bcfd97 BP |
17 | URL: http://www.wxwindows.org |
18 | Packager: Robert Fendt <rfendt@myokay.net> | |
a622c152 RR |
19 | BuildRoot: /tmp/wxmotif_root |
20 | ||
21 | # all packages providing an implementation of wxWindows library (regardless of | |
22 | # the toolkit used) should provide the (virtual) wxwin package, this makes it | |
6e711d5c | 23 | # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..." |
a622c152 RR |
24 | Provides: wxwin |
25 | ||
26 | %description | |
27 | wxWindows is a free C++ library for cross-platform GUI development. | |
28 | With wxWindows, you can create applications for different GUIs (GTK+, | |
29 | Motif/LessTif, MS Windows, Mac) from the same source code. | |
30 | ||
f6bcfd97 BP |
31 | %package devel |
32 | Summary: The Motif/Lesstif port of the wxWindows library | |
33 | Group: X11/Libraries | |
406e3e0d | 34 | Requires: wxMotif = %{ver} |
f6bcfd97 BP |
35 | |
36 | %description devel | |
37 | Header files for wxMotif, the Motif/Lesstif port of the wxWindows library. | |
38 | ||
39 | %package gl | |
406e3e0d | 40 | Summary: The Motif/Lesstif port of the wxWindows library, OpenGL add-on. |
f6bcfd97 | 41 | Group: X11/Libraries |
406e3e0d | 42 | Requires: wxMotif = %{ver} |
f6bcfd97 BP |
43 | |
44 | %description gl | |
406e3e0d VS |
45 | OpenGL add-on library for wxMotif, the Motif/Lesstif port of the wxWindows library. |
46 | ||
47 | %package static | |
48 | Summary: wxMotif static libraries | |
49 | Group: Development/Libraries | |
50 | ||
51 | %description static | |
52 | Static libraries for wxMotif. You need them if you want to link statically against wxMotif. | |
53 | ||
f6bcfd97 | 54 | |
a622c152 | 55 | %prep |
406e3e0d | 56 | %setup -n wxMOTIF-%{ver} |
a622c152 RR |
57 | |
58 | %build | |
f6bcfd97 BP |
59 | if [ "$SMP" != "" ]; then |
60 | export MAKE="make -j$SMP" | |
61 | else | |
62 | export MAKE="make" | |
63 | fi | |
406e3e0d | 64 | |
406e3e0d VS |
65 | mkdir obj-shared |
66 | cd obj-shared | |
86ec2935 | 67 | ../configure --prefix=%{pref} --with-odbc --with-opengl --with-motif |
f6bcfd97 | 68 | $MAKE |
406e3e0d VS |
69 | cd .. |
70 | ||
71 | mkdir obj-static | |
72 | cd obj-static | |
73 | ../configure --prefix=%{pref} --disable-shared --with-odbc --with-opengl --with-motif | |
74 | $MAKE | |
75 | cd .. | |
a622c152 RR |
76 | |
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
406e3e0d VS |
79 | (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install) |
80 | (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install) | |
a622c152 | 81 | |
acea2a0b VS |
82 | %find_lang wxstd |
83 | ||
a622c152 RR |
84 | %clean |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %post | |
88 | /sbin/ldconfig | |
89 | ||
90 | %postun | |
91 | /sbin/ldconfig | |
92 | ||
a3e78c76 VS |
93 | %post gl |
94 | /sbin/ldconfig | |
95 | ||
96 | %postun gl | |
97 | /sbin/ldconfig | |
98 | ||
99 | %post devel | |
100 | # Install wx-config if there isn't any | |
101 | if test ! -f %{_bindir}/wx-config ; then | |
102 | ln -sf wxmotif-%{ver2}-config %{_bindir}/wx-config | |
103 | fi | |
104 | ||
105 | %preun devel | |
106 | # Remove wx-config if it points to this package | |
107 | if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then | |
108 | SUM1=`md5sum %{_bindir}/wxmotif-%{ver2}-config | cut -c 0-32` | |
109 | SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32` | |
110 | if test "x$SUM1" = "x$SUM2" ; then | |
111 | rm -f %{_bindir}/wx-config | |
112 | fi | |
113 | fi | |
114 | ||
115 | ||
acea2a0b | 116 | %files -f wxstd.lang |
a3e78c76 VS |
117 | %defattr (-,root,root) |
118 | %doc COPYING.LIB *.txt | |
119 | %dir %{_datadir}/wx | |
120 | %{_datadir}/wx/* | |
a3e78c76 | 121 | %{_libdir}/libwx_motif-%{ver2}*.so.* |
f6bcfd97 BP |
122 | |
123 | %files devel | |
a3e78c76 VS |
124 | %defattr (-,root,root) |
125 | %{_libdir}/libwx_motif-%{ver2}*.so | |
126 | %dir %{_includedir}/wx | |
127 | %{_includedir}/wx/* | |
128 | %dir %{_libdir}/wx | |
129 | %{_libdir}/wx/* | |
130 | %{_bindir}/wxmotif-%{ver2}-config | |
debc175a | 131 | %{_datadir}/aclocal/*.m4 |
a622c152 | 132 | |
f6bcfd97 | 133 | %files gl |
a3e78c76 VS |
134 | %defattr(-,root,root) |
135 | %{_libdir}/libwx_motif_gl* | |
406e3e0d VS |
136 | |
137 | %files static | |
138 | %defattr (-,root,root) | |
139 | %{_libdir}/lib*.a |