Template
1
0
Fork 0
mirror of https://aur.archlinux.org/pacwrap-git.git synced 2024-12-27 15:16:55 -05:00
pacwrap-git/PKGBUILD

64 lines
2.1 KiB
Text
Raw Normal View History

# Maintainer: Xavier Moffett (sapphirus at azorium dot net)
2024-03-08 01:08:50 -05:00
_pkgname=pacwrap
pkgname=('pacwrap-git' 'pacwrap-dist-git')
pkgver=0.8.1.r6.6168fef
2024-03-08 01:08:50 -05:00
pkgrel=1
_pkgbase=$_pkgname
pkgdesc="Facilitates the creation, management, and execution of unprivileged Arch-based bubblewrap containers."
arch=('x86_64')
url="https://pacwrap.sapphirus.org/"
license=('GPLv3-only')
makedepends=('cargo' 'busybox' 'fakechroot' 'fakeroot' 'git' 'libalpm.so>=14' 'pacman' 'zstd')
2024-03-08 01:08:50 -05:00
source=("$_pkgname::git+https://github.com/pacwrap/pacwrap.git")
md5sums=('SKIP')
options=('!lto')
pkgver() {
2024-03-14 22:53:41 -04:00
cd $_pkgbase
2024-03-31 00:32:30 -04:00
echo "$(git describe --tags | sed 's/^v//; s/-/.r/; s/-g/./')"
2024-03-08 01:08:50 -05:00
}
prepare() {
cd "${_pkgbase}"
2024-03-31 00:32:30 -04:00
cargo fetch --locked --target "$CARCH-unknown-linux-gnu" \
&& ./dist/tools/prepare.sh release
2024-03-08 01:08:50 -05:00
}
build() {
cd "${_pkgbase}"
2024-03-14 22:53:41 -04:00
PACWRAP_SCHEMA_BUILT=1 \
cargo build --release --frozen \
&& ./dist/tools/package.sh release
2024-03-08 01:08:50 -05:00
}
package_pacwrap-git() {
provides=("${_pkgname}")
conflicts=("${_pkgname}")
depends=('bash' 'bubblewrap' 'gnupg' 'libalpm.so>=14' 'libseccomp' 'pacman' "pacwrap-dist-git=$pkgver" 'zstd')
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-03-08 01:08:50 -05:00
}
package_pacwrap-dist-git() {
provides=("${_pkgname}-dist")
conflicts=("${_pkgname}-dist")
2024-03-08 01:08:50 -05:00
cd "${_pkgbase}"
2024-03-08 01:08:50 -05: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-08 01:08:50 -05:00
cp -r "dist/runtime" "${pkgdir}/usr/share/${_pkgname}/"
2024-03-08 01:08:50 -05:00
}