void-packages/srcpkgs/socklog/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

35 lines
812 B
Bash

# Template file for 'socklog'
pkgname=socklog
version=2.1.0
revision=5
wrksrc=admin/${pkgname}-${version}
short_desc="Small and secure syslogd replacement for use with runit"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="custom"
homepage="http://smarden.org/socklog/"
distfiles="http://smarden.org/socklog/socklog-${version}.tar.gz"
checksum=aa869a787ee004da4e5509b5a0031bcc17a4ab4ac650c2ce8d4e488123acb455
build_options="static"
do_build() {
if [ "$build_option_static" ]; then
LDFLAGS+=" -static"
fi
echo "$CC -D_GNU_SOURCE $CFLAGS" >src/conf-cc
echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >src/conf-ld
package/compile
}
do_install() {
for bin in command/*; do
vbin $bin
done
for man in man/*; do
vman $man
done
for doc in doc/*.html; do
vdoc $doc
done
vlicense package/COPYING
}