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

37 lines
1 KiB
Bash

# Template file for 'libunique'
pkgname=libunique
version=3.0.2
revision=11
build_style=gnu-configure
build_helper="gir"
configure_args="--enable-bacon=yes --enable-dbus=yes"
hostmakedepends="pkg-config glib-devel"
makedepends="dbus-glib-devel gtk+3-devel glib-devel"
short_desc="Library for writing single instance applications"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://wiki.gnome.org/Attic/LibUnique"
distfiles="${GNOME_SITE}/${pkgname}/3.0/${pkgname}-${version}.tar.bz2"
checksum=50269a87c7aabf1e25f01b3bbb280133138ffd7b6776289894c614a4b6ca968d
# Package build options
build_options="gir"
build_options_default="gir"
post_configure() {
sed -i Makefile -e "/MAINTAINER_CFLAGS/s/-Werror/-Wno-error/"
}
libunique-devel_package() {
depends="dbus-glib-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
vmove usr/share/gtk-doc
}
}