%define _prefix /opt/freeware %define _defaultdocdir %{_prefix}/doc %define gtk2_version 2.2.4 %define libgnomeprint_version 2.3.1 %define libgnomecanvas_version 2.4.0 Summary: GUI support for libgnomeprint Name: libgnomeprintui Version: 2.3.1 Release: 1 URL: ftp://ftp.gnome.org Source: %{name}-%{version}.tar.bz2 Patch0: libgnomeprintui-2.3.1-aix.patch Patch1: libgnomeprintui-2.3.1-autotools.patch License: LGPL Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: gtk2 >= %{gtk2_version} Requires: libgnomeprint >= %{libgnomeprint_version} Requires: libgnomecanvas >= %{libgnomecanvas_version} BuildRequires: gtk2-devel >= %{gtk2_version} BuildRequires: libgnomeprint-devel >= %{libgnomeprint_version} BuildRequires: libgnomecanvas-devel >= %{libgnomecanvas_version} %description The libgnomeprintui package contains GTK+ widgets related to printing. %package devel Summary: Libraries and headers for libgnomeprintui Group: Development/Libraries Requires: %name = %{version} Requires: gtk2-devel >= %{gtk2_version} Requires: libgnomeprint-devel >= %{libgnomeprint_version} Requires: libgnomecanvas-devel >= %{libgnomecanvas_version} %description devel The libgnomeprintui package contains GTK+ widgets related to printing. You should install the libgnomeprintui-devel package if you would like to compile applications that use the widgets in libgnomeprintui. You do not need to install it if you just want to use precompiled applications. %prep %setup -q if test x$PATCH = x ; then PATCH=patch ; fi $PATCH -p2 -s < %{_sourcedir}/libgnomeprintui-2.3.1-aix.patch $PATCH -p2 -s < %{_sourcedir}/libgnomeprintui-2.3.1-autotools.patch %build PATH=%{_bindir}:$PATH ./configure --prefix=%{_prefix} make %install if test "%{buildroot}" != "/"; then rm -rf %{buildroot} fi mkdir -p %{buildroot} make DESTDIR=%{buildroot} install-strip # Make the links cd %{buildroot} for dir in lib include do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done %clean %files %defattr(-,root,system) %doc AUTHORS COPYING ChangeLog NEWS README %{_libdir}/lib*.a %{_datadir}/locale/*/LC_MESSAGES/libgnomeprintui*.mo %{_datadir}/gtk-doc/html/libgnomeprintui /usr/lib/lib*.a %files devel %defattr(-,root,system) %{_libdir}/lib*.la %{_libdir}/pkgconfig/* %{_includedir}/* /usr/include/*