diff options
author | Alex Laskin <alex@lask.in> | 2017-02-24 03:10:43 +0300 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-02-26 21:19:57 +0000 |
commit | b543884bf4b16609a90db30c4ae77be4de4579fe (patch) | |
tree | 1ba32676d3f453dc486d845bfd7cee63000f8933 /testing/mlocate | |
parent | 3c73a4802b172aaecddf7338a9c54b48d388e885 (diff) | |
download | aports-b543884bf4b16609a90db30c4ae77be4de4579fe.tar.bz2 aports-b543884bf4b16609a90db30c4ae77be4de4579fe.tar.xz |
testing/mlocate: returned from unmaintained state
https://pagure.io/mlocate
A utility for finding files by name quickly
Diffstat (limited to 'testing/mlocate')
-rw-r--r-- | testing/mlocate/01-fortify-source-compat.patch | 21 | ||||
-rw-r--r-- | testing/mlocate/APKBUILD | 52 | ||||
-rw-r--r-- | testing/mlocate/mlocate.pre-install | 5 | ||||
-rw-r--r-- | testing/mlocate/updatedb.conf | 4 | ||||
-rw-r--r-- | testing/mlocate/updatedb.cron.daily | 29 |
5 files changed, 111 insertions, 0 deletions
diff --git a/testing/mlocate/01-fortify-source-compat.patch b/testing/mlocate/01-fortify-source-compat.patch new file mode 100644 index 0000000000..deabf90c90 --- /dev/null +++ b/testing/mlocate/01-fortify-source-compat.patch @@ -0,0 +1,21 @@ +--- a/configure 2012-09-22 06:13:53.000000000 +0400 ++++ b/configure 2017-02-24 00:28:09.645357065 +0300 +@@ -6666,7 +6666,6 @@ + gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" + + +-$as_echo "#define realpath rpl_realpath" >>confdefs.h + + + +--- a/gnulib/m4/canonicalize-lgpl.m4 2010-03-26 22:38:17.000000000 +0300 ++++ b/gnulib/m4/canonicalize-lgpl.m4 2017-02-24 00:28:38.515419315 +0300 +@@ -12,8 +12,6 @@ + AC_CHECK_FUNCS_ONCE(canonicalize_file_name) + if test $ac_cv_func_canonicalize_file_name = no; then + AC_LIBOBJ(canonicalize-lgpl) +- AC_DEFINE([realpath], [rpl_realpath], +- [Define to a replacement function name for realpath().]) + gl_PREREQ_CANONICALIZE_LGPL + fi + ]) diff --git a/testing/mlocate/APKBUILD b/testing/mlocate/APKBUILD new file mode 100644 index 0000000000..13cd25a8bb --- /dev/null +++ b/testing/mlocate/APKBUILD @@ -0,0 +1,52 @@ +# Contributor: Leslie P. Polzer <polzer@port-zero.com> +# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> +# Maintainer: Alex Laskin <alex@lask.in> + +pkgname=mlocate +pkgver=0.26 +pkgrel=5 +pkgdesc='A utility for finding files by name quickly' +url='https://pagure.io/mlocate' +arch='all' +license='GPL2' +options='suid' +pkggroups='locate' +install="$pkgname.pre-install" +subpackages="$pkgname-doc" +source="https://releases.pagure.org/mlocate/$pkgname-$pkgver.tar.xz + 01-fortify-source-compat.patch + updatedb.conf + updatedb.cron.daily" + +prepare() { + default_prepare || return 1 + + cd "$builddir" + sed -i '/^groupname /s/mlocate/locate/' Makefile.in +} + +build() { + cd "$builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var/lib + make || return 1 +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install + + ln -s locate "$pkgdir"/usr/bin/slocate + + install -dm755 "$pkgdir"/var/lib + + install -Dm644 "$srcdir"/updatedb.conf "$pkgdir"/etc/updatedb.conf + install -Dm744 "$srcdir"/updatedb.cron.daily "$pkgdir"/etc/periodic/daily/updatedb + + rm -rf "${pkgdir}"/usr/lib +} +sha512sums="b1207047e30a551cba39e70812439b554def567ebe9b8b81fed6f26435bb575beafe4875a21cd72876eadd85da4e7bfc942eb28b17c430b537c351690364837f mlocate-0.26.tar.xz +ad4a70a3a827d09113b30788e7343f3cd47750cf0ce79f088fadab102fc78c04243482eddb9987cac8843c5065257dd6d9c17f423fe4c331fefe0148657f55fe 01-fortify-source-compat.patch +663ebf09348458a3c82ac83bf77de9d38a214bd91c73385b2ea7fb7eda5beaaa7ad1d7c66a8a017ef6a0d5295ff1778bedab9be60d9b3a5ac3fefe5f1593a5f5 updatedb.conf +60551f1574a31650bc665901cac418366ba26dc8514fb82ca55c75d29a9617ce05bc77b2a14c724cd49c8375d8ad5c3e9ba4df4210ce1b6b37bb3a244dcdc84c updatedb.cron.daily" diff --git a/testing/mlocate/mlocate.pre-install b/testing/mlocate/mlocate.pre-install new file mode 100644 index 0000000000..8ae6bbd550 --- /dev/null +++ b/testing/mlocate/mlocate.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +addgroup -S locate 2>/dev/null + +exit 0 diff --git a/testing/mlocate/updatedb.conf b/testing/mlocate/updatedb.conf new file mode 100644 index 0000000000..ea33c32cf8 --- /dev/null +++ b/testing/mlocate/updatedb.conf @@ -0,0 +1,4 @@ +PRUNE_BIND_MOUNTS = "yes" +PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda configfs cpuset cramfs debugfs devpts devtmpfs ecryptfs exofs ftpfs fuse fuse.encfs fuse.sshfs fusectl gfs gfs2 hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs sfs shfs smbfs sockfs sshfs sysfs tmpfs ubifs udf usbfs vboxsf" +PRUNENAMES = ".git .hg .svn" +PRUNEPATHS = "/afs /media /mnt /net /sfs /tmp /udev /var/cache /var/lock /var/run /var/spool /var/tmp" diff --git a/testing/mlocate/updatedb.cron.daily b/testing/mlocate/updatedb.cron.daily new file mode 100644 index 0000000000..cac9bb0630 --- /dev/null +++ b/testing/mlocate/updatedb.cron.daily @@ -0,0 +1,29 @@ +#!/bin/sh + +# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable) +NICE=19 + +# 0 for none, 1 for real time, 2 for best-effort, 3 for idle +IONICE_CLASS=2 + +# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest +IONICE_PRIORITY=7 + +UPDATEDB="/usr/bin/updatedb" + +if [ -x /usr/bin/nice ]; then + UPDATEDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEDB}" +fi + +if [ -x /usr/bin/ionice ]; then + UPDATEDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEDB}" +fi + +# Update the "locate" database +if [ -x /usr/bin/updatedb ]; then + if [ -f /etc/updatedb.conf ]; then + ${UPDATEDB} + else + ${UPDATEDB} -f proc + fi +fi |