```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 ```
37 lines
958 B
Bash
37 lines
958 B
Bash
# Template file for 'ledger'
|
|
pkgname=ledger
|
|
version=3.2.1
|
|
revision=1
|
|
build_style=cmake
|
|
makedepends="boost-devel gmp-devel mpfr-devel gettext-devel libedit-devel"
|
|
short_desc="Double-entry accounting system with a command-line reporting interface"
|
|
maintainer="Daniel Santana <daniel@santana.tech>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://www.ledger-cli.org/"
|
|
distfiles="https://github.com/ledger/${pkgname}/archive/v${version}.tar.gz"
|
|
checksum=92bf09bc385b171987f456fe3ee9fa998ed5e40b97b3acdd562b663aa364384a
|
|
|
|
post_install() {
|
|
rm -Rf ${DESTDIR}/usr/local
|
|
if [ -e ${DESTDIR}/usr/lib64 ]; then
|
|
mv ${DESTDIR}/usr/lib64 ${DESTDIR}/usr/lib
|
|
fi
|
|
|
|
vlicense LICENSE.md
|
|
}
|
|
|
|
libledger_package() {
|
|
short_desc+=" - library files"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
|
|
libledger-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="libledger>=${version}_${revision} ${makedepends}"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/include
|
|
}
|
|
}
|