36 lines
1.0 KiB
Bash
36 lines
1.0 KiB
Bash
# Maintainer: Marco Rubin <marco.rubin@protonmail.com>
|
|
# Contributor: Noel Kuntze <noel.kuntze at thermi dot consulting>
|
|
# Contributor: Mikael Eriksson <mikael_eriksson@miffe.org>
|
|
# Contributor: Stephan Eisvogel <eisvogel at embinet dot de
|
|
|
|
pkgname=pdfcpu
|
|
pkgver=0.6.0
|
|
pkgrel=2
|
|
pkgdesc='A PDF processor written in Go.'
|
|
arch=(x86_64)
|
|
url='https://github.com/hhrutter/pdfcpu'
|
|
license=('Apache')
|
|
makedepends=(go)
|
|
source=($url/archive/v$pkgver.tar.gz)
|
|
b2sums=('f00ee93f1f8c1b1e7c398831f4cdff393d5a01b32753f6cffc5cd3cb2222c562d5a87b9cd31be96683ba4894be63edd2852ec0e1b47078cb77546f6bea1f37ba')
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver/cmd/pdfcpu
|
|
export CGO_CPPFLAGS="$CPPFLAGS"
|
|
export CGO_CFLAGS="$CFLAGS"
|
|
export CGO_CXXFLAGS="$CXXFLAGS"
|
|
export CGO_LDFLAGS="$LDFLAGS"
|
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
|
go build -buildvcs=false
|
|
}
|
|
|
|
check() {
|
|
cd $pkgname-$pkgver
|
|
./coverage.sh
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver/cmd/pdfcpu
|
|
install -Dm755 pdfcpu "$pkgdir/usr/bin/$pkgname"
|
|
}
|