arch-pkgs/check-sieve/PKGBUILD

48 lines
1.2 KiB
Text
Raw Normal View History

# Maintainer: Geoffrey Frogeye <geoffrey+aur@frogeye.fr>
# Contributor: George Rawlinson <grawlinson@archlinux.org>
pkgname=check-sieve
pkgver=0.7
pkgrel=1
pkgdesc="Syntax checker for Sieve scripts"
arch=('x86_64')
url="https://github.com/dburkart/check-sieve"
license=('MIT')
depends=('gcc-libs')
checkdepends=('python')
source=("$url/archive/$pkgname-$pkgver.tar.gz")
sha512sums=('8e54c0a288d419911ed7c85add778746e0c06953c687bf4316c08c8a13d4cbced8116b8c26ae37a601dd99c6110a515f41e299a33bccb9952ea63909066b0e8d')
b2sums=('56e35e6c19a52aafed3b4cbc26cf202740056917d770d507b7765f913a6667a5002faef34f47f329aab9734bd811a023cb3904fb2cb6ab32939ba389fdff9fb6')
prepare() {
# rename extracted folder for convenience
mv "$pkgname-$pkgname-$pkgver" "$pkgname-$pkgver"
# ensure LDFLAGS are passed to compiler
sed -i '/\t$(CXX).*/s/$/ $(LDFLAGS)/' "$pkgname-$pkgver/Makefile"
}
build() {
cd "$pkgname-$pkgver"
make
}
check() {
cd "$pkgname-$pkgver"
make test
}
package() {
cd "$pkgname-$pkgver"
make INSTALL_PREFIX="$pkgdir/usr" install
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
# fix incorrect permissions on library
chmod 644 "$pkgdir/usr/lib/libchecksieve.a"
}