1 # Contributor: joyfulgirl <joyfulgirl (at) archlinux (dot) us>
6 pkgdesc="Port of various original Plan9 tools to unix"
7 url="http://suckless.org"
8 conflicts=('plan9port' '9rc-devel' '9base')
10 arch=('i686' 'x86_64')
13 source=('9' 'plan9.sh')
14 md5sums=('ae7108b9f26bed388e9055f35eef2986'
15 '62a9e52043d9c32967fcae9018fffb56')
17 _hgroot="http://hg.suckless.org/"
22 msg "Connecting to $_hgroot"
23 if [ -d $_hgrepo ]; then
25 hg pull -u || return 1
26 msg2 "Finished updating the local repository!"
28 hg clone ${_hgroot}/${_hgrepo} "${srcdir}/${_hgrepo}" || return 1
29 msg2 "Initial pull complete!"
32 if [ -d "${srcdir}/${_hgrepo}-build" ]; then
33 cd "${srcdir}/${_hgrepo}-build"
34 make clean || return 1
35 hg pull -u "${srcdir}/${_hgrepo}" || return 1
37 hg clone "${srcdir}/${_hgrepo}" "${srcdir}/${_hgrepo}-build" || return 1
38 cd "${srcdir}/${_hgrepo}-build"
42 i686) sed -i 's#^OBJTYPE\s.*$#OBJTYPE = 386#' config.mk ;;
43 x86_64) sed -i 's#^OBJTYPE\s.*$#OBJTYPE = x86_64#' config.mk ;;
46 sed -i 's#^PREFIX\s.*$#PREFIX = /opt/plan9#' config.mk
52 cd "${srcdir}/${_hgrepo}-build"
53 make DESTDIR="$pkgdir" install || return 1
54 install -m755 "${srcdir}/9" "${pkgdir}/opt/plan9/bin/" || return 1
55 install -d -m755 "$pkgdir/etc/profile.d/" || return 1
56 install -m755 "${srcdir}/plan9.sh" "$pkgdir/etc/profile.d/" || return 1
57 install -D -m644 LICENSE "$pkgdir/usr/share/licenses/9base/LICENSE" || return 1