diff options
author | davidovski <david@davidovski.xyz> | 2023-05-17 17:02:25 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-05-17 17:03:10 +0000 |
commit | a5ee6fa1836ed3986be333d6c9b4eed8d639636b (patch) | |
tree | ea481e4c98374c67be4188e99c297c36402ad346 /repo/schroot/schroot.xibuild | |
parent | 0d37a1ef234c38b27faba43bc3a22f985d311deb (diff) |
Add schroot
Diffstat (limited to 'repo/schroot/schroot.xibuild')
-rw-r--r-- | repo/schroot/schroot.xibuild | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/repo/schroot/schroot.xibuild b/repo/schroot/schroot.xibuild new file mode 100644 index 0000000..5b95788 --- /dev/null +++ b/repo/schroot/schroot.xibuild @@ -0,0 +1,60 @@ +#!/bin/sh + +NAME="schroot" +DESC="Allows users to execute shell commands under different root filesystems. (Successor to dchroot)." + +MAKEDEPS=" autoconf automake boost coreutils cppunit groff gettext libtool" + +PKG_VER=1.6.10 +SOURCE=" + https://deb.debian.org/debian/pool/main/s/schroot/schroot_$PKG_VER.orig.tar.xz +" + +ADDITIONAL=" + https://deb.debian.org/debian/pool/main/s/schroot/schroot_$PKG_VER-3+deb9u1.debian.tar.xz +busybox-compat.patch +getent.patch +getmntent.patch +musl.patch +pam.d.schroot.patch +remove-networks.patch +schroot-cppunit.patch +" + +prepare() { + apply_patches + + tar xf schroot_$PKG_VER-3+deb9u1.debian.tar.xz + + # shellcheck disable=SC2002 + cat "$BUILD_ROOT"/debian/patches/series | while read -r p; do + patch -p1 -i "$BUILD_ROOT"/debian/patches/"$p" + done + + # invalid sbuild_version + sed -i "s/@sbuild_version@/$PKG_VER/g" sbuild/sbuild.pc.in + + ./bootstrap +} + +build() { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --enable-dchroot \ + --enable-lvm-snapshot \ + --enable-btrfs-snapshot \ + --with-bash-completion-dir=/usr/share/bash-completion/completions/ \ + BTRFS=/sbin/btrfs \ + BTRFSCTL=/sbin/btrfsctl \ + LVCREATE=/sbin/lvcreate \ + LVREMOVE=/sbin/lvremove + make +} + +package() { + make DESTDIR="$PKG_DEST" install +} + |