void-packages/srcpkgs/vsftpd/template
Đoàn Trần Công Danh 76acfa2dd2 srcpkgs/v*: 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

43 lines
1.2 KiB
Bash

# Template file for 'vsftpd'
pkgname=vsftpd
version=3.0.4
revision=1
build_style=gnu-makefile
makedepends="pam-devel libcap-devel libnsl-devel openssl-devel"
short_desc="FTP daemon with focus on security"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://security.appspot.com/vsftpd.html"
distfiles="https://security.appspot.com/downloads/${pkgname}-${version}.tar.gz"
checksum=6b9421bd27e8a6cdeed5b31154f294a20b003a11a26c09500715a0a6b1b86a26
system_accounts="ftp"
ftp_pgroup=nogroup
CFLAGS="-Wno-error"
conf_files="/etc/vsftpd.conf"
do_configure() {
local _nlsstring='-lcrypt -lnsl';
case "$XBPS_TARGET_MACHINE" in
*-musl) _nlsstring=-lcrypt ;;
esac
sed -i 's/#undef VSF_BUILD_SSL/#define VSF_BUILD_SSL/' builddefs.h
sed -i "s/-lcrypt -lnsl/${_nlsstring} -lssl -lcrypto/" Makefile
}
do_install() {
vbin $pkgname
vconf $pkgname.conf
vman $pkgname.8
vman $pkgname.conf.5
vinstall EXAMPLE/INTERNET_SITE/$pkgname.xinetd 644 $pkgdir/etc/xinetd.d/$pkgname
vinstall RedHat/$pkgname.log 644 etc/logrotate.d/$pkgname
vsv vsftpd
vsv vsftpd-ipv6
for i in BENCHMARKS BUGS Changelog FAQ INSTALL README README.ssl REFS \
REWARD SPEED TODO TUNING; do
vinstall $i 644 usr/share/doc/$pkgname/$i
done
}