```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 ```
31 lines
1,023 B
Bash
31 lines
1,023 B
Bash
# Template file for 'libzim'
|
|
pkgname=libzim
|
|
version=6.3.0
|
|
revision=1
|
|
build_style=meson
|
|
hostmakedepends="pkg-config git"
|
|
makedepends="liblzma-devel $(vopt_if zlib zlib-devel)
|
|
$(vopt_if xapian "xapian-core-devel icu-devel")
|
|
$(vopt_if zstd libzstd-devel) gtest-devel"
|
|
short_desc="Library to read and write ZIM files"
|
|
maintainer="John <me@johnnynator.dev>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://wiki.openzim.org/wiki/OpenZIM"
|
|
changelog="https://github.com/openzim/libzim/blob/${version}/ChangeLog"
|
|
distfiles="https://github.com/openzim/libzim/archive/${version}.tar.gz"
|
|
checksum=984d2f3881c507c9f0212dc2bc1b808d25cdeef6a62043f9211fcb78a231a986
|
|
replaces="libzim-tools>=0"
|
|
|
|
build_options="xapian zlib zstd"
|
|
build_options_default="xapian zlib zstd"
|
|
|
|
libzim-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${sourcepkg}>=${version}_${revision}
|
|
$(vopt_if zstd libzstd-devel) $(vopt_if zlib zlib-devel) liblzma-devel"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/*.so
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|