void-packages/srcpkgs/lilo/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

47 lines
1.2 KiB
Bash

# Template file for 'lilo'
pkgname=lilo
version=24.2
revision=3
archs="i686* x86_64*"
hostmakedepends="bin86"
makedepends="device-mapper-devel"
short_desc="Standard Linux boot loader"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="http://www.joonet.de/lilo"
distfiles="${DEBIAN_SITE}/main/l/${pkgname}/${pkgname}_${version}.orig.tar.gz"
checksum=e158f19de4560c935ebe0507c21b79bff17618b9230d8076fe8c5fff9fdbd5b1
CFLAGS="-fcommon"
pre_build() {
sed -i Makefile src/Makefile \
-e 's|^\tmake|\t$(MAKE)|g' \
-e '/images install/d' \
-e '/images all/d'
}
do_build() {
# LILO needs LC_ALL=C
LC_ALL=C make CC=${CC} CFLAGS="$CFLAGS $LDFLAGS" ${makejobs} all
}
do_install() {
vmkdir usr/bin
make DESTDIR=${DESTDIR} install
mv ${DESTDIR}/sbin/* ${DESTDIR}/usr/bin
mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
rm ${DESTDIR}/etc/lilo.conf_example
for file in sample/*.conf; do
vsconf ${file}
done
# Setup kernel hooks
rm -rf ${DESTDIR}/etc/initramfs ${DESTDIR}/etc/kernel
vinstall ${FILESDIR}/kernel.d/lilo.post-install 750 \
etc/kernel.d/post-install 50-lilo
vinstall ${FILESDIR}/kernel.d/lilo.post-remove 750 \
etc/kernel.d/post-remove 50-lilo
vlicense COPYING
}