```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 ```
30 lines
1.1 KiB
Bash
30 lines
1.1 KiB
Bash
# Template file for 'mlocate'
|
|
pkgname=mlocate
|
|
version=0.26
|
|
revision=7
|
|
build_style=gnu-configure
|
|
configure_args="--program-prefix=m --localstatedir=/var/lib"
|
|
make_build_args="groupname=_mlocate"
|
|
make_install_args="${make_build_args}"
|
|
make_dirs="/var/lib/mlocate 0755 root root"
|
|
short_desc="Implementation of locate/updatedb that reuses the database"
|
|
maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://pagure.io/mlocate"
|
|
distfiles="https://releases.pagure.org/mlocate/${pkgname}-${version}.tar.xz"
|
|
checksum=3063df79fe198fb9618e180c54baf3105b33d88fe602ff2d8570aaf944f1263e
|
|
system_accounts="_mlocate"
|
|
|
|
alternatives="
|
|
locate:locate:/usr/bin/mlocate
|
|
locate:locate.1:/usr/share/man/man1/mlocate.1
|
|
locate:locatedb.5:/usr/share/man/man5/mmlocate.db.5
|
|
locate:updatedb.conf.5:/usr/share/man/man5/mupdatedb.conf.5
|
|
locate:updatedb:/usr/bin/mupdatedb
|
|
locate:updatedb.1:/usr/share/man/man1/mupdatedb.1"
|
|
|
|
post_install() {
|
|
vinstall ${FILESDIR}/mupdatedb.cron-daily 744 etc/cron.daily mupdatedb
|
|
# rename for compatibility with findutils.
|
|
mv ${DESTDIR}/usr/share/man/man8/mupdatedb.8 ${DESTDIR}/usr/share/man/man1/mupdatedb.1
|
|
}
|