44 lines
1.1 KiB
Bash
44 lines
1.1 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-git
|
|
_pkgname=pdfcpu
|
|
provides=(pdfcpu)
|
|
conflicts=(pdfcpu)
|
|
pkgver=v0.6.0.r2.gb89d7b1
|
|
pkgrel=1
|
|
pkgdesc='A PDF processor written in Go.'
|
|
arch=(x86_64)
|
|
url='https://github.com/hhrutter/pdfcpu'
|
|
license=('Apache')
|
|
makedepends=(go)
|
|
source=("$_pkgname"'::git+https://github.com/pdfcpu/pdfcpu.git')
|
|
b2sums=(SKIP)
|
|
|
|
build() {
|
|
cd $_pkgname
|
|
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 ./cmd/pdfcpu
|
|
}
|
|
|
|
pkgver() {
|
|
cd "$_pkgname"
|
|
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
|
}
|
|
|
|
# check() {
|
|
# cd $_pkgname-$pkgver
|
|
# ./coverage.sh
|
|
# }
|
|
|
|
package() {
|
|
cd $_pkgname
|
|
install -Dm755 pdfcpu "$pkgdir/usr/bin/$_pkgname"
|
|
}
|