diff options
Diffstat (limited to 'community/plan9port')
-rw-r--r-- | community/plan9port/PKGBUILD | 52 | ||||
-rw-r--r-- | community/plan9port/plan9.install | 42 | ||||
-rwxr-xr-x | community/plan9port/plan9.sh | 2 |
3 files changed, 96 insertions, 0 deletions
diff --git a/community/plan9port/PKGBUILD b/community/plan9port/PKGBUILD new file mode 100644 index 000000000..590a0d6cc --- /dev/null +++ b/community/plan9port/PKGBUILD @@ -0,0 +1,52 @@ +# $Id: PKGBUILD 33385 2010-11-24 11:34:08Z cbrannon $ +# Contributor: phrakture <aaronmgriffin--gmail--com> +# Contributor: Fazlul Shahriar +# Contributor: Chris Brannon <cmbrannon79@gmail.com> +pkgname=plan9port +pkgver=20101110 +pkgrel=1 +pkgdesc="A port of many programs from Plan 9 to Unix-like operating systems" +arch=('i686' 'x86_64') +url="http://swtch.com/plan9port/" +license=('custom') +depends=(xorg-server sh fuse) +optdepends=('python2: for the codereview script') +install=plan9.install +source=(http://swtch.com/$pkgname/$pkgname-$pkgver.tgz plan9.sh) + +build() +{ + install -Dm755 "$srcdir/plan9.sh" "$pkgdir/etc/profile.d/plan9.sh" || return 1 + + install -dm755 "$pkgdir/opt" "$pkgdir/usr/share/doc/$pkgname" || return 1 + mv "$srcdir/plan9" "$pkgdir/opt" + + cd "$pkgdir/opt/plan9" + ./INSTALL || return 1 + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1 + + # Don't need these under /opt/plan9. + rm -rf .hg/ + rm -f .hgignore .hgtags + find . -name '.cvsignore' -print0 |xargs -0 rm -f + rm -f config install.log install.sum install.txt configure Makefile INSTALL \ + LICENSE + + borkedfiles=`grep -r "$pkgdir"/opt/plan9 * | grep -v Binary | cut -d\: -f1` + for f in $borkedfiles; do + echo "fixing hardcoded paths in $f" + sed -i "s@$pkgdir/opt/plan9@/opt/plan9@" $f || return 1 + done + + find "$pkgdir" -name '*.py' -print0 |xargs -0 \ + sed -i -e 's,^#!/usr/bin/env python$,#!/usr/bin/env python2,' \ + -e 's,^#!/usr/bin/python$,#!/usr/bin/python2,' + + for i in CHANGES CONTRIBUTORS README TODO + do + install -m644 $i "$pkgdir/usr/share/doc/$pkgname" || return 1 + rm -f $i + done +} +md5sums=('c9942871a4008ecc297a27e8295fdcf0' + '9695eb15a247e23140e8a35ff52a5c20') diff --git a/community/plan9port/plan9.install b/community/plan9port/plan9.install new file mode 100644 index 000000000..23d047c8c --- /dev/null +++ b/community/plan9port/plan9.install @@ -0,0 +1,42 @@ +pre_install() { + /bin/true +} + +post_install() { + echo "==> Decompressing man plan9 man pages" + for i in `find /opt/plan9/man -type f`; do + if [ ${i##*.} = "gz" ]; then +# echo " ${i%%.*}..." + gunzip $i + fi + done + + echo "" + echo "==> In order to use Plan9 specific apps, run them" + echo " as arguments to the '9' script, i.e. '9 date'" + echo "==> Please log off or 'source /etc/profile.d/plan9.sh'" + echo "==> Run '9 man 1 intro | less' to begin" + source /etc/profile.d/plan9.sh + /bin/true +} + +pre_upgrade() { + post_remove + /bin/true +} + +post_upgrade() { + post_install + /bin/true +} + +pre_remove() { + /bin/true +} + +post_remove() { + #we had to unpack them so they won't get removed.... + rm -rf /opt/plan9/man + /bin/true +} + diff --git a/community/plan9port/plan9.sh b/community/plan9port/plan9.sh new file mode 100755 index 000000000..84c3d7ef4 --- /dev/null +++ b/community/plan9port/plan9.sh @@ -0,0 +1,2 @@ +export PLAN9=/opt/plan9 +export PATH=$PATH:$PLAN9/bin |