summaryrefslogtreecommitdiff
path: root/ceres/PKGBUILD
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-05-21 15:29:08 +0200
committerxengineering <me@xengineering.eu>2024-05-22 20:36:49 +0200
commit963eb51234fa733bdb22d645b7101c62fef6ad90 (patch)
tree4488118fd2af1f46315b7d6f8d9405f2b4f0392e /ceres/PKGBUILD
parent9c29ca10230a486b5fe4aad78364a069beca8b2d (diff)
downloadpkgbuilds-963eb51234fa733bdb22d645b7101c62fef6ad90.tar
pkgbuilds-963eb51234fa733bdb22d645b7101c62fef6ad90.tar.zst
pkgbuilds-963eb51234fa733bdb22d645b7101c62fef6ad90.zip
ceres: Version 0.4.0-1
Diffstat (limited to 'ceres/PKGBUILD')
-rw-r--r--ceres/PKGBUILD56
1 files changed, 41 insertions, 15 deletions
diff --git a/ceres/PKGBUILD b/ceres/PKGBUILD
index 9a80003..02dab78 100644
--- a/ceres/PKGBUILD
+++ b/ceres/PKGBUILD
@@ -1,32 +1,58 @@
# Maintainer: xengineering <me@xengineering.eu>
pkgname=ceres
-pkgver=0.3.1
+pkgver=0.4.0
pkgrel=1
pkgdesc="Recipe server for your favorite dishes"
arch=('x86_64' 'aarch64')
-url="https://xengineering.eu/git/ceres"
+url='https://xengineering.eu/git/ceres'
license=('AGPL')
makedepends=('coreutils' 'git' 'make' 'go')
backup=('etc/ceres/config.json')
-source=("https://cgit.xengineering.eu/ceres/snapshot/ceres-${pkgver}.tar.zst"
+source=("git+https://cgit.xengineering.eu/ceres#tag=$pkgver?signed"
'ceres.service'
'sysuser.conf'
- 'ceres.tmpfile.d')
-sha256sums=('d558212251c077b3420c09c6e7c57e9dff5c85173f4d9d4b00f411fa19c7005e'
- 'da4b6201e9bcf2cc3ae94b274338b58abc5368d77e0df1ece578644a415d8ace'
+ 'ceres.tmpfile.d'
+ '0001-Disable-logging-time-stamps.patch'
+ '0002-Select-default-storage.patch')
+sha256sums=('SKIP'
+ '7b9284940f307a63547d2346e53431842d8bb3e37eb87a422948fdddd8e09a12'
'a8c7c3d6af65bd7255b0f693430c6ba53d646123feebec9a1e37f8723c21942b'
- '5a953a802b1478dd7f7e32dbd8ac8d97946bbef0579e3cce4b87e32151855e51')
+ '5a953a802b1478dd7f7e32dbd8ac8d97946bbef0579e3cce4b87e32151855e51'
+ 'ee87321e1be9aa8c6fbc1f8dc0d704d6ad7de72d28d8de35d360165d9cbcd62f'
+ 'b58224a1fa194320e7da97a8d04f14eac2d67e48314f8ccc9ddff250aa2f40c5')
+
+validpgpkeys=(
+ 'A13B258878787F943F6C68F00FD1F84233FA8900' # xengineering <me@xengineering.eu>
+)
+
+prepare() {
+ patch "${srcdir}/${pkgname}/main.go" 0001-Disable-logging-time-stamps.patch
+ patch "${srcdir}/${pkgname}/default_config.json" 0002-Select-default-storage.patch
+ cd "${srcdir}/${pkgname}"
+ git submodule init
+ git submodule update
+}
build() {
- cd "$pkgname-$pkgver"
- make
+ cd "${srcdir}/${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 -ldflags "-X main.version=${pkgver}" -o "build/${pkgname}" xengineering.eu/ceres
+}
+
+check() {
+ cd "${srcdir}/${pkgname}"
+ make tests
}
package() {
- cd "$pkgname-$pkgver"
- make DESTDIR="$pkgdir" install
- rm -rf "${pkgdir}/var"
- install -Dm644 "${srcdir}"/ceres.service "${pkgdir}"/usr/lib/systemd/system/ceres.service
- install -Dm644 "${srcdir}"/sysuser.conf "${pkgdir}"/usr/lib/sysusers.d/ceres.conf
- install -Dm644 "${srcdir}"/ceres.tmpfile.d "${pkgdir}"/usr/lib/tmpfiles.d/ceres.conf
+ cd "${srcdir}/${pkgname}"
+ install -D -m 755 "${srcdir}/${pkgname}/build/ceres" "${pkgdir}/usr/bin/ceres"
+ install -D -m 644 "${srcdir}/${pkgname}/default_config.json" "${pkgdir}/etc/ceres/config.json"
+ install -D -m 644 "${srcdir}/ceres.service" "${pkgdir}/usr/lib/systemd/system/ceres.service"
+ install -D -m 644 "${srcdir}/sysuser.conf" "${pkgdir}/usr/lib/sysusers.d/ceres.conf"
+ install -D -m 644 "${srcdir}/ceres.tmpfile.d" "${pkgdir}/usr/lib/tmpfiles.d/ceres.conf"
}