summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndy Weidenbaum2016-01-08 21:17:01 -0800
committerAndy Weidenbaum2016-01-08 21:17:01 -0800
commit775a18dc0651ebb87186d9286256e5820311400e (patch)
treee9bfe5d4870ad01270963df60901a7701093f13e /PKGBUILD
downloadaur-775a18dc0651ebb87186d9286256e5820311400e.tar.gz
Initial import
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 00000000000..14a0acbeb49
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+
+pkgname=perl6-template-mojo
+pkgver=0.1
+pkgrel=1
+pkgdesc="A templating system similar to Perl 5's Mojo::Template"
+arch=('any')
+depends=('perl6')
+checkdepends=('perl')
+makedepends=('alacryd' 'git')
+groups=('perl6')
+url="https://github.com/tadzik/Template-Mojo"
+license=('MIT')
+source=($pkgname-$pkgver::git+https://github.com/tadzik/Template-Mojo)
+sha256sums=('SKIP')
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ msg2 'Running tests...'
+ PERL6LIB=lib prove -r -e perl6
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ msg2 'Installing license...'
+ install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+
+ msg2 'Installing documentation...'
+ install -Dm 644 README -t "$pkgdir/usr/share/doc/$pkgname"
+
+ msg2 'Installing...'
+ install -dm 755 "$pkgdir/usr/share/perl6/vendor"
+ export RAKUDO_LOG_PRECOMP=1
+ export PERL6LIB="inst#$pkgdir/usr/share/perl6/vendor"
+ alacryd install
+
+ msg2 'Removing redundant precomp file dependencies...'
+ _precomp=($(pacman -Qg perl6 \
+ | awk '{print $2}' \
+ | xargs pacman -Ql \
+ | awk '{print $2}' \
+ | grep precomp))
+ for _pc in "${_precomp[@]}"; do
+ [[ -f "$pkgdir/$_pc" ]] && rm -f "$pkgdir/$_pc"
+ done
+
+ msg2 'Cleaning up pkgdir...'
+ find "$pkgdir" -type f -name "*.lock" -exec rm '{}' \;
+}