# Maintainer: Cristian Cezar Moisés # SPDX-License-Identifier: AGPL-3.0-or-later # # AUR submission instructions: # 1. Run `make dist` upstream to produce zupt-VERSION.tar.gz. # 2. Upload that tarball to the canonical GitHub release. # 3. Update `source=()` URL and `sha256sums=()` below. # 4. Run `makepkg --printsrcinfo > .SRCINFO` in this directory. # 5. Commit and push to the separately maintained AUR package repository. # # Test locally with `makepkg -s` after the release archive is published. pkgname=zupt pkgver=5.2.3 pkgrel=1 pkgdesc='Pure-C11 post-quantum backup compression utility (AES-256-CTR + HMAC-SHA256 + ML-KEM-768 + X25519)' arch=('x86_64') url='https://github.com/cristiancmoises/zupt' license=('AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0') depends=('glibc') makedepends=('gcc' 'git' 'make') checkdepends=('python') source=("${pkgname}-${pkgver}.tar.gz::https://github.com/cristiancmoises/zupt/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz") # Replace only after generating the byte-reproducible final release archive. sha256sums=('REPLACE_AFTER_FINAL_ARCHIVE_SHA256') build() { cd "${pkgname}-${pkgver}" # Source-only build (WITH_SDK=0) with the project's strict warning set. CFLAGS="${CFLAGS:--O2 -std=c11} -Wall -Wextra -Wpedantic" \ make WITH_SDK=0 WITH_PQBOX=0 -j"$(nproc)" } check() { cd "${pkgname}-${pkgver}" # Distro-safe quick, traversal, integrity, codec and NIST/RFC checks. make WITH_SDK=0 WITH_PQBOX=0 check } package() { cd "${pkgname}-${pkgver}" # Source-only build (no vendored libraries); `make install` places the # binary, man page and shell completions under the public zupt name. make DESTDIR="${pkgdir}" PREFIX=/usr WITH_SDK=0 WITH_PQBOX=0 \ INSTALL_LEGACY_ALIAS=0 install # Docs that aren't part of `make install` install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" install -Dm644 SECURITY.md "${pkgdir}/usr/share/doc/${pkgname}/SECURITY.md" install -Dm644 CHANGELOG.md "${pkgdir}/usr/share/doc/${pkgname}/CHANGELOG.md" install -Dm644 LICENSE-AGPL-3.0 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-AGPL-3.0" install -Dm644 LICENSE-GPL-3.0 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-GPL-3.0" install -Dm644 LICENSE-BSD-2-Clause "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-BSD-2-Clause" install -Dm644 LICENSE-BSD-3-Clause "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-BSD-3-Clause" install -Dm644 LICENSE-CC0-1.0 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-CC0-1.0" install -Dm644 NOTICE "${pkgdir}/usr/share/licenses/${pkgname}/NOTICE" install -Dm644 THIRD-PARTY-NOTICES.md \ "${pkgdir}/usr/share/licenses/${pkgname}/THIRD-PARTY-NOTICES.md" }