[arch-commits] Commit in pdksh/trunk (PKGBUILD pdksh.install usr_ksh.sh)

Eric Bélanger eric at archlinux.org
Sat Mar 21 04:18:59 UTC 2009


    Date: Saturday, March 21, 2009 @ 00:18:58
  Author: eric
Revision: 30638

upgpkg: pdksh 5.2.14-5
    Added license, Added arch tag, FHS man pages, Moved ksh from /usr/bin to /bin (close FS#10600)

Added:
  pdksh/trunk/usr_ksh.sh
Modified:
  pdksh/trunk/PKGBUILD
  pdksh/trunk/pdksh.install

---------------+
 PKGBUILD      |   25 +++++++++++++++----------
 pdksh.install |   34 +++++++++++++---------------------
 usr_ksh.sh    |    9 +++++++++
 3 files changed, 37 insertions(+), 31 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-03-21 04:18:41 UTC (rev 30637)
+++ PKGBUILD	2009-03-21 04:18:58 UTC (rev 30638)
@@ -1,22 +1,27 @@
 # $Id$
-# Maintainer: eric <eric at archlinux.org>
+# Maintainer: Aaron Griffin <aaron at archlinux.org>
 # Contributor: Tom Newsom <Jeepster at gmx.co.uk>
 
 pkgname=pdksh
 pkgver=5.2.14
-pkgrel=4
+pkgrel=5
 pkgdesc="A public domain clone of the AT&T Korn shell"
+arch=('i686' 'x86_64')
+url="http://www.cs.mun.ca/~michael/pdksh/"
+license=('custom')
 depends=('glibc')
 install=$pkgname.install
-source=(ftp://ftp.cs.mun.ca/pub/$pkgname/$pkgname-$pkgver.tar.gz $pkgname-$pkgver.patch)
-url="http://www.cs.mun.ca/~michael/pdksh/"
-md5sums=('871106b3bd937e1afba9f2ef7c43aef3' 'f11d1e711627d21a547c09e344e30dd3')
+source=(ftp://ftp.cs.mun.ca/pub/$pkgname/$pkgname-$pkgver.tar.gz $pkgname-$pkgver.patch usr_ksh.sh)
+md5sums=('871106b3bd937e1afba9f2ef7c43aef3' 'f11d1e711627d21a547c09e344e30dd3'\
+         '56084a657ecafd5dd0813a6056036712')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
-  /usr/bin/patch -Np1 -i ../$pkgname-$pkgver.patch
-  ./configure --prefix=/usr
-  /usr/bin/make || return 1
-  /usr/bin/make prefix=$startdir/pkg/usr install
+  cd $srcdir/$pkgname-$pkgver
+  patch -Np1 -i ../$pkgname-$pkgver.patch || return 1
+  ./configure --prefix=/ --mandir=/usr/share/man || return 1
+  make || return 1
+  make prefix=$pkgdir mandir=$pkgdir/usr/share/man/man1 install || return 1
+  install -D -m 755 ${srcdir}/usr_ksh.sh ${pkgdir}/usr/bin/ksh || return 1
+  install -D -m644 LEGAL $pkgdir/usr/share/licenses/$pkgname/LICENSE || return 1
 }
 # vim: ts=2 sw=2 et ft=sh

Modified: pdksh.install
===================================================================
--- pdksh.install	2009-03-21 04:18:41 UTC (rev 30637)
+++ pdksh.install	2009-03-21 04:18:58 UTC (rev 30638)
@@ -1,30 +1,22 @@
-# arg 1: the new package version
 post_install() {
-  if [ ! "`/bin/grep /usr/bin/ksh etc/shells`" ]; then
-    /bin/echo "updating /etc/shells... done."
-    /bin/sed -i "s|/bin/bash|/bin/bash\n/usr/bin/ksh|" etc/shells
+  if [ ! "`grep /bin/ksh etc/shells`" ]; then
+    echo "updating /etc/shells... done."
+    sed -i "s|/bin/bash|/bin/bash\n/bin/ksh|" etc/shells
+  else
+    sed -i "s|/usr/bin/ksh|/bin/ksh|" etc/shells
+
+    echo ""
+    echo ">> WARNING: /usr/bin/ksh has moved to /bin/ksh,"
+    echo ">> please update your user accounts as needed"
+    echo ""
   fi
 }
 
-# arg 1: the new package version
-# arg 2: the old package version
 post_upgrade() {
-	post_install $1
+  post_install $1
 }
 
-# arg 1: the old package version
 pre_remove() {
-  /bin/echo -ne "\nupdating /etc/shells... "
-  /bin/sed -i "s|/usr/bin/ksh||" etc/shells
+  echo -ne "\nupdating /etc/shells... "
+  sed -i "s|/bin/ksh||" etc/shells
 }
-
-# arg 1: the old package version
-post_remove() {
-  /bin/true
-}
-
-op=$1
-shift
-
-$op $*
-# vim: ts=2: ft=sh

Added: usr_ksh.sh
===================================================================
--- usr_ksh.sh	                        (rev 0)
+++ usr_ksh.sh	2009-03-21 04:18:58 UTC (rev 30638)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+echo "WARNING: you should be calling ksh with /bin/ksh,"
+echo "not with /usr/bin/ksh. Please execute chsh to fix"
+echo "this. Legacy /usr/bin/ksh support will go away!"
+echo ""
+
+exec /bin/ksh $@
+




More information about the arch-commits mailing list