2024-04-24 22:34:08 +00:00
|
|
|
# Maintainer: Xavier Moffett (sapphirus at azorium dot net)
|
2024-02-12 05:55:49 +00:00
|
|
|
|
2024-03-31 04:35:40 +00:00
|
|
|
_pkgname=pacwrap
|
2024-02-12 05:55:49 +00:00
|
|
|
pkgname=('pacwrap' 'pacwrap-dist')
|
2024-05-22 00:13:34 +00:00
|
|
|
pkgver=0.8.2
|
2024-02-12 05:55:49 +00:00
|
|
|
pkgrel=1
|
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')
|
2024-04-24 22:34:08 +00:00
|
|
|
makedepends=('cargo' 'busybox' 'fakechroot' 'fakeroot' 'git' 'libalpm.so>=14' 'pacman' 'zstd')
|
|
|
|
source=("$_pkgname::git+https://github.com/pacwrap/pacwrap.git#tag=${pkgver}")
|
|
|
|
md5sums=('SKIP')
|
2024-02-12 05:55:49 +00:00
|
|
|
options=('!lto')
|
|
|
|
|
|
|
|
prepare() {
|
2024-04-24 22:34:08 +00:00
|
|
|
cd "${_pkgname}"
|
2024-03-31 04:35:40 +00:00
|
|
|
cargo fetch --locked --target "$CARCH-unknown-linux-gnu" \
|
|
|
|
&& ./dist/tools/prepare.sh release
|
2024-02-12 05:55:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2024-04-24 22:34:08 +00:00
|
|
|
cd "${_pkgname}"
|
2024-03-31 04:35:40 +00:00
|
|
|
PACWRAP_SCHEMA_BUILT=1 \
|
|
|
|
cargo build --release --frozen \
|
|
|
|
&& ./dist/tools/package.sh release
|
2024-02-12 05:55:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_pacwrap() {
|
2024-04-24 22:34:08 +00:00
|
|
|
provides=("${_pkgname}")
|
|
|
|
conflicts=("${_pkgname}")
|
|
|
|
depends=('bash' 'bubblewrap' 'gnupg' 'libalpm.so>=14' 'libseccomp' 'pacman' "pacwrap-dist=$pkgver" 'zstd')
|
|
|
|
optdepends=('xdg-dbus-proxy')
|
|
|
|
|
|
|
|
cd "${_pkgname}"
|
|
|
|
|
|
|
|
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() {
|
2024-04-24 22:34:08 +00:00
|
|
|
provides=("${_pkgname}-dist")
|
|
|
|
conflicts=("${_pkgname}-dist")
|
2024-03-31 04:35:40 +00:00
|
|
|
|
2024-04-24 22:34:08 +00:00
|
|
|
cd "${_pkgname}"
|
2024-03-31 04:35:40 +00:00
|
|
|
|
2024-04-24 22:34:08 +00:00
|
|
|
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"
|
2024-03-31 04:35:40 +00:00
|
|
|
|
2024-04-24 22:34:08 +00:00
|
|
|
cp -r "dist/runtime" "${pkgdir}/usr/share/${_pkgname}/"
|
2024-02-12 05:55:49 +00:00
|
|
|
}
|