summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorfrnmst/Franco Masotti2016-10-06 15:17:32 +0200
committerfrnmst/Franco Masotti2016-10-06 15:17:32 +0200
commit31e0f4e41c7e398cee86cebc02462b19f549702d (patch)
tree9375e41a4acf8699d322a568b005a79568587011 /PKGBUILD
downloadaur-31e0f4e41c7e398cee86cebc02462b19f549702d.tar.gz
First commit.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8c63612ea4c7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Franco Masotti <franco dot masotti at student dot unife dot it>
+pkgname=swish-cplint
+pkgver=r8.13b29c6
+pkgrel=1
+pkgdesc="SWI-Prolog for SHaring: a SWI-Prolog web IDE integrated with the cplint suite"
+arch=('x86_64')
+url="git://github.com/friguzzi/swish"
+license=('BSD')
+depends=('swi-prolog-devel'
+ 'r')
+makedepends=('git'
+ 'bower'
+ 'sed')
+conflicts=('swish')
+install=.INSTALL
+source=('git://github.com/friguzzi/swish#branch=master')
+md5sums=('SKIP')
+
+prepare() {
+ # Edit the .INSTALL script.
+ sed \
+ -e "s@startdir=.*@startdir="${startdir}"@" \
+ -i ${startdir}/.INSTALL
+}
+
+build() {
+ cd ${srcdir}/swish
+ bower --allow-root install
+ make src
+ # Patch
+ cp ${startdir}/run.pl .
+ cp ${startdir}/run.sh .
+}
+
+pkgver () {
+ cd ${srcdir}/swish
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+package() {
+ cd ${srcdir}
+ install -d ${pkgdir}/usr/share/${pkgname}
+ install -d ${pkgdir}/usr/bin
+ cp -r swish/* ${pkgdir}/usr/share/${pkgname}
+ install -D -m644 swish/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m644 ${startdir}/${pkgname}.service "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
+ ln -s /usr/share/${pkgname}/run.sh ${pkgdir}/usr/bin/${pkgname}
+}