[arch-commits] Commit in gcal/trunk (PKGBUILD gcal.install)

Eric Bélanger eric at archlinux.org
Sun Apr 5 21:35:42 UTC 2009


    Date: Sunday, April 5, 2009 @ 17:35:42
  Author: eric
Revision: 33891

upgpkg: gcal 3.01-4
    Added arch tag, Added install scriptlet to handle info pages, FHS man pages, Fixed build issue

Added:
  gcal/trunk/gcal.install
Modified:
  gcal/trunk/PKGBUILD

--------------+
 PKGBUILD     |   43 ++++++++++++++++++++++++-------------------
 gcal.install |   20 ++++++++++++++++++++
 2 files changed, 44 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-04-05 20:12:39 UTC (rev 33890)
+++ PKGBUILD	2009-04-05 21:35:42 UTC (rev 33891)
@@ -4,38 +4,43 @@
 
 pkgname=gcal
 pkgver=3.01
-pkgrel=3
+pkgrel=4
 pkgdesc="Gcal displays hybrid and proleptic Julian and Gregorian calendar sheets"
-source=(ftp://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz)
-depends=('perl')
+arch=('i686' 'x86_64')
 url="http://www.gnu.org/software/gcal/"
 license=('GPL')
+depends=('perl' 'texinfo')
+install=gcal.install
+source=(ftp://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz)
 md5sums=('65f3394653829fd77f6862045112ad4f')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
-  ./configure --prefix=/usr
+  cd $srcdir/$pkgname-$pkgver
+  ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-included-regexps || return 1
   make || return 1
-  make prefix=$startdir/pkg/usr install
-  rm $startdir/pkg/usr/share/locale/locale.alias
+  make prefix=$pkgdir/usr mandir=$pkgdir/usr/share/man/man1 infodir=$pkgdir/usr/share/info install || return 1
+  rm $pkgdir/usr/share/locale/locale.alias
+  rm $pkgdir/usr/share/info/dir
+  gzip $pkgdir/usr/share/info/*
 
+
   # Need to fix up paths for scripts in misc directory
   # that are automatically created by the makefile
-  for miscfile in $startdir/pkg/usr/share/gcal/misc/*/*
+  for miscfile in $pkgdir/usr/share/gcal/misc/*/*
   do
-	 sed -i "s:${startdir}/pkg::g" $miscfile
+	 sed -i "s:${pkgdir}::g" $miscfile || return 1
   done
   
   # Rebuild the symlinks that makefile created into the image /usr/bin
   # directory during make install
-  ln -s -f /usr/share/gcal/misc/daily/daily $startdir/pkg/usr/bin/gcal-daily
-  ln -s -f /usr/share/gcal/misc/ddiff/ddiff $startdir/pkg/usr/bin/gcal-ddiff
-  ln -s -f /usr/share/gcal/misc/ddiff/ddiffdrv $startdir/pkg/usr/bin/gcal-ddiffdrv
-  ln -s -f /usr/share/gcal/misc/dst/dst $startdir/pkg/usr/bin/gcal-dst
-  ln -s -f /usr/share/gcal/misc/gcalltx/gcalltx $startdir/pkg/usr/bin/gcal-gcalltx
-  ln -s -f /usr/share/gcal/misc/gcalltx/gcalltx.pl $startdir/pkg/usr/bin/gcal-gcalltx.pl
-  ln -s -f /usr/share/gcal/misc/moon/moon $startdir/pkg/usr/bin/gcal-moon
-  ln -s -f /usr/share/gcal/misc/mrms/mrms $startdir/pkg/usr/bin/gcal-mrms
-  ln -s -f /usr/share/gcal/misc/srss/srss $startdir/pkg/usr/bin/gcal-srss
-  ln -s -f /usr/share/gcal/misc/wloc/wlocdrv $startdir/pkg/usr/bin/gcal-wlocdrv
+  ln -s -f /usr/share/gcal/misc/daily/daily $pkgdir/usr/bin/gcal-daily
+  ln -s -f /usr/share/gcal/misc/ddiff/ddiff $pkgdir/usr/bin/gcal-ddiff
+  ln -s -f /usr/share/gcal/misc/ddiff/ddiffdrv $pkgdir/usr/bin/gcal-ddiffdrv
+  ln -s -f /usr/share/gcal/misc/dst/dst $pkgdir/usr/bin/gcal-dst
+  ln -s -f /usr/share/gcal/misc/gcalltx/gcalltx $pkgdir/usr/bin/gcal-gcalltx
+  ln -s -f /usr/share/gcal/misc/gcalltx/gcalltx.pl $pkgdir/usr/bin/gcal-gcalltx.pl
+  ln -s -f /usr/share/gcal/misc/moon/moon $pkgdir/usr/bin/gcal-moon
+  ln -s -f /usr/share/gcal/misc/mrms/mrms $pkgdir/usr/bin/gcal-mrms
+  ln -s -f /usr/share/gcal/misc/srss/srss $pkgdir/usr/bin/gcal-srss
+  ln -s -f /usr/share/gcal/misc/wloc/wlocdrv $pkgdir/usr/bin/gcal-wlocdrv
 }

Added: gcal.install
===================================================================
--- gcal.install	                        (rev 0)
+++ gcal.install	2009-04-05 21:35:42 UTC (rev 33891)
@@ -0,0 +1,20 @@
+infodir=/usr/share/info
+filelist=(gcal.info-8.gz gcal.info-11.gz gcal.info-14.gz gcal.info-12.gz gcal.info-7.gz gcal.info.gz gcal.info-2.gz gcal.info-9.gz gcal.info-5.gz gcal.info-10.gz gcal.info-13.gz gcal.info-1.gz gcal.info-3.gz gcal.info-4.gz gcal.info-6.gz)
+
+post_install() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info $infodir/$file $infodir/dir 2> /dev/null
+  done
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+pre_remove() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+  done
+}




More information about the arch-commits mailing list