mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-23 18:14:54 +08:00
one more util update, mlocate
This commit is contained in:
parent
699fe43da7
commit
beb17b3de3
@ -1,29 +1,24 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
# Core Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
# maintainer: abveritas@chakra-project.org
|
||||
|
||||
pkgname=mlocate
|
||||
pkgver=0.24
|
||||
pkgrel=2
|
||||
pkgver=0.26
|
||||
pkgrel=1
|
||||
pkgdesc="Faster merging drop-in for slocate"
|
||||
arch=('i686' 'x86_64')
|
||||
arch=('x86_64')
|
||||
url="http://carolina.mff.cuni.cz/~trmac/blog/mlocate"
|
||||
license=('GPL')
|
||||
conflicts=('slocate')
|
||||
provides=('slocate')
|
||||
replaces=('slocate')
|
||||
depends=('glibc' 'coreutils' 'sh')
|
||||
backup=('etc/updatedb.conf'
|
||||
'etc/cron.daily/updatedb')
|
||||
install=mlocate.install
|
||||
source=(https://fedorahosted.org/releases/m/l/mlocate/mlocate-$pkgver.tar.xz
|
||||
updatedb.conf
|
||||
updatedb.cron.daily)
|
||||
md5sums=('a9c221e5bc489a2ed710c943990137bd'
|
||||
source=("https://fedorahosted.org/releases/m/l/mlocate/mlocate-$pkgver.tar.xz"
|
||||
'updatedb.conf'
|
||||
'updatedb.cron')
|
||||
md5sums=('539e6f86bf387358aa2b14d5f880e49a'
|
||||
'66898efb290eff4efd44a0b94fe3927d'
|
||||
'cde5da81bebad2de556ef2e43d895e13')
|
||||
'4298849f2cdfc43f5403fda15581e265')
|
||||
|
||||
build() {
|
||||
cd $srcdir/$pkgname-$pkgver
|
||||
@ -44,7 +39,7 @@ package() {
|
||||
|
||||
# Set up a default updatedb.conf and a daily cronjob
|
||||
install -Dm644 ${srcdir}/updatedb.conf $pkgdir/etc/updatedb.conf
|
||||
install -Dm744 ${srcdir}/updatedb.cron.daily $pkgdir/etc/cron.daily/updatedb
|
||||
install -Dm744 ${srcdir}/updatedb.cron $pkgdir/etc/cron.daily/updatedb
|
||||
|
||||
# Install Mlocate
|
||||
make DESTDIR=$pkgdir install
|
||||
|
@ -1,18 +0,0 @@
|
||||
post_install() {
|
||||
post_upgrade "$1" "$1"
|
||||
echo "mlocate command is technically locate, but slocate is symlinked and still works."
|
||||
echo "You should run updatedb as root."
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
# This can be removed after {m,x}locate have both been updated
|
||||
getent group slocate &>/dev/null && usr/sbin/groupdel slocate &>/dev/null
|
||||
getent group mlocate &>/dev/null && usr/sbin/groupdel mlocate &>/dev/null
|
||||
|
||||
getent group locate &>/dev/null || usr/sbin/groupadd -g 21 locate &>/dev/null
|
||||
chown -R root:locate var/lib/mlocate
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
getent group locate &>/dev/null && usr/sbin/groupdel locate &>/dev/null
|
||||
}
|
6
mlocate/updatedb.cron
Executable file
6
mlocate/updatedb.cron
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
NICE='nice -n 19'
|
||||
IONICE='ionice -c 2 -n 7'
|
||||
|
||||
exec ${IONICE} ${NICE} updatedb -f proc
|
Loading…
Reference in New Issue
Block a user