1
0
Fork 0
mirror of https://aur.archlinux.org/pacwrap.git synced 2024-11-21 21:46:29 +00:00
pacwrap/PKGBUILD

59 lines
2.1 KiB
Text
Raw Normal View History

2024-02-12 05:55:49 +00:00
# Maintainer: Xavier R.M. (sapphirus at azorium dot net)
_pkgname=pacwrap
2024-02-12 05:55:49 +00:00
pkgname=('pacwrap' 'pacwrap-dist')
pkgver=0.8.0
2024-02-12 05:55:49 +00:00
pkgrel=1
_pkgbase=${pkgname}-${pkgver}
2024-02-14 20:07:18 +00:00
pkgdesc="Facilitates the creation, management, and execution of unprivileged Arch-based bubblewrap containers."
2024-02-12 05:55:49 +00:00
arch=('x86_64')
url="https://pacwrap.sapphirus.org/"
license=('GPLv3-only')
makedepends=('cargo' 'git' 'fakeroot' 'pacman' 'libalpm.so>=14' 'zstd' 'busybox' 'fakechroot')
source=("${_pkgbase}.tar.zst::https://github.com/pacwrap/pacwrap/releases/download/${pkgver}/${_pkgbase}.tar.zst")
sha512sums=('832139cd18e276c46fed275e8d4b6bdf215ce14ab9d8cf39d1ffc93bde952028b2a9cb2c4b635170b3093ed0a6f8e46c1a9dd6874c54a283c0913c27c0df14e9')
2024-02-12 05:55:49 +00:00
options=('!lto')
prepare() {
cd "${_pkgbase}"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu" \
&& ./dist/tools/prepare.sh release
2024-02-12 05:55:49 +00:00
}
build() {
cd "${_pkgbase}"
PACWRAP_SCHEMA_BUILT=1 \
cargo build --release --frozen \
&& ./dist/tools/package.sh release
2024-02-12 05:55:49 +00:00
}
package_pacwrap() {
provides=("${_pkgname}")
conflicts=("${_pkgname}")
depends=('bash' 'bubblewrap' 'gnupg' 'pacman' 'libalpm.so>=14' 'libseccomp' "pacwrap-dist=$pkgver" 'zstd')
2024-02-12 05:55:49 +00:00
optdepends=('xdg-dbus-proxy')
cd "${_pkgbase}"
install -d "${pkgdir}/usr/share/${_pkgname}"
install -Dm 755 "target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
install -Dm 755 "dist/bin/${_pkgname}-key" "${pkgdir}/usr/bin/${_pkgname}-key"
install -Dm 644 "dist/bin/${_pkgname}.1" "${pkgdir}/usr/share/man/man1/${_pkgname}.1"
install -Dm 644 "dist/bin/${_pkgname}.yml.2" "${pkgdir}/usr/share/man/man2/${_pkgname}.yml.2"
install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
2024-02-12 05:55:49 +00:00
}
package_pacwrap-dist() {
provides=("${_pkgname}-dist")
conflicts=("${_pkgname}-dist")
cd "${_pkgbase}"
install -dD 755 "${pkgdir}/usr/share/${_pkgname}/"
install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}-dist/LICENSE"
install -Dm 644 "dist/bin/filesystem.tar.zst" "${pkgdir}/usr/share/${_pkgname}/filesystem.tar.zst"
install -Dm 644 "dist/bin/filesystem.dat" "${pkgdir}/usr/share/${_pkgname}/filesystem.dat"
cp -r "dist/runtime" "${pkgdir}/usr/share/${_pkgname}/"
2024-02-12 05:55:49 +00:00
}