[arch-commits] Commit in libgsf/trunk (PKGBUILD)

Jan de Groot jgc at archlinux.org
Mon Aug 3 22:08:00 UTC 2009


    Date: Monday, August 3, 2009 @ 18:08:00
  Author: jgc
Revision: 48913

Utilize split package support. This is messy, but it is better than having two PKGBUILDs

Modified:
  libgsf/trunk/PKGBUILD

----------+
 PKGBUILD |   59 ++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 46 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-08-03 22:07:14 UTC (rev 48912)
+++ PKGBUILD	2009-08-03 22:08:00 UTC (rev 48913)
@@ -2,26 +2,59 @@
 # Maintainer: Jan de Groot <jgc at archlinux.org>
 # Contributor: Sarah Hay <sarahhay at mb.sympatico.ca>
 
-pkgname=libgsf
-pkgver=1.14.14
+pkgbase=libgsf
+pkgname=('libgsf' 'libgsf-gnome')
+pkgver=1.14.15
 pkgrel=1
-pkgdesc="The GNOME Structured File Library is a utility library for reading and writing structured file formats."
 arch=(i686 x86_64)
 url="http://www.gnome.org/"
 license=('GPL' 'LGPL')
-depends=('libxml2>=2.7.3' 'glib2>=2.20.1' 'bzip2')
-makedepends=('intltool' 'pkgconfig' 'python')
-options=('!libtool')
-source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/1.14/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('69e9c57d48539782f72c55824a3c6859')
+makedepends=('libxml2>=2.7.3' 'glib2>=2.20.4' 'bzip2' 'intltool' 'pkgconfig' 'python' 'gnome-vfs>=2.24.1' 'libbonobo>=2.24.1' 'pygtk')
+options=('!libtool' '!emptydirs')
+source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgbase}/1.14/${pkgbase}-${pkgver}.tar.bz2)
+md5sums=('5118e971b4257f50b6914404593f63cf')
 
 build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  sed -i -e 's/gsf-gnome//' -e 's/thumbnailer//' Makefile.* || return 1
+  cd "${srcdir}/${pkgbase}-${pkgver}"
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
-              --mandir=/usr/share/man --disable-static \
-              --without-gnome-vfs --without-bonobo  || return 1
+              --mandir=/usr/share/man --disable-static || return 1
   make || return 1
-  make DESTDIR="${pkgdir}" install || return 1
+}
+
+package_libgsf() {
+  pkgdesc="The GNOME Structured File Library is a utility library for reading and writing structured file formats"
+  depends=('libxml2>=2.7.3' 'glib2>=2.20.4' 'bzip2')
+  cd "${srcdir}/${pkgbase}-${pkgver}"
+  make DESTDIR="${pkgdir}" GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 install || return 1
   rm -f "${pkgdir}/usr/share/man/man1/gsf-office-thumbnailer.1"
+  rm -f "${pkgdir}/usr/lib/libgsf-gnome"*
+  rm -rf "${pkgdir}/usr/include/libgsf-1/gsf-gnome/"
+  rm -rf "${pkgdir}/etc/gconf"
+  rm -f "${pkgdir}/usr/lib/pkgconfig/libgsf-gnome-1.pc"
+  rm -f "${pkgdir}/usr/bin/gsf-office-thumbnailer"
+  rm -f "${pkgdir}"/usr/lib/python*/site-packages/gsf/gnomemodule.so
 }
+
+package_libgsf-gnome() {
+  pkgdesc="Libgsf GNOME components"
+  depends=("libgsf=${pkgver}" 'libbonobo>=2.24.1' 'gnome-vfs>=2.24.1')
+
+  cd "${srcdir}/${pkgbase}-${pkgver}"
+  make -C gsf DESTDIR="${pkgdir}" install || return 1
+  make -C gsf-gnome DESTDIR="${pkgdir}" install || return 1
+  make -C thumbnailer DESTDIR="${pkgdir}" install || return 1
+  make -C python DESTDIR="${pkgdir}" install || return 1
+  make -C doc DESTDIR="${pkgdir}" install-manpageDATA || return 1
+
+  rm -f "${pkgdir}/usr/share/man/man1/gsf.1"
+  rm -f "${pkgdir}/usr/share/man/man1/gsf-vba-dump.1"
+  rm -f "${pkgdir}"/usr/lib/python*/site-packages/gsf/_*
+  rm -f "${pkgdir}"/usr/lib/libgsf-1.so*
+  rm -rf "${pkgdir}/usr/include/libgsf-1/gsf"
+  install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
+  install -m644 libgsf-gnome-1.pc "${pkgdir}/usr/lib/pkgconfig/" || return 1
+
+  install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+  gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain libgsf "${pkgdir}/etc/gconf/schemas/"*.schemas || return 1
+  rm -f "${pkgdir}/etc/gconf/schemas/"*.schemas
+}




More information about the arch-commits mailing list