This commit is contained in:
Marco Rubin 2022-09-26 20:26:01 +02:00
parent 37a2dd674b
commit d6e24c804e
2 changed files with 23 additions and 34 deletions

View File

@ -1,15 +1,13 @@
pkgbase = pdfcpu pkgbase = pdfcpu
pkgdesc = A PDF processor written in Go pkgdesc = A PDF processor written in Go.
pkgver = 0.1.23 pkgver = 0.3.13
pkgrel = 1 pkgrel = 1
url = https://github.com/hhrutter/pdfcpu url = https://github.com/hhrutter/pdfcpu
arch = i686
arch = x86_64 arch = x86_64
arch = armv7h
license = Apache license = Apache
makedepends = go makedepends = go
source = pdfcpu-0.1.23.tar.gz::https://github.com/hhrutter/pdfcpu/archive/v0.1.23.tar.gz conflicts = pdfcpu-git
sha256sums = 817eae6cf8653b3a15d3763c0ae441e62e8339586943357a20b442e829072423 source = https://github.com/hhrutter/pdfcpu/archive/refs/tags/v0.3.13.tar.gz
b2sums = 90ae1a776d597f49e5f6a39dc5c4b46830b93713c4782737486d273097d2118fccd1274eb517d468cffb92adfc4f0e6685bb75d3dc59c5696c2de332954cfda1
pkgname = pdfcpu pkgname = pdfcpu

View File

@ -1,40 +1,31 @@
# Maintainer: Noel Kuntze <noel.kuntze at thermi dot consulting> # Maintainer: Marco Rubin <marco.rubin@protonmail.com>
# Contributor: Noel Kuntze <noel.kuntze at thermi dot consulting>
# Contributor: Mikael Eriksson <mikael_eriksson@miffe.org> # Contributor: Mikael Eriksson <mikael_eriksson@miffe.org>
# Contributor: Stephan Eisvogel <eisvogel at embinet dot de # Contributor: Stephan Eisvogel <eisvogel at embinet dot de
pkgname=pdfcpu pkgname=pdfcpu
_gourl=github.com/hhrutter/pdfcpu pkgver=0.3.13
pkgver=0.1.23
pkgrel=1 pkgrel=1
pkgdesc="A PDF processor written in Go" pkgdesc='A PDF processor written in Go.'
arch=(i686 x86_64 armv7h) arch=(x86_64)
url="https://github.com/hhrutter/pdfcpu" url='https://github.com/hhrutter/pdfcpu'
license=('Apache') license=('Apache')
conflicts=(pdfcpu-git)
makedepends=(go) makedepends=(go)
source=($url/archive/refs/tags/v$pkgver.tar.gz)
source=(pdfcpu-$pkgver.tar.gz::https://$_gourl/archive/v$pkgver.tar.gz) b2sums=('90ae1a776d597f49e5f6a39dc5c4b46830b93713c4782737486d273097d2118fccd1274eb517d468cffb92adfc4f0e6685bb75d3dc59c5696c2de332954cfda1')
sha256sums=('817eae6cf8653b3a15d3763c0ae441e62e8339586943357a20b442e829072423')
prepare() {
export GOPATH="${srcdir}/build"
mkdir -p "${GOPATH}/src/github.com/hhrutter/"
mv "${srcdir}/${pkgname}-${pkgver}" "${GOPATH}/src/$_gourl"
go get -v $_gourl/cmd/${pkgname}
}
build() { build() {
export GOPATH="${srcdir}/build" cd $pkgname-$pkgver/cmd/pdfcpu
cd "${GOPATH}/src/$_gourl/cmd/${pkgname}" export CGO_CPPFLAGS="${CPPFLAGS}"
go build -pkgdir "${pkgdir}" 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
} }
package() { package() {
# copy binary cd $pkgname-$pkgver/cmd/pdfcpu
install -Dm0755 "${srcdir}/build/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" install -Dm755 pdfcpu "$pkgdir/usr/bin/$pkgname"
# copy README.md and other documentation
install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" "${srcdir}/build/src/$_gourl/README.md"
# copy the license
install -Dm644 "${srcdir}/build/src/${_gourl}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
} }