diff options
author | Jim Fowler | 2017-05-18 09:50:35 -0400 |
---|---|---|
committer | Jim Fowler | 2017-05-18 09:50:35 -0400 |
commit | b8a9af7372e5daf856c0fb2dd31f6b9a437dbeee (patch) | |
tree | f53becf2ff517a058a0d5484f66c49deea8ac159 | |
download | aur-b8a9af7372e5daf856c0fb2dd31f6b9a437dbeee.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 84 |
2 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ea551683b960 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = xake-git + pkgdesc = A build system for Ximera documents + pkgver = 1 + pkgrel = 1 + url = https://github.com/XimeraProject/xake/ + arch = x86_64 + arch = i686 + license = MIT + makedepends = go + makedepends = git + depends = mupdf-tools + depends = texlive-htmlxml + options = !strip + options = !emptydirs + source = git+https://github.com/XimeraProject/xake.git + md5sums = SKIP + +pkgname = xake-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6788f327f29a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,84 @@ +# Maintainer: Jim Fowler <fowler@math.osu.edu> + +pkgname=xake-git +_pkgname=xake +pkgver=1 +pkgrel=1 +pkgdesc="A build system for Ximera documents" +arch=('x86_64' 'i686') +url="https://github.com/XimeraProject/xake/" +license=('MIT') +depends=('mupdf-tools' 'texlive-htmlxml') +makedepends=('go' 'git') +options=('!strip' '!emptydirs') +_gourl=github.com/XimeraProject/pdiff +source=("git+https://github.com/XimeraProject/xake.git") +md5sums=('SKIP') + +pkgver() { + cd "$_pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + export GOROOT=/usr/lib/go + + rm -rf build + mkdir -p build/go + cd build/go + + for f in "$GOROOT/"*; do + ln -s "$f" + done + + rm pkg + mkdir pkg + cd pkg + + for f in "$GOROOT/pkg/"*; do + ln -s "$f" + done + + platform=`for f in "$GOROOT/pkg/"*; do echo \`basename $f\`; done|grep linux` + + rm -f "$platform" + mkdir "$platform" + cd "$platform" + + for f in "$GOROOT/pkg/$platform/"*.h; do + ln -s "$f" + done + + export GOROOT="$srcdir/build/go" + export GOPATH="$srcdir/build" + + go get -fix "$_gourl" + + # Prepare executable + if [ -d "$srcdir/build/src" ]; then + cd "$srcdir/build/src/$_gourl" + go build -o "$srcdir/build/$pkgname" + else + echo 'Old sources for a previous version of this package are already present!' + echo 'Build in a chroot or uninstall the previous version.' + return 1 + fi +} + +package() { + export GOROOT="$GOPATH" + + # Package license (if available) + for f in LICENSE COPYING; do + if [ -e "$srcdir/build/src/$_gourl/$f" ]; then + install -Dm644 "$srcdir/build/src/$_gourl/$f" \ + "$pkgdir/usr/share/licenses/$pkgname/$f" + fi + done + + # Package executables + if [ -e "$srcdir/build/$pkgname" ]; then + install -Dm755 "$srcdir/build/$pkgname" \ + "$pkgdir/usr/bin/$_pkgname" + fi +} |