diff options
author | Chih-Hsuan Yen | 2023-10-10 00:28:29 +0800 |
---|---|---|
committer | Chih-Hsuan Yen | 2023-10-10 00:29:11 +0800 |
commit | 07a5f14b9641e2c2ec84f8a753f951e458570f7b (patch) | |
tree | 93fdc77e2db8c61f01f11aa3c24aa9a4bc2846f6 /PKGBUILD | |
parent | 5d16ca4a4a570beb13765477d9db5349b34eadcc (diff) | |
download | aur-07a5f14b9641e2c2ec84f8a753f951e458570f7b.tar.gz |
resticprofile: update and switch to git-based build
So that _commit_hash is updated automatically
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -1,22 +1,22 @@ -# Maintainer: Matthew Gamble <git@matthewgamble.net> +# Maintainer: Chih-Hsuan Yen <base64_decode("eXUzYWN0eHQydHR0ZmlteEBjaHllbi5jYwo=")> +# Contributor: Matthew Gamble <git@matthewgamble.net> # Contributor: Kyle Brennan <kyle@metalspork.xyz> pkgname=resticprofile -pkgver=0.19.0 -_commit_hash="01bbd7852d09fc05fcbda22ace207b315550c741" +pkgver=0.23.0 pkgrel=1 pkgdesc="Configuration profiles manager and scheduler for restic backup" arch=("x86_64") url="https://github.com/creativeprojects/resticprofile" license=("GPL3") depends=("glibc" "restic") -makedepends=("go") +makedepends=("go" "git") options=(!lto) -source=("https://github.com/creativeprojects/resticprofile/archive/v${pkgver}.tar.gz") -sha256sums=("304c370965735be61d0947d13bef18099a9cc1754bb7bd38350f690c057e808d") +source=("git+https://github.com/creativeprojects/resticprofile.git#tag=v$pkgver") +sha256sums=('SKIP') build() { - cd "resticprofile-${pkgver}" + cd resticprofile export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" @@ -25,12 +25,13 @@ build() { export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" LC_ALL=C _build_date="$(date)" + _commit_hash=$(git rev-parse HEAD) go build -o resticprofile -v -ldflags "-X 'main.commit=${_commit_hash}' -X 'main.date=${_build_date}' -X 'main.builtBy=makepkg'" } package() { - cd "resticprofile-${pkgver}" + cd resticprofile install -Dm755 resticprofile "${pkgdir}/usr/bin/resticprofile" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/resticprofile/LICENSE" |