blob: d7082d6756d65babecd93f9ad224b02bc25195e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# $Id: PKGBUILD 102625 2013-12-16 21:54:40Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: phrakture <aaronmgriffin--gmail--com>
# Contributor: Fazlul Shahriar
# Contributor: Chris Brannon <cmbrannon79@gmail.com>
pkgname=plan9port
pkgver=20131024
pkgrel=2
pkgdesc='Port of many programs from Plan 9 to Unix-like operating systems'
arch=('x86_64' 'i686')
url='http://swtch.com/plan9port/'
license=('custom')
depends=('xorg-server' 'libxt' 'libxext' 'fuse')
optdepends=('python2: for the codereview script')
provides=('plan9')
install='plan9.install'
options=('!zipman' 'staticlibs')
source=("http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tgz"
'plan9.sh')
sha256sums=('5cba7856bdb35a96a923120e61d320d424fee1a6f09b7af3e87eb7814a747d4f'
'c216efa3455ba0b22b1723ae62e4c1e21b3a776a760d8fcedb902ff994b701c1')
package() {
cd "$pkgname"
# TODO: Find a way to install in a better directory than /usr/local/plan9
d=usr/local
./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/$pkgname" "$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 .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
# Fix hardcoded paths
#for f in `grep -H -r "$pkgdir$d/$pkgname" | cut -d: -f1`; do
# echo -n "\t$f"
# [ -e "$f" ] && sed -i "s:$pkgdir$d/$pkgname:$d/$pkgname:" "$f" || true
#done
# 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 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
}
# vim:set ts=2 sw=2 et:
|