void-packages/srcpkgs/dar/template
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```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

50 lines
1.3 KiB
Bash

# Template file for 'dar'
pkgname=dar
version=2.6.13
revision=1
build_style=gnu-configure
configure_args="--disable-upx --disable-build-html"
conf_files="/etc/darrc"
hostmakedepends="automake gettext-devel gpgme-devel libtool pkg-config"
makedepends="acl-devel bzip2-devel e2fsprogs-devel libgcrypt-devel liblzma-devel
lzo-devel librsync-devel libcurl-devel"
short_desc="Shell command that backs up directory trees and files"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://dar.linux.free.fr/"
distfiles="${SOURCEFORGE_SITE}/dar/dar-${version}.tar.gz"
checksum=3fea9ff9e55fb9827e17a080de7d1a2605b82c2320c0dec969071efefdbfd097
if [ "$CROSS_BUILD" ]; then
configure_args+=" --with-gpgme-prefix=${XBPS_CROSS_BASE}/usr
ac_cv_lib_gcrypt_gcry_check_version=false"
LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib -lgcrypt"
fi
do_check() {
# need to be run as root
:
}
post_install() {
# Prevent writing memory pages to disk,
# which gives "Warning: using insecure memory"
chmod u+s ${DESTDIR}/usr/bin/dar
}
libdar_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
libdar-devel_package() {
short_desc+=" - development files"
depends="libdar>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}