summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergiusz Urbaniak2015-07-08 16:13:52 +0200
committerSergiusz Urbaniak2015-07-08 16:13:52 +0200
commit30638ce7cc58c50bc4783e6a18238f00bd49343b (patch)
tree61b7e08853528f3069b826dbe25b9387235f8c0b
downloadaur-30638ce7cc58c50bc4783e6a18238f00bd49343b.tar.gz
initial commit
-rw-r--r--.SRCINFO27
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD71
-rw-r--r--plan9.install8
-rw-r--r--plan9.sh4
5 files changed, 114 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..1fbde831da3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = plan9port-git
+ pkgdesc = port of many Plan 9 programs to Unix-like operating systems
+ pkgver = 5d86ecd
+ pkgrel = 1
+ url = http://swtch.com/plan9port/
+ install = plan9.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = git
+ depends = xorg-server
+ depends = libxt
+ depends = libxext
+ depends = fuse
+ optdepends = python2: for the codereview script
+ provides = plan9
+ conflicts = 9base
+ conflicts = plan9port
+ options = !zipman
+ options = staticlibs
+ source = git+https://github.com/9fans/plan9port
+ source = plan9.sh
+ md5sums = SKIP
+ md5sums = c884c3c90a107f1a178718c304c67d30
+
+pkgname = plan9port-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..6f5dbced0fc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg
+plan9port
+plan9port*.tar.xz
+src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f0060367e42
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Andrew Antle <andrew dot antle at gmail dot com>
+# Contributor: Calvin McAnarney <csm@gmx.us>
+# Contributor: Julien Pecqueur <jpec@julienpecqueur.com>
+# Contributor: Sergiusz Urbaniak <sergiusz.urbaniak@gmail.com>
+
+pkgname=plan9port-git
+pkgver=5d86ecd
+pkgrel=1
+pkgdesc="port of many Plan 9 programs to Unix-like operating systems"
+arch=('i686' 'x86_64')
+url="http://swtch.com/plan9port/"
+license=('custom')
+depends=('xorg-server' 'libxt' 'libxext' 'fuse')
+optdepends=('python2: for the codereview script')
+makedepends=('git')
+provides=('plan9')
+install='plan9.install'
+conflicts=('9base' 'plan9port')
+options=('!zipman' 'staticlibs')
+source=('git+https://github.com/9fans/plan9port'
+ 'plan9.sh')
+md5sums=('SKIP'
+ 'c884c3c90a107f1a178718c304c67d30')
+
+package() {
+ cd "$srcdir/plan9port"
+
+ # Try the gentoo way for fixing hardcoded paths
+ PLAN9=/usr/lib/plan9
+ grep --null -l -r '/usr/local/plan9' | xargs --null sed -i "s!/usr/local/plan9!${PLAN9}!g"
+
+ d=usr/lib
+
+ ./INSTALL -b
+ install -Dm755 ../../plan9.sh "$pkgdir/etc/profile.d/plan9.sh"
+ install -d "$pkgdir/$d"
+ install -d "$pkgdir/usr/share/doc/$pkgname"
+ cp -r "$srcdir/plan9port" "$pkgdir/$d/plan9"
+ cd "$pkgdir/$d/plan9"
+ ./INSTALL -c -r "$pkgdir/$d/plan9"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Clean up
+ rm -rf .git/
+ rm -f .gitignore
+ rm -f config install.log install.sum install.txt configure Makefile INSTALL \
+ LICENSE
+
+ # Fix python scripts
+ find "$pkgdir" -name '*.py' -print0 |xargs -0 \
+ sed -i -e 's,^#!/usr/bin/env python$,#!/usr/bin/python2,' \
+ -e 's,^#!/usr/bin/python$,#!/usr/bin/python2,'
+
+ # Package text files
+ for i in CHANGES CONTRIBUTORS README.md TODO; do
+ install -m644 $i "$pkgdir/usr/share/doc/$pkgname"
+ rm -f $i
+ done
+
+ # Decompress the plan9 man pages
+ for i in `find $pkgdir/$d/plan9/man -type f`; do
+ if [ ${i##*.} = "gz" ]; then
+ gunzip "$i"
+ fi
+ done
+
+ # Once more
+ grep --null -l -r "$pkgdir$PLAN9" | xargs --null sed -i "s!$pkgdir$PLAN9!${PLAN9}!g" || true
+ grep --null -l -r "/build/plan9port/pkg/plan9port/$PLAN9" | xargs --null sed -i "s!/build/plan9port/pkg/plan9port/$PLAN9!${PLAN9}!g" || true
+}
+
diff --git a/plan9.install b/plan9.install
new file mode 100644
index 00000000000..1d361127ffe
--- /dev/null
+++ b/plan9.install
@@ -0,0 +1,8 @@
+post_install() {
+ 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
+}
diff --git a/plan9.sh b/plan9.sh
new file mode 100644
index 00000000000..0cce7dc8349
--- /dev/null
+++ b/plan9.sh
@@ -0,0 +1,4 @@
+export PLAN9=/usr/lib/plan9
+export PATH=$PATH:$PLAN9/bin
+export ROOTPATH=$ROOTPATH:$PLAN9/bin
+export MANPATH=$MANPATH:$PLAN9/man