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

45 lines
1.5 KiB
Bash

# Template file for 'c-client'
pkgname=c-client
version=2007f
revision=4
wrksrc="imap-${version}"
makedepends="pam-devel openssl-devel e2fsprogs-devel"
short_desc="IMAP client library"
maintainer="John Regan <john@jrjrtech.com>"
license="Apache-2.0"
homepage="http://www.washington.edu/imap"
distfiles="http://ftp.ntua.gr/pub/net/mail/imap/imap-${version}.tar.gz"
checksum=53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520004a28
nocross=yes
do_configure() {
sed \
-e "s:-g -fno-omit-frame-pointer -O6:\${CFLAGS}:" \
-e "s:SSLDIR=/usr/local/ssl:SSLDIR=/usr:" \
-e "s:SSLCERTS=\$(SSLDIR)/certs:SSLCERTS=/etc/ssl/certs:" \
-i src/osdep/unix/Makefile
}
do_build() {
yes "y" | make lnp PASSWDTYPE=pam SPECIALAUTHENTICATORS=ssl SSLTYPE=unix EXTRACFLAGS="${CFLAGS} -fPIC -lcom_err -lpam"
}
do_install() {
install -D -m755 c-client/libc-client.so.1.0.0 $DESTDIR/usr/lib/libc-client.so.1.0.0
ln -sf libc-client.so.1.0.0 $PKGDESTDIR/usr/lib/libc-client.so.1
}
c-client-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
install -D -m644 c-client/c-client.a $PKGDESTDIR/usr/lib/c-client.a
ln -sf c-client.a $PKGDESTDIR/usr/lib/libc-client.a
ln -sf libc-client.so.1.0.0 $PKGDESTDIR/usr/lib/libc-client.so
for i in c-client mail imap4r1 rfc822 linkage misc smtp nntp \
osdep env_unix env fs ftl nl tcp sslio utf8 utf8aux; do
install -D -m644 c-client/${i}.h $PKGDESTDIR/usr/include/imap/${i}.h
done
}
}