%define pref /usr %define ver 2.6.0 %define ver2 2.6 %define rel 1 %define gtkver 2 %define portname gtk%{gtkver} %define portpkgname GTK%{gtkver} %define name wx%{portpkgname} %define wxbasename wxBase Name: %{name} Summary: The GTK+ %{gtkver} port of the wxWidgets library Version: %{ver} Release: %{rel} License: wxWidgets Licence Group: X11/Libraries Source: wxGTK-%{ver}.tar.bz2 Source99: wxrpm.mak URL: http://www.wxwidgets.org Packager: Fritz Elfert Prefix: %{pref} BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gcc-c++, gtk2-devel >= 2.4.7, zlib-devel BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel # all packages providing an implementation of wxWindows library (regardless of # the toolkit used) should provide the (virtual) wxwin package, this makes it # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..." Provides: wxwin Provides: wxGTK # in addition, we should provide libwx_gtk as automatic generator only notices # libwx_gtk-%{ver}-%{rel} Provides: libwx_gtk.so Provides: libwx_gtk-%{ver2}.so Requires: %{wxbasename} = %{ver} %description wxWidgets is a free C++ library for cross-platform GUI development. With wxWidgets, you can create applications for different GUIs (GTK+, Motif/LessTif, MS Windows, Mac) from the same source code. %package devel Summary: The GTK+ %{gtkver} port of the wxWidgets library Group: X11/Libraries Requires: %{name} = %{ver} Requires: %{wxbasename}-devel = %{ver} Provides: wxGTK-devel %description devel Header files for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library. %package gl Summary: The GTK+ %{gtkver} port of the wxWidgets library, OpenGL add-on. Group: X11/Libraries Requires: %{name} = %{ver} %description gl OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library. %package static Summary: wxGTK static libraries Group: Development/Libraries Requires: %{wxbasename}-static %description static Static libraries for wxGTK. You need them if you want to link statically against wxGTK. %package contrib Summary: The GTK+ %{gtkver} port of the wxWidgets library, contributed libraries. Group: X11/Libraries Requires: %{name} = %{ver} %description contrib Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library. %package contrib-devel Summary: The GTK+ %{gtkver} port of the wxWidgets library Group: X11/Libraries Requires: %{name}-contrib = %{ver} Requires: %{name}-devel = %{ver} %description contrib-devel Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library. %package -n %{wxbasename} Summary: The base port of the wxWidgets library. Group: Development/Libraries %description -n %{wxbasename} wxWidgets is a free C++ library for cross-platform GUI development. With wxWidgets, you can create applications for different GUIs (GTK+, Motif/LessTif, MS Windows, Mac) from the same source code. %package -n %{wxbasename}-static Summary: Static libraries of the base wxWidgets port. Group: Development/Libraries %description -n %{wxbasename}-static Static libraries of the base wxWidgets port. %package -n %{wxbasename}-devel Summary: The base port of the wxWidgets library. Group: Development/Libraries %description -n %{wxbasename}-devel Header files for the base port of the wxWidgets library. %prep %setup -q -n wxGTK-%{ver} %build if [ "$SMP" != "" ]; then export MAKE="make -j$SMP" else export MAKE="make" fi # # static ansi build mkdir obj-static pushd obj-static ln -s ../configure . %configure --disable-shared \ --disable-compat24 \ --with-regex=builtin \ --with-odbc \ --with-opengl rm -f configure $MAKE cd contrib/src $MAKE popd mkdir obj-static-debug pushd obj-static-debug ln -s ../configure . %configure --disable-shared \ --disable-compat24 \ --enable-debug \ --enable-debug_gdb \ --enable-debug_cntxt \ --with-odbc \ --with-regex=builtin \ --with-opengl rm -f configure $MAKE cd contrib/src $MAKE popd mkdir obj-shared pushd obj-shared ln -s ../configure . %configure \ --disable-compat24 \ --with-odbc \ --with-regex=builtin \ --with-opengl rm -f configure $MAKE cd contrib/src $MAKE popd mkdir obj-static-unicode pushd obj-static-unicode ln -s ../configure . %configure --disable-shared \ --disable-compat24 \ --enable-unicode \ --with-regex=builtin \ --with-opengl rm -f configure $MAKE cd contrib/src $MAKE popd mkdir obj-static-unicode-debug pushd obj-static-unicode-debug ln -s ../configure . %configure --disable-shared \ --disable-compat24 \ --enable-debug \ --enable-debug_gdb \ --enable-debug_cntxt \ --enable-unicode \ --with-regex=builtin \ --with-opengl rm -f configure $MAKE cd contrib/src $MAKE popd mkdir obj-shared-unicode pushd obj-shared-unicode ln -s ../configure . %configure \ --disable-compat24 \ --enable-unicode \ --with-regex=builtin \ --with-opengl rm -f configure $MAKE cd contrib/src $MAKE popd %install rm -rf $RPM_BUILD_ROOT pushd obj-static-unicode %makeinstall popd pushd obj-static-unicode-debug %makeinstall popd pushd obj-shared-unicode %makeinstall popd pushd obj-static %makeinstall popd pushd obj-static-debug %makeinstall popd pushd obj-shared %makeinstall popd # Generate wxBase header list from definitions in Makefile make -s RPMINCPFX=%{_includedir}/wx-\%{ver2}/ -f %{S:99} -C obj-static \ > wxbase-headers-list # Move wxbase header out of the way mkdir -p $RPM_BUILD_ROOT/tmp cp -a $RPM_BUILD_ROOT%{_includedir}/* $RPM_BUILD_ROOT/tmp for f in `cat wxbase-headers-list` ; do rm -f $RPM_BUILD_ROOT$f done # list of all core headers: find $RPM_BUILD_ROOT/usr/include/wx-%{ver2} -type f | \ sed -e "s,$RPM_BUILD_ROOT,,g" \ > core-headers.files # Now move headers back cp -a $RPM_BUILD_ROOT/tmp/* $RPM_BUILD_ROOT%{_includedir} rm -rf $RPM_BUILD_ROOT/tmp # contrib stuff: pushd obj-shared/contrib/src %makeinstall popd pushd obj-shared/utils/wxrc %makeinstall popd pushd obj-shared-unicode/contrib/src %makeinstall popd pushd obj-static/contrib/src %makeinstall popd pushd obj-static-debug/contrib/src %makeinstall popd pushd obj-static-unicode/contrib/src %makeinstall popd pushd obj-static-unicode-debug/contrib/src %makeinstall popd # # Fix broken absolute symlink into build-root # pushd $RPM_BUILD_ROOT/%{_bindir} LDST=`find . -name wx-config -printf '%l\n' | sed -e "s,$RPM_BUILD_ROOT,../..,"` ln -snf $LDST wx-config popd %clean rm -rf $RPM_BUILD_ROOT %post /sbin/ldconfig %postun /sbin/ldconfig %post gl /sbin/ldconfig %postun gl /sbin/ldconfig %files %defattr(-,root,root) %doc COPYING.LIB *.txt %{_libdir}/libwx_%{portname}*_core*.so.* %{_libdir}/libwx_%{portname}*_html*.so.* %{_libdir}/libwx_%{portname}*_adv*.so.* %{_libdir}/libwx_%{portname}*_dbgrid*.so.* %{_libdir}/libwx_%{portname}*_media*.so.* %{_libdir}/libwx_%{portname}*_qa*.so.* # _xrc matches also on gizmos_xrc ... %{_libdir}/libwx_%{portname}_xrc*.so.* %{_libdir}/libwx_%{portname}u_xrc*.so.* %files devel -f core-headers.files %defattr(-,root,root) %{_libdir}/libwx_%{portname}*_core*.so %{_libdir}/libwx_%{portname}*_html*.so %{_libdir}/libwx_%{portname}*_adv*.so %{_libdir}/libwx_%{portname}*_dbgrid*.so %{_libdir}/libwx_%{portname}*_media*.so %{_libdir}/libwx_%{portname}*_qa*.so %{_libdir}/libwx_%{portname}*_gl*.so # _xrc matches also on gizmos_xrc ... %{_libdir}/libwx_%{portname}_xrc*.so %{_libdir}/libwx_%{portname}u_xrc*.so %dir %{_libdir}/wx %{_libdir}/wx/* %{_bindir}/* %files gl %defattr(-,root,root) %{_libdir}/libwx_%{portname}*_gl*.so.* %files static %defattr (-,root,root) %{_libdir}/libwx_gtk*.a %files contrib %defattr(-,root,root) %{_libdir}/libwx_%{portname}*_animate*.so.* %{_libdir}/libwx_%{portname}*_deprecated*.so.* %{_libdir}/libwx_%{portname}*_fl*.so.* %{_libdir}/libwx_%{portname}*_gizmos*.so.* %{_libdir}/libwx_%{portname}*_mmedia*.so.* %{_libdir}/libwx_%{portname}*_ogl*.so.* %{_libdir}/libwx_%{portname}*_plot*.so.* %{_libdir}/libwx_%{portname}*_stc*.so.* %{_libdir}/libwx_%{portname}*_svg*.so.* %files contrib-devel %defattr(-,root,root) %{_bindir}/wxrc %dir %{_includedir}/wx-%{ver2}/wx/animate %{_includedir}/wx-%{ver2}/wx/animate/* %{_libdir}/libwx_%{portname}*_animate*.so %dir %{_includedir}/wx-%{ver2}/wx/deprecated %{_includedir}/wx-%{ver2}/wx/deprecated/* %{_libdir}/libwx_%{portname}*_deprecated*.so %dir %{_includedir}/wx-%{ver2}/wx/fl %{_includedir}/wx-%{ver2}/wx/fl/* %{_libdir}/libwx_%{portname}*_fl*.so %dir %{_includedir}/wx-%{ver2}/wx/gizmos %{_includedir}/wx-%{ver2}/wx/gizmos/* %{_libdir}/libwx_%{portname}*_gizmos*.so %dir %{_includedir}/wx-%{ver2}/wx/mmedia %{_includedir}/wx-%{ver2}/wx/mmedia/* %{_libdir}/libwx_%{portname}*_mmedia*.so %dir %{_includedir}/wx-%{ver2}/wx/ogl %{_includedir}/wx-%{ver2}/wx/ogl/* %{_libdir}/libwx_%{portname}*_ogl*.so %dir %{_includedir}/wx-%{ver2}/wx/plot %{_includedir}/wx-%{ver2}/wx/plot/* %{_libdir}/libwx_%{portname}*_plot*.so %dir %{_includedir}/wx-%{ver2}/wx/stc %{_includedir}/wx-%{ver2}/wx/stc/* %{_libdir}/libwx_%{portname}*_stc*.so %dir %{_includedir}/wx-%{ver2}/wx/svg %{_includedir}/wx-%{ver2}/wx/svg/* %{_libdir}/libwx_%{portname}*_svg*.so %files -n %{wxbasename} %defattr(-,root,root) %{_libdir}/libwx_base*.so.* %{_datadir}/aclocal/* %{_datadir}/locale/*/*/* %files -n %{wxbasename}-static %defattr(-,root,root) %{_libdir}/libwx_base*.a %{_libdir}/libwxodbc*.a %{_libdir}/libwxregex*.a %files -n %{wxbasename}-devel -f wxbase-headers-list %defattr(-,root,root) %{_libdir}/libwx_base*.so %changelog * Tue Apr 26 2005 Fritz Elfert - wxWidgets 2.6.0 * Wed Nov 9 2004 Fritz Elfert - Really fixed name of installed wx-config scripts * Thu Oct 28 2004 Fritz Elfert - Fixed name of installed wx-config scripts