```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 ```
47 lines
1.2 KiB
Bash
47 lines
1.2 KiB
Bash
# Template file for 'libnih'
|
|
pkgname=libnih
|
|
version=1.0.3
|
|
revision=5
|
|
_commit=ecf8f37376524f40a6f3fbf9cc4d5b6fc8892c19
|
|
wrksrc="${pkgname}-${_commit}"
|
|
build_style=gnu-configure
|
|
configure_args="--enable-threading"
|
|
hostmakedepends="automake libtool gettext-devel pkg-config"
|
|
makedepends="dbus-devel expat-devel"
|
|
short_desc="Small library for C application development"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2.0-only"
|
|
homepage="https://github.com/keybuk/${pkgname}"
|
|
distfiles="${homepage}/archive/${_commit}.tar.gz"
|
|
checksum=bd1ce78c9e4808fd02e06edaf581eb2b70fa43d7baae051848dfdbaf5b4d1a1c
|
|
|
|
CFLAGS="-fcommon"
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" nih-devel"
|
|
configure_args+=" NIH_DBUS_TOOL=/usr/bin/nih-dbus-tool"
|
|
fi
|
|
|
|
pre_configure() {
|
|
autoreconf -fi
|
|
}
|
|
|
|
libnih-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${sourcepkg}-${version}_${revision} dbus-devel"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|
|
|
|
nih-devel_package() {
|
|
short_desc+=" - development tools"
|
|
pkg_install() {
|
|
vmove usr/share/aclocal
|
|
vmove usr/bin/nih-dbus-tool
|
|
vmove usr/share/man/man1/nih-dbus-tool.1
|
|
}
|
|
}
|