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

43 lines
1.4 KiB
Bash

# Template file for 'libostree'
pkgname=libostree
version=2021.2
revision=1
build_style=gnu-configure
build_helper="gir"
configure_args="
--with-builtin-grub2-mkconfig
--with-ed25519-libsodium
--with-openssl
$(vopt_enable gir introspection)"
hostmakedepends="bison docbook-xsl glib-devel libxslt pkg-config"
makedepends="e2fsprogs-devel fuse-devel glib-devel gpgme-devel libarchive-devel
libsoup-devel libsodium-devel $(vopt_if gir 'gobject-introspection')"
checkdepends="attr-progs cpio elfutils gnupg2 python3-yaml tar which xz"
short_desc="Operating system and container binary deployment and upgrades"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="LGPL-2.0-or-later"
homepage="https://ostree.readthedocs.io/en/latest/"
changelog="https://github.com/ostreedev/ostree/releases"
distfiles="https://github.com/ostreedev/ostree/releases/download/v${version}/libostree-${version}.tar.xz"
checksum=854008e7c71d44f6b3670f0e9b8500db0f08ff8b297d0b30a7cb9a66f34c5d7c
build_options="gir"
build_options_default="gir"
post_install() {
vinstall bash/ostree 644 usr/share/bash-completion/completions
}
libostree-devel_package() {
depends="${sourcepkg}>=${version}_${revision} libglib-devel"
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
}
}