void-packages/srcpkgs/libgpod/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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
1 KiB
Bash

# Template file for 'libgpod'
pkgname=libgpod
version=0.8.3
revision=4
build_style=gnu-configure
configure_args="--with-udev-dir=/usr/lib/udev --enable-udev"
hostmakedepends="intltool pkg-config automake gettext-devel glib-devel libtool"
makedepends="gdk-pixbuf-devel libimobiledevice-devel sg3_utils-devel sqlite-devel"
short_desc="Shared library to access the contents of an iPod"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-only"
homepage="http://www.gtkpod.org/libgpod/"
distfiles="${SOURCEFORGE_SITE}/gtkpod/$pkgname-$version.tar.bz2"
checksum=638a7959d04e95f1e62abad02bd33702e4e8dfef98485ac7d9d50395c37e955d
post_patch() {
vsed -i configure.ac -e '/PKG_CHECK_MODULES/s/libplist\b/libplist-2.0/g'
}
pre_configure() {
autoreconf -fi
vsed -i -e '/DATADIRNAME=/s/=.*/=share/' configure
}
libgpod-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/*.a
vmove usr/lib/*.so
vmove usr/share/gtk-doc
}
}