summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD51
2 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..88936d1eccc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+# Generated by mksrcinfo v8
+# Sat Jan 9 07:00:41 UTC 2016
+pkgbase = perl6-http-parser
+ pkgdesc = HTTP parser
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = https://github.com/tokuhirom/p6-HTTP-Parser
+ arch = any
+ groups = perl6
+ license = PerlArtistic
+ checkdepends = perl
+ makedepends = alacryd
+ makedepends = git
+ depends = perl6
+ source = perl6-http-parser-0.0.1::git+https://github.com/tokuhirom/p6-HTTP-Parser
+ sha256sums = SKIP
+
+pkgname = perl6-http-parser
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..fba016c0a6c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+
+pkgname=perl6-http-parser
+pkgver=0.0.1
+pkgrel=1
+pkgdesc="HTTP parser"
+arch=('any')
+depends=('perl6')
+checkdepends=('perl')
+makedepends=('alacryd' 'git')
+groups=('perl6')
+url="https://github.com/tokuhirom/p6-HTTP-Parser"
+license=('PerlArtistic')
+source=($pkgname-$pkgver::git+https://github.com/tokuhirom/p6-HTTP-Parser)
+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.md -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 '{}' \;
+}