void-packages/srcpkgs/schroot/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

73 lines
2.2 KiB
Bash

# Template file for 'schroot'
pkgname=schroot
reverts="1.7.2_9"
version=1.6.10
revision=11
_debian_version=3+deb9u1
build_pie=yes
build_style=gnu-configure
configure_args="
--enable-dchroot
--enable-lvm-snapshot
--enable-btrfs-snapshot
--enable-block-device
--enable-loopback
--enable-uuid
BTRFS=/usr/bin/btrfs
BTRFSCTL=/usr/bin/btrfsctl
LVCREATE=/usr/sbin/lvcreate
LVREMOVE=/usr/sbin/lvremove"
conf_files="
/etc/schroot/minimal/nssdatabases
/etc/schroot/minimal/fstab
/etc/schroot/minimal/copyfiles
/etc/schroot/buildd/nssdatabases
/etc/schroot/buildd/fstab
/etc/schroot/buildd/copyfiles
/etc/schroot/default/nssdatabases
/etc/schroot/default/fstab
/etc/schroot/default/copyfiles
/etc/schroot/schroot.conf
/etc/schroot/desktop/nssdatabases
/etc/schroot/desktop/fstab
/etc/schroot/desktop/copyfiles
/etc/schroot/sbuild/nssdatabases
/etc/schroot/sbuild/fstab
/etc/schroot/sbuild/copyfiles"
make_dirs="
/var/lib/schroot/unpack 0755 root root
/var/lib/schroot/union/underlay 0755 root root
/var/lib/schroot/union/overlay 0755 root root
/var/lib/schroot/session 0755 root root
/var/lib/schroot/mount 0755 root root
/etc/schroot/chroot.d 0755 root root"
hostmakedepends="cmake pkg-config automake libtool gettext xz"
makedepends="boost-devel pam-devel lockdev-devel libuuid-devel e2fsprogs-devel gettext-devel
libcppunit-devel"
short_desc="Allows users to execute commands in different chroots"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
license="GPL-3"
homepage="https://wiki.debian.org/Schroot"
distfiles="
${DEBIAN_SITE}/main/s/${pkgname}/${pkgname}_${version}.orig.tar.xz
${DEBIAN_SITE}/main/s/${pkgname}/${pkgname}_${version}-${_debian_version}.debian.tar.xz"
checksum="
3ce8dfd9cb97b099e4b6d4ccec421d6cc8c9ef84574681e928a12badb5643d0b
56bc82fc8ae7f6ca7eef506ccc1dca1211b2c84d83efc50d24670b8bdb9ea8bb"
nocross=yes
pre_configure() {
cat ../debian/patches/series | while read p; do
patch -p1 -i ../debian/patches/$p
done
autoreconf -fi
}
post_install() {
vmkdir usr/share/bash-completion/completions
mv ${DESTDIR}/etc/bash_completion.d/* ${DESTDIR}/usr/share/bash-completion/completions
# Remove development files
rm -rf ${DESTDIR}/usr/include \
${DESTDIR}/usr/lib/*.a \
${DESTDIR}/usr/lib/pkgconfig
}