1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 124875 2014-08-30 02:33:55Z jmr@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name aide |
---|
7 | version 0.15.1 |
---|
8 | revision 1 |
---|
9 | categories security |
---|
10 | license GPL-2 |
---|
11 | maintainers nomaintainer |
---|
12 | description Advanced Intrusion Detection Environment |
---|
13 | long_description AIDE (Advanced Intrusion Detection Environment) \ |
---|
14 | is a free replacement for Tripwire. It does the same things as \ |
---|
15 | the semi-free Tripwire and more. \ |
---|
16 | It creates a database from the regular expression rules that it \ |
---|
17 | finds from the config file. Once this database is initialized it \ |
---|
18 | can be used to verify the integrity of the files. It has several \ |
---|
19 | message digest algorithms (md5,sha1,rmd160,tiger,haval,etc.) that \ |
---|
20 | are used to check the integrity of the file. More algorithms can \ |
---|
21 | be added with relative ease. All of the usual file attributes can \ |
---|
22 | also be checked for inconsistencies. It can read databases from \ |
---|
23 | older or newer versions. See the manual pages within the distribution \ |
---|
24 | for further info. There is also a beginning of a manual. |
---|
25 | homepage http://aide.sourceforge.net/ |
---|
26 | master_sites sourceforge:project/aide/aide/${version} |
---|
27 | platforms darwin |
---|
28 | configure.args --mandir=${prefix}/share/man \ |
---|
29 | --sysconfdir=${prefix}/etc/aide \ |
---|
30 | --with-mhash --with-zlib \ |
---|
31 | --with-locale --disable-static |
---|
32 | |
---|
33 | depends_build port:bison port:flex |
---|
34 | depends_lib port:mhash \ |
---|
35 | port:gettext |
---|
36 | |
---|
37 | patchfiles patch-Makefile.in.diff patch-src-Makefile.in.diff |
---|
38 | |
---|
39 | variant universal {} |
---|
40 | configure.cflags-append "${configure.cflags} [get_canonical_archflags cc]" |
---|
41 | |
---|
42 | post-patch { |
---|
43 | reinplace "s|@@LOCALEDIR@@|${prefix}/share/locale|g" \ |
---|
44 | ${worksrcpath}/Makefile.in ${worksrcpath}/src/Makefile.in |
---|
45 | } |
---|
46 | |
---|
47 | post-destroot { |
---|
48 | xinstall -d ${destroot}${prefix}/share/doc/${name} |
---|
49 | xinstall -d ${destroot}${prefix}/share/examples/${name} |
---|
50 | xinstall -d ${destroot}${prefix}/etc/${name} |
---|
51 | xinstall -d ${destroot}${prefix}/libexec/${name} |
---|
52 | xinstall -d ${destroot}${prefix}/Library/LaunchDaemons |
---|
53 | xinstall -d ${destroot}${prefix}/var/lib/aide |
---|
54 | xinstall -d ${destroot}${prefix}/var/log/aide |
---|
55 | |
---|
56 | copy ${filespath}/aide.conf ${destroot}${prefix}/share/examples/${name}/ |
---|
57 | reinplace "s|%%PREFIX%%|${prefix}|g" ${destroot}${prefix}/share/examples/${name}/aide.conf |
---|
58 | copy ${worksrcpath}/contrib ${destroot}${prefix}/share/examples/${name}/ |
---|
59 | copy ${worksrcpath}/doc/manual.html ${destroot}${prefix}/share/doc/${name}/ |
---|
60 | copy ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}/ |
---|
61 | xinstall -m 755 ${filespath}/aide-check.cron ${destroot}${prefix}/libexec/${name}/ |
---|
62 | reinplace "s|%%PREFIX%%|${prefix}|g" ${destroot}${prefix}/libexec/${name}/aide-check.cron |
---|
63 | copy ${filespath}/org.macports.aide.plist ${destroot}${prefix}/Library/LaunchDaemons/ |
---|
64 | reinplace "s|%%PREFIX%%|${prefix}|g" ${destroot}${prefix}/Library/LaunchDaemons/org.macports.aide.plist |
---|
65 | copy ${filespath}/mp-aide.conf ${destroot}${prefix}/share/examples/${name}/ |
---|
66 | reinplace "s|%%PREFIX%%|${prefix}|g" ${destroot}${prefix}/share/examples/${name}/mp-aide.conf |
---|
67 | |
---|
68 | destroot.keepdirs ${destroot}${prefix}/var/lib/aide \ |
---|
69 | ${destroot}${prefix}/var/log/aide ${destroot}${prefix}/etc/${name} |
---|
70 | } |
---|
71 | |
---|
72 | post-activate { |
---|
73 | if ![file exists ${prefix}/etc/aide/aide.conf ] { |
---|
74 | copy ${prefix}/share/examples/${name}/aide.conf ${prefix}/etc/aide/aide.conf |
---|
75 | } |
---|
76 | } |
---|
77 | |
---|
78 | platform darwin { |
---|
79 | # darwin doesn't have or need off64_t and friends |
---|
80 | configure.args-append --disable-lfs |
---|
81 | } |
---|
82 | |
---|
83 | notes " |
---|
84 | If not existing, a default config has been copied to |
---|
85 | ${prefix}/etc/aide/aide.conf |
---|
86 | Review it, especially adjust <myuser> to your environment. |
---|
87 | It seems wildcard or @@var are not working there, at least on stable. |
---|
88 | |
---|
89 | To initialize database |
---|
90 | # aide --init |
---|
91 | |
---|
92 | A default scheduled task has been set up once a day in |
---|
93 | ${prefix}/Library/LaunchDaemons/org.macports.aide.plist |
---|
94 | Check if it fit you and start it like |
---|
95 | # ln -s ${prefix}/Library/LaunchDaemons/org.macports.aide.plist /Library/LaunchDaemons/ |
---|
96 | and either one of those commands |
---|
97 | # launchctl load -w /Library/LaunchDaemons/org.macports.aide.plist |
---|
98 | # port load aide |
---|
99 | An example config for rotating logs with system newsyslog is |
---|
100 | ${prefix}/share/examples/${name}/mp-aide.conf |
---|
101 | You can install it with |
---|
102 | # cp ${prefix}/share/examples/${name}/mp-aide.conf /private/etc/newsyslog.d/ |
---|
103 | |
---|
104 | You may need to enable permanently postfix so the scheduled task can send email: |
---|
105 | Edit /System/Library/LaunchDaemons/org.postfix.master.plist |
---|
106 | Remove the two strings lines with '-e' '60'. |
---|
107 | Add a '<key>KeepAlive</key><true/>' |
---|
108 | Also, default MacOS configuration have /var/root/.forward redirecting email to |
---|
109 | /dev/null. Either change aide.conf or .forward to get mail report. |
---|
110 | |
---|
111 | BUG: cron: only check mode, choice update |
---|
112 | " |
---|
113 | |
---|
114 | if {${subport} eq ${name}} { |
---|
115 | |
---|
116 | version 0.15.1 |
---|
117 | master_sites sourceforge:project/aide/aide/${version} |
---|
118 | checksums rmd160 80ea88b1c1496bcca57d2d1cdeecdcdfca0fa5cf \ |
---|
119 | sha256 303e5c186257df8c86e418193199f4ea2183fc37d3d4a9098a614f61346059ef |
---|
120 | |
---|
121 | livecheck.type regex |
---|
122 | livecheck.url ${homepage} |
---|
123 | livecheck.regex "The current <em>stable</em> version of AIDE is <strong>(\\d+\\.\\d+\\.\\d+)</strong>" |
---|
124 | } |
---|
125 | |
---|
126 | #subport ${name}-devel { |
---|
127 | ## http://sourceforge.net/p/aide/code/ci/master/tree/NEWS |
---|
128 | ## 0.16a2 (2013-05-04) vs last commit 2013-05-20 |
---|
129 | # version 0.16a2 |
---|
130 | # master_sites sourceforge:project/aide/devel/${version} |
---|
131 | # checksums rmd160 92c7d29da4a224b505702a5b624d6dffe54a3aea \ |
---|
132 | # sha256 b52451816bc85409ea09dc612e32823336f78438afd28248c252912ea8b91b87 |
---|
133 | # |
---|
134 | # ## FIXME! build fails on "compare_db.c:114:32: error: initializer element is not a compile-time constant" |
---|
135 | # |
---|
136 | # livecheck.type regex |
---|
137 | # livecheck.url ${homepage} |
---|
138 | # livecheck.regex "The current <em>development</em> version of AIDE is <strong>(\\d+\\.\\w+)</strong>" |
---|
139 | #} |
---|