Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > e3024dda318a656b853b63f21519186c > files > 4

xclass-0.9.2-2mdv2008.0.src.rpm

%define major	0
%define libname	%mklibname %{name} %{major}

Summary: GUI toolkit resembling Windows(TM) 95
Name: xclass
Version: 0.9.2
Release: %mkrel 2
Source0: %{name}-%{version}.tar.bz2
Patch0: xclass-0.6.3-mime-types.patch
# From SUSE OSS-Factory
Patch1:	xclass-0.9.2-gcc40.patch
Url:	http://sourceforge.net/projects/xclass/
License: LGPL
Group: System/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildRequires: X11-devel xpm-devel
Requires: %{libname}
Provides: %{name}-icons
Obsoletes: %{name}-icons

%description
Xclass is a GUI toolkit resembling Windows 95. It is Xlib-based and is 
written in C++.

%package -n %{libname}
Summary: Xclass is a Win95-looking GUI toolkit
Group: System/Libraries
Requires: %{name}

%description -n %{libname}
Xclass is a GUI toolkit resembling Windows 95. It is Xlib-based and is 
written in C++.

%package -n %{libname}-devel
Summary: Xclass is a Win95-looking GUI toolkit
Group: Development/C++
Provides: %{name}-devel = %{version}
Provides: lib%{name}-devel = %{version}
Requires: %{libname} = %{version}

%description -n %{libname}-devel
Xclass is a GUI toolkit resembling Windows 95. 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 .mime-types
%patch1 -p0 -b .gcc40

# AW: new way to install /etc/xclass-mime.types instead of /etc/mime.types
mv doc/mime.types doc/xclass-mime.types
perl -pi -e "s,mime.types,xclass-mime.types,g" doc/Makefile.in lib/libxclass/OResourcePool.cc test/ftest.cc
# AW: new way to fix references to /usr/local in the build
perl -pi -e "s,/usr/local/xclass-icons,%_datadir/%{name}/icons,g" lib/libxclass/Makefile.in lib/libxclass/Makefile.intel
perl -pi -e "s,/usr/local/xclass,/,g" lib/libxclass/Makefile.in lib/libxclass/Makefile.intel

%build
# Needed for x86-64 build
export CFLAGS="$RPM_OPT_FLAGS -DPIC -fPIC"
export CXXFLAGS="$CFLAGS"
%configure --enable-debug=no --prefix=%_prefix --libdir=%_libdir --sysconfdir=%_sysconfdir
%make
%make 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
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_shared
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

# remove unpackaged files
rm -f  $RPM_BUILD_ROOT%{_datadir}/xclass/icons/Makefile{,.in}
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc

%multiarch_binaries $RPM_BUILD_ROOT%{_bindir}/xc-config

%clean
rm -rf $RPM_BUILD_ROOT

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig


%files
%defattr(-,root,root)
%dir %{_datadir}/xclass
%dir %{_datadir}/xclass/icons
%{_datadir}/xclass/icons/*.xpm
%{_datadir}/xclass/icons/*.xbm
%{_datadir}/xclass/icons/*.icon
%config(noreplace) %{_sysconfdir}/xclassrc
%config(noreplace) %{_sysconfdir}/xclass-mime.types

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%doc doc/Programming.notes doc/INSTALL doc/Layout.notes
%_bindir/xc-config
%multiarch %multiarch_bindir/xc-config
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a


%changelog
* Tue Jun 12 2007 Adam Williamson <awilliamson@mandriva.com> 0.9.2-2mdv2008.0
+ Revision: 38342
- correct devel package group (#28160)

* Sat May 12 2007 Adam Williamson <awilliamson@mandriva.com> 0.9.2-1mdv2008.0
+ Revision: 26421
- improve summary / descriptions
- rename xclass-icons to xclass, move config files to it (comply with lib policy)
- add patch from SUSE to fix build with gcc 4.x
- drop all patches except mime types: no longer relevant
- clean spec
- 0.9.2
- Import xclass



* Mon May 08 2006 Stefan van der Eijk <stefan@eijk.nu> 0.6.3-15mdk
- rebuild for sparc

* Wed Feb  9 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.6.3-14mdk
- multiarch

* Tue Jul 20 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.6.3-13mdk
- patch3: remove defines that interfere with building apps using this lib
- patch4: fix some warnings

* Fri Jun  4 2004  <lmontel@n2.mandrakesoft.com> 0.6.3-12mdk
- Rebuild

* Thu Feb 26 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 0.6.3-11mdk
- fix DIRM

* Fri Sep 19 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.6.3-10mdk
- mklibname, more C++ fixes

* 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