diff options
author | Dimitris Kiziridis | 2020-05-20 08:56:00 +0300 |
---|---|---|
committer | Dimitris Kiziridis | 2020-05-20 08:56:00 +0300 |
commit | dd0b0681806d38107d736cf8592609f624bd26b6 (patch) | |
tree | 50a3e0ef6398db894efc64a89eb11b679a6a93ae /PKGBUILD | |
parent | 96baecb0b71f4e928565180d65ea13faa2870c81 (diff) | |
download | aur-dd0b0681806d38107d736cf8592609f624bd26b6.tar.gz |
update pkgbuild, go-pie replaced
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -9,33 +9,33 @@ url='https://github.com/jutkko/copy-pasta' license=('MIT') provides=("${pkgname%-git}") depends=('glibc') -makedepends=('git' 'dep' 'go-pie') +makedepends=('git' 'go') source=("git+${url}") sha256sums=('SKIP') pkgver() { - cd "${srcdir}/${pkgname%-git}" + cd "${srcdir}/copy-pasta" git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - mkdir -p gopath/src/github.com/${pkgname%-git} - ln -rTsf ${pkgname%-git} gopath/src/github.com/${pkgname%-git}/${pkgname%-git} - export GOPATH="$srcdir"/gopath - cd gopath/src/github.com/${pkgname%-git}/${pkgname%-git} - if [[ ! -f Gopkg.toml ]]; then - dep init -v - fi - dep ensure -v + cd "${srcdir}/${pkgname%-git}" + mkdir -p build/ } build() { - export GOPATH="$srcdir"/gopath - cd gopath/src/github.com/${pkgname%-git}/${pkgname%-git} - go install -v . + cd "${srcdir}/copy-pasta" + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + go get -d -v ./... + go build -o build ./... } package() { - install -Dm755 "${srcdir}/gopath/bin/${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}" - install -Dm644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + cd "${srcdir}/copy-pasta" + install -Dm755 build/copy-pasta "${pkgdir}/usr/bin/copy-pasta" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }
\ No newline at end of file |