void-packages/srcpkgs/netpgp/template
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: 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

60 lines
1.7 KiB
Bash

# Template file for 'netpgp'
pkgname=netpgp
version=20140220
revision=19
build_style=gnu-configure
hostmakedepends="automake libtool pkg-config"
makedepends="zlib-devel bzip2-devel openssl-devel"
short_desc="PGP signing, verification, encryption and decryption program"
maintainer="Orphaned <orphan@voidlinux.org>"
license="3-clause-BSD"
homepage="http://www.netbsd.org"
distfiles="ftp://ftp.netbsd.org/pub/pkgsrc/distfiles/LOCAL_PORTS/netpgp-${version}.tar.gz"
checksum=fbe403f037376a40afd19bc8a1786b55b67cf8092a723ef36a61d99260b66dbf
CFLAGS="-Wno-error=unused-but-set-variable -Wno-error=cpp -Wno-format-truncation -Wno-stringop-truncation -Wno-stringop-overflow -Wno-error=format-overflow"
pre_configure() {
autoreconf -fi
}
do_check() {
# depends on the netpgpverify package which depends on libnetpgp
# from this package
:
}
post_install() {
vlicense Licence LICENSE
}
libmj_package() {
short_desc="Minimalist JSON lightweight data interchange library"
pkg_install() {
vmove "usr/lib/libmj.so.*"
}
}
libmj-devel_package() {
short_desc="Minimalist JSON lightweight data interchange library - development files"
depends="libmj>=${version}_${revision}"
pkg_install() {
vinstall ${wrksrc}/src/libmj/mj.h 644 usr/include
vmove usr/lib/libmj.a
vmove usr/lib/libmj.so
vmove usr/share/man/man3/libmj.3
}
}
libnetpgp_package() {
short_desc="BSD licensed library for PGP tasks"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
libnetpgp-devel_package() {
depends="${makedepends} libnetpgp>=${version}_${revision}"
short_desc="BSD licensed library for PGP tasks - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/share/man/man3
}
}