void-packages/srcpkgs/mlocate/template
Đoàn Trần Công Danh a7b2cc8497 mlocate: fix crash on aarch64-musl
Current code call canonicalize_file_name without prior declaration in
system with musl libc. Thus the return value of canonicalize_file_name
is truncated from char* to int.

Use realpath instead.
Fix #25531
2020-10-26 22:42:45 +07:00

31 lines
1.2 KiB
Bash

# Template file for 'mlocate'
pkgname=mlocate
version=0.26
revision=5
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:/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
# remove 'm' prefix.
mv ${DESTDIR}/usr/share/man/man5/mupdatedb.conf.5 ${DESTDIR}/usr/share/man/man5/updatedb.conf.5
}