%define major 0 Summary: Xclass is a Win95-looking GUI toolkit Name: xclass Version: 0.6.3 Release: 9mdk Source0: http://download.hexonet.com/software/xclass/%{name}-%{version}.tar.bz2 Patch0: xclass-0.6.3-c++fixes.patch.bz2 Patch1: xclass-0.6.3-link-with-g++.patch.bz2 Patch2: xclass-0.6.3-mime-types.patch.bz2 Url: http://sourceforge.net/projects/xclass License: LGPL Group: System/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildRequires: XFree86-devel xpm-devel Requires: lib%{name}%{major} %description Xclass is a Win95-looking GUI toolkit, it is Xlib-based and is written in C++. %package icons Summary: Xclass icons Group: System/Libraries %description icons Xclass is a Win95-looking GUI toolkit, it is Xlib-based and is written in C++. This package contains necessary icons for certain dialog boxes. %package -n lib%{name}%{major} Summary: Xclass is a Win95-looking GUI toolkit Group: System/Libraries Obsoletes: %{name} , %{name} = %{version} Provides: %{name} = %{version} Requires: %{name}-icons %description -n lib%{name}%{major} Xclass is a Win95-looking GUI toolkit, it is Xlib-based and is written in C++. %package -n lib%{name}%{major}-devel Summary: Xclass is a Win95-looking GUI toolkit Group: System/Libraries Provides: %{name}-devel = %{version} Provides: lib%{name}-devel = %{version} Requires: lib%{name}%{major} = %{version} %description -n lib%{name}%{major}-devel Xclass is a Win95-looking GUI toolkit, it is Xlib-based and is written in C++. This package contains headers and static libraries to develop program using Xclass %prep %setup -q %patch0 -p1 -b .c++fixes %patch1 -p1 %patch2 -p1 -b .mime-types # make it lib64 aware, avoid patch perl -pi -e "s,(/usr/X11R6|@exec_prefix@)/lib\b,\1/%{_lib},g" \ lib/libxclass/Makefile.in config/xc-config.in %build export CFLAGS="$RPM_OPT_FLAGS -DPIC -fPIC" export CXXFLAGS="$CFLAGS" %configure --enable-debug=no make DEFINES='-DOX_DEFAULT_POOL=\"%{_datadir}/xclass/xclass-icons\" -DOX_DEFAULT_ROOT=\"/\"' (cd lib/libxclass make DEFINES='-DOX_DEFAULT_POOL=\"%{_datadir}/xclass/xclass-icons\" -DOX_DEFAULT_ROOT=\"/\"' shared ) %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_includedir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} $RPM_BUILD_ROOT%{_datadir}/xclass/icons make etc_dir=$RPM_BUILD_ROOT%{_sysconfdir} config_dir=$RPM_BUILD_ROOT%{_bindir} \ doc_dir=$RPM_BUILD_ROOT%{_docdir} header_dir=$RPM_BUILD_ROOT%{_includedir}/xclass lib_dir=$RPM_BUILD_ROOT%{_libdir} \ icon_dir=$RPM_BUILD_ROOT%{_datadir}/xclass/icons install (cd lib/libxclass make lib_dir=$RPM_BUILD_ROOT%{_libdir} install_shared ) ln -sf libxclass.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libxclass.so.%{major}.6 ln -sf libxclass.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libxclass.so.%{major} ln -sf libxclass.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libxclass.so # fix reference to icons dir perl -pi -e "s,(^icon dir).+,\1 = %{_datadir}/xclass/icons," \ $RPM_BUILD_ROOT%{_sysconfdir}/xclassrc # fix reference to mime.types file mv $RPM_BUILD_ROOT%{_sysconfdir}/{,xclass-}mime.types perl -pi -e "s,(^mime type file).+,\1 = xclass-mime.types," \ $RPM_BUILD_ROOT%{_sysconfdir}/xclassrc # remove unpackaged files rm -f $RPM_BUILD_ROOT%{_datadir}/xclass/icons/Makefile{,.in} rm -rf $RPM_BUILD_ROOT%{_datadir}/doc %clean rm -rf $RPM_BUILD_ROOT %post -n lib%{name}%{major} -p /sbin/ldconfig %postun -n lib%{name}%{major} -p /sbin/ldconfig %files icons %defattr(-,root,root) %dir %{_datadir}/xclass/icons %{_datadir}/xclass/icons/*.xpm %{_datadir}/xclass/icons/*.xbm %{_datadir}/xclass/icons/*.icon %files -n lib%{name}%{major} %defattr(-,root,root) %doc doc/Programming.notes doc/INSTALL doc/Layout.notes %config(noreplace) %{_sysconfdir}/xclassrc %config(noreplace) %{_sysconfdir}/xclass-mime.types %{_libdir}/*.so.* %files -n lib%{name}%{major}-devel %defattr(-,root,root) %_bindir/xc-config %{_includedir}/* %{_libdir}/*.so %{_libdir}/*.a %doc doc/Programming.notes doc/INSTALL doc/Layout.notes %changelog * Thu Dec 5 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.6.3-9mdk - We do need icons, also fix /etc/xclassrc and OX_DEFAULT_ROOT. Likewise for xclass mime.types. How did people usually test this package ?!? * Wed Dec 4 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.6.3-8mdk - Make it lib64 aware - Remove unpackaged files, maintainer will check where icons et al. were supposed to be used, if any use is found * Thu Aug 29 2002 Daouda LO <daouda@mandrakesoft.com> 0.6.3-7mdk - obsoleted xclass for 8.2 <-> 9.0 upgrades. * Wed Aug 14 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.6.3-6mdk - Automated rebuild with gcc 3.2-0.3mdk * Thu Jul 25 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.6.3-5mdk - Automated rebuild with gcc3.2 * Mon Jul 08 2002 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.6.3-4mdk - Build PIC on all architectures. * Mon Jun 17 2002 Daouda LO <daouda@mandrakesoft.com> 0.6.3-3mdk - upload all xclass packages. - obsoletes/provides xclass. * Mon Jun 17 2002 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.6.3-2mdk - Remove requires for lib package created from nuking the main package. * Mon Jun 17 2002 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.6.3-1mdk - New and shiny source. - Updated C++ workarounds. - Currently broken on the Alpha because of some gp relocation symbols which I don't really know why. * Sat Jun 15 2002 Stefan van der Eijk <stefan@eijk.nu> 0.6.2-3mdk - fix provides / requires on lib package * Tue May 28 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.6.2-2mdk - Patch0: ISO C++ fixes and workarounds. They should really use iterators instead. Also know that there is no conversion from a vector<> element pointer to a vector<>::iterator... * Wed Mar 20 2002 Daouda LO <daouda@mandrakesoft.com> 0.6.2-1mdk - release 0.6.2 * Tue Dec 4 2001 Daouda LO <daouda@mandrakesoft.com> 0.5.4-5mdk - add xclass package - cleanup * Tue Nov 27 2001 Daouda LO <daouda@mandrakesoft.com> 0.5.4-3mdk - revert back to 0.5.4. * Sat Nov 24 2001 Daouda Lo <daouda@mandrakesoft.com> 0.6.1-1mdk - release 0.6.1 * Sun Jul 01 2001 Stefan van der Eijk <stefan@eijk.nu> 0.5.4-2mdk - BuildRequires: xpm-devel * Tue Jun 12 2001 Frederic Crozat <fcrozat@mandrakesoft.com> 0.5.4-1mdk - First Mandrake package # end of file