Ticket #1269: Portfile

File Portfile, 1.9 KB (added by pguyot (Paul Guyot), 21 years ago)

Portfile for slocate-2.7

Line 
1# $Id$
2
3PortSystem 1.0
4name                            slocate
5version                         2.7
6categories                      sysutils
7homepage                        http://www.geekreview.org/slocate/
8description                     Secure Locate is a replacement for locate.
9long_description        Secure locate provides a secure way to index and quickly search \
10                                        for files on your system. It uses incremental encoding just like \
11                                        GNU locate to compress its database to make searching faster, \
12                                        but it will also check file permissions and ownership so that \
13                                        users will not see files they do not have access to. \
14                                        The big advantage is that slocate will find files in your ~, even \
15                                        if you made it unreadable by "nobody" (who traditionally performs \
16                                        the locate database update), without letting another user find \
17                                        files there.
18platforms                       darwin
19maintainers                     pguyot@kallisys.net
20master_sites            ftp://ftp.geekreview.org/slocate/src/
21checksums               md5 4872830642ea2ed5f9aff932720583c9
22patchfiles                      patch-Makefile.am patch-main.c patch-doc-slocate.1.linux
23pre-patch {
24        system "gzip -d ${worksrcpath}/doc/slocate.1.linux.gz"
25}
26post-patch {
27        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/main.c
28        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/doc/slocate.1.linux
29        system "gzip ${worksrcpath}/doc/slocate.1.linux"
30}
31configure.cmd           ./autogen.sh
32pre-destroot {
33        addgroup slocate
34}
35post-destroot {
36        system "install -d -g slocate -o root ${destroot}${prefix}/var/db/slocate"
37        system "touch ${destroot}${prefix}/var/db/slocate/.turd"
38        system "install ${portpath}/files/daily.slocate ${destroot}${prefix}/etc/"
39        reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/etc/daily.slocate
40}
41post-install {
42        ui_msg "slocate's database should be updated on a regular basis. In"
43        ui_msg "${prefix}/etc/daily.slocate, you'll find some lines to put in"
44        ui_msg "/etc/daily.local to update the database on a daily basis (for example)."
45        ui_msg "If you want to disable the weekly update of the system's built-in locate,"
46        ui_msg "edit the file /etc/weekly."
47}