source: trunk/dports/sysutils/slocate/Portfile

Last change on this file was 91620, checked in by ryandesign@…, 5 years ago

slocate: fix notes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1# $Id: Portfile 91620 2012-04-07 01:38:02Z ryandesign@macports.org $
2
3PortSystem          1.0
4
5name                slocate
6version             3.1
7revision            2
8categories          sysutils
9license             GPL-2
10homepage            http://slocate.trakker.ca/
11description         Secure Locate is a replacement for locate.
12long_description    Secure locate provides a secure way to index and quickly search \
13                    for files on your system. It uses incremental encoding just like \
14                    GNU locate to compress its database to make searching faster, \
15                    but it will also check file permissions and ownership so that \
16                    users will not see files they do not have access to. \
17                    The big advantage is that slocate will find files in your ~, even \
18                    if you made it unreadable by "nobody" (who traditionally performs \
19                    the locate database update), without letting another user find \
20                    files there.
21platforms           darwin
22maintainers         nomaintainer
23master_sites        http://slackware.mirrors.tds.net/pub/slackware/slackware_source/a/slocate/ \
24    http://slackware.mirrors.pair.com/slackware_source/a/slocate/
25
26checksums           md5 908e6949d959ae7b686c10bb76b35bf3 \
27                    sha1 e427552664385b86931b7626c26bd95ae5f9f085 \
28                    rmd160 d3b1e818cc35ce8e87ec1b0764f6b2145a319e13
29patchfiles          patch-Makefile \
30                    patch-src-Makefile \
31                    patch-src-conf.c \
32                    patch-src-slocate.h \
33                    patch-src-utils.c \
34                    patch-doc-slocate.1
35
36use_configure       no
37
38post-patch {
39    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/src/slocate.h \
40                                         ${worksrcpath}/doc/slocate.1 \
41                                         ${worksrcpath}/src/Makefile \
42                                         ${worksrcpath}/Makefile
43    reinplace "s|__DESTROOT__|${destroot}|g" ${worksrcpath}/src/Makefile \
44                                             ${worksrcpath}/Makefile
45    reinplace "s|__USER__|${install.user}|g" ${worksrcpath}/Makefile
46    reinplace "s|__GROUP__|${install.group}|g" ${worksrcpath}/Makefile
47}
48
49build.args          CC="${configure.cc}"
50
51pre-destroot {
52    addgroup slocate
53}
54
55destroot.keepdirs   ${destroot}${prefix}/var/db/slocate
56post-destroot {
57    xinstall -d -g slocate -o root ${destroot}${prefix}/var/db/slocate
58    xinstall ${filespath}/daily.slocate ${destroot}${prefix}/etc/
59    reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/etc/daily.slocate
60}
61
62variant universal {
63    build.args-append   LDFLAGS="${configure.universal_ldflags}"
64
65    post-configure {
66        reinplace -E "/^CFLAGS=/s|\$| ${configure.universal_cflags}|" \
67            ${worksrcpath}/src/Makefile
68    }
69}
70
71notes "
72slocate's database should be updated on a regular basis. In\
73${prefix}/etc/daily.slocate, you'll find some lines to put in\
74/etc/daily.local to update the database on a daily basis (for example).\
75If you want to disable the weekly update of the system's built-in locate,\
76edit the file /etc/weekly.
77"
Note: See TracBrowser for help on using the repository browser.