diff options
author | Andy Weidenbaum | 2016-01-04 22:39:08 -0800 |
---|---|---|
committer | Andy Weidenbaum | 2016-01-04 22:39:08 -0800 |
commit | d2d74ccc4ffa880172882d011a8b4cc6d8376f5d (patch) | |
tree | 078adf2c1eda44b878feda1e77da55005bec2f3c /PKGBUILD | |
download | aur-d2d74ccc4ffa880172882d011a8b4cc6d8376f5d.tar.gz |
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c27b0140081d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Andy Weidenbaum <archbaum@gmail.com> + +pkgname=perl6-linux-cpuinfo +pkgver=0.0.5 +pkgrel=1 +pkgdesc="Get the kernel CPU information on Linux" +arch=('any') +depends=('perl6') +checkdepends=('perl') +makedepends=('alacryd' 'git') +groups=('perl6') +url="https://github.com/jonathanstowe/p6-Linux-Cpuinfo" +license=('PerlArtistic') +source=($pkgname-$pkgver::git+https://github.com/jonathanstowe/p6-Linux-Cpuinfo) +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 '{}' \; + find "$pkgdir" -type f -print0 | xargs -0 sed -i "s,$pkgdir,,g" +} |