dragora-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dragora-users] Recipe for mlocate


From: Alan Beadle
Subject: [Dragora-users] Recipe for mlocate
Date: Tue, 2 May 2017 22:39:02 -0400

Hi Dragorians, I've got another recipe finished and ready for review.
Special thanks for Akko_Teru for helping track down the current
homepage. It seems to change frequently. The recipe and two associated
files are pasted below.



# Build recipe for mlocate.
#
# Copyright (C) 2017 Alan Beadle, address@hidden
#
# This recipe is free software: you have unlimited permission
# to copy, distribute and modify it.

program=mlocate
version=0.26
release=1

tarname=${program}-${version}.tar.xz

# Remote source(s)
fetch=https://releases.pagure.org/$program/$tarname

description="
mlocate is a locate/updatedb implementation.  The 'm' stands for 'merging':
updatedb reuses the existing database to avoid rereading most of the file
system, which makes updatedb faster and does not trash the system caches as
much.
"

homepage=https://pagure.io/mlocate
license="GPLv2"

# Source documentation
docs="AUTHORS ChangeLog COPYING INSTALL NEWS README"
docsdir="${docdir}/${program}-${version}"

build()
{
    set -e

    unpack "${tardir}/$tarname"

    cd "$srcdir"

    ./configure --prefix=/usr \
                --sysconfdir=/etc \
                --localstatedir=/var/lib \
                --disable-nls
    make
    make DESTDIR="$destdir" install

    mkdir -p "${destdir}/etc/cron.daily/"
    cp -p "${worktree}/archive/mlocate/etc/cron.daily/mlocate"
"${destdir}/etc/cron.daily/mlocate"
    chmod 0755 "${destdir}/etc/cron.daily/mlocate"
    cp -p "${worktree}/archive/mlocate/etc/updatedb.conf" "${destdir}/etc"
    chmod 0644 "${destdir}/etc"

    # Compress man pages
    lzip -9 "${destdir}/${mandir}"/man?/*

    # Copy documentation
    mkdir -p "${destdir}${docsdir}"

    for file in $docs
    do
        cp -p $file "${destdir}${docsdir}"
    done

}



#
# /etc/updatedb.conf
#
# configuration file for updatedb(8), see updatedb.conf(5)

PRUNEFS="nfs nfs4 afs proc smbfs cifs autofs auto iso9660 sshfs sysfs
usbfs tmpfs"
PRUNENAMES=".git .svn .hg .bzr _darcs CVS RCS .fsl"
PRUNEPATHS="/tmp /mnt /var/cache /var/lock /var/run /var/spool /var/tmp"

# End of file



#!/bin/sh
#
# /etc/cron.daily/mlocate: update the mlocate database
#

/usr/bin/updatedb

# End of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]