<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[148268] trunk/dports/sysutils</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/148268">148268</a></dd>
<dt>Author</dt> <dd>mps@macports.org</dd>
<dt>Date</dt> <dd>2016-05-01 17:51:21 -0700 (Sun, 01 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>rkhunter: new port (#16792)</pre>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/sysutils/rkhunter/</li>
<li><a href="#trunkdportssysutilsrkhunterPortfile">trunk/dports/sysutils/rkhunter/Portfile</a></li>
<li>trunk/dports/sysutils/rkhunter/files/</li>
<li><a href="#trunkdportssysutilsrkhunterfilespatchinstallershdiff">trunk/dports/sysutils/rkhunter/files/patch-installer.sh.diff</a></li>
<li><a href="#trunkdportssysutilsrkhunterfilesrkhunterconflocalsample">trunk/dports/sysutils/rkhunter/files/rkhunter.conf.local.sample</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportssysutilsrkhunterPortfile"></a>
<div class="addfile"><h4>Added: trunk/dports/sysutils/rkhunter/Portfile (0 => 148268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/sysutils/rkhunter/Portfile                                (rev 0)
+++ trunk/dports/sysutils/rkhunter/Portfile        2016-05-02 00:51:21 UTC (rev 148268)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+# -*- 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
+# $Id$
+
+PortSystem          1.0
+
+name                rkhunter
+version             1.4.2
+categories          sysutils security
+license             GPL-2
+maintainers         mps openmaintainer
+description         A tool to search for rootkits.
+long_description    ${description}
+platforms           darwin
+homepage            http://rkhunter.sourceforge.net/
+master_sites        sourceforge
+
+checksums           rmd160  3aa8823583117ef9a0257b6fdb2a25d84fc9622d \
+                    sha256  789cc84a21faf669da81e648eead2e62654cfbe0b2d927119d8b1e55b22b65c3
+
+depends_lib         port:wget
+
+patchfiles          patch-installer.sh.diff
+
+post-patch {
+        reinplace -W ${worksrcpath}/files &quot;s|/var/log/rkhunter.log|${prefix}/var/log/rkhunter/rkhunter.log|g&quot; rkhunter.conf
+}
+
+use_configure       no
+
+build               {}
+
+destroot.cmd        ./installer.sh
+destroot.args       --layout custom ${prefix} --install
+destroot.keepdirs   ${destroot}${prefix}/var/log/rkhunter
+destroot.target     {}
+
+post-destroot {
+        xinstall ${filespath}/rkhunter.conf.local.sample ${destroot}${prefix}/etc/rkhunter
+        
+        xinstall -m 755 -d ${destroot}${prefix}/var/log/rkhunter
+}
+
+notes &quot;
+Set up a local configuration file. You may start with the sample file
+
+sudo cp ${prefix}/etc/rkhunter/rkhunter.conf.local.sample ${prefix}/etc/rkhunter/rkhunter.conf.local
+
+and then edit it as needed.
+&quot;
</ins><span class="cx">Property changes on: trunk/dports/sysutils/rkhunter/Portfile
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdportssysutilsrkhunterfilespatchinstallershdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/sysutils/rkhunter/files/patch-installer.sh.diff (0 => 148268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/sysutils/rkhunter/files/patch-installer.sh.diff                                (rev 0)
+++ trunk/dports/sysutils/rkhunter/files/patch-installer.sh.diff        2016-05-02 00:51:21 UTC (rev 148268)
</span><span class="lines">@@ -0,0 +1,395 @@
</span><ins>+--- installer.sh.orig        2014-02-23 20:37:15.000000000 -0600
++++ installer.sh        2015-03-16 14:33:48.000000000 -0500
+@@ -147,17 +147,17 @@
+                                 exit 1
+                                 ;
+                         *)
+-                                test &quot;${PREFIX}&quot; = &quot;/&quot; &amp;&amp; PREFIX=&quot;&quot;
++                                test &quot;${DESTDIR}${PREFIX}&quot; = &quot;/&quot; &amp;&amp; PREFIX=&quot;&quot;

+-                                if [ &quot;${RKHINST_ACTION}&quot; = &quot;install&quot; ]; then
+-                                        RKHTMPVAR=`echo &quot;${PATH}&quot; | grep &quot;${PREFIX}/bin&quot;`
+-
+-                                        if [ -z &quot;${RKHTMPVAR}&quot; ]; then
+-                                                echo &quot;&quot;
+-                                                echo &quot;Note: Directory ${PREFIX}/bin is not in your PATH&quot;
+-                                                echo &quot;&quot;
+-                                        fi
+-                                fi
++#                                 if [ &quot;${RKHINST_ACTION}&quot; = &quot;install&quot; ]; then
++#                                         RKHTMPVAR=`echo &quot;${PATH}&quot; | grep &quot;${DESTDIR}${PREFIX}/bin&quot;`
++# 
++#                                         if [ -z &quot;${RKHTMPVAR}&quot; ]; then
++#                                                 echo &quot;&quot;
++#                                                 echo &quot;Note: Directory ${DESTDIR}${PREFIX}/bin is not in your PATH&quot;
++#                                                 echo &quot;&quot;
++#                                         fi
++#                                 fi
+                                 ;
+                         esac
+                         ;
+@@ -234,7 +234,7 @@

+                 case &quot;$1&quot; in
+                 /usr/local|custom_*)
+-                        SYSCONFIGDIR=&quot;${PREFIX}/etc&quot;
++                        SYSCONFIGDIR=&quot;${PREFIX}/etc/rkhunter&quot;
+                         ;
+                 RPM)
+                         if [ $RPM_USING_ROOT -eq 1 ]; then
+@@ -278,11 +278,7 @@
+                         fi

+                         if [ -z &quot;${LIBDIR}&quot; ]; then
+-                                if [ &quot;${UNAMEM}&quot; = &quot;x86_64&quot; -o &quot;${UNAMEM}&quot; = &quot;ppc64&quot; ]; then
+-                                        LIBDIR=&quot;${PREFIX}/lib64&quot;
+-                                else
+-                                        LIBDIR=&quot;${PREFIX}/lib&quot;
+-                                fi
++                                LIBDIR=&quot;${PREFIX}/lib&quot;
+                         fi

+                         BINDIR=&quot;${PREFIX}/bin&quot;
+@@ -362,11 +358,7 @@
+                         SHAREDIR=&quot;${PREFIX}/share&quot;
+                         ;
+                 *)
+-                        if [ -d &quot;${PREFIX}/lib64&quot; ]; then
+-                                LIBDIR=&quot;${PREFIX}/lib64&quot;
+-                        else
+-                                LIBDIR=&quot;${PREFIX}/lib&quot;
+-                        fi
++                        LIBDIR=&quot;${PREFIX}/lib&quot;

+                         BINDIR=&quot;${PREFIX}/bin&quot;
+                         VARDIR=&quot;/var&quot;
+@@ -410,8 +402,8 @@
+                 RKHINST_MAN_DIR=&quot;${PREFIX}/man/man8&quot;
+         else
+                 RKHINST_DB_DIR=&quot;${VARDIR}/lib/${APPNAME}/db&quot;
+-                RKHINST_TMP_DIR=&quot;${VARDIR}/lib/${APPNAME}/tmp&quot;
+-                RKHINST_DOC_DIR=&quot;${SHAREDIR}/doc/${APPNAME}-${APPVERSION}&quot;
++                RKHINST_TMP_DIR=&quot;/private/tmp&quot;
++                RKHINST_DOC_DIR=&quot;${SHAREDIR}/${APPNAME}-${APPVERSION}&quot;
+         fi

+         RKHINST_LANG_DIR=&quot;${RKHINST_DB_DIR}/i18n&quot;
+@@ -635,14 +627,14 @@
+                 ;
+         *) 
+                 # Check PREFIX
+-                if [ -z &quot;${PREFIX}&quot; ]; then
++                if [ -z &quot;${DESTDIR}${PREFIX}&quot; ]; then
+                         :
+-                elif [ -d &quot;${PREFIX}&quot; ]; then
+-                        if [ -w &quot;${PREFIX}&quot; ]; then
+-                                echo &quot; Checking installation directory \&quot;$PREFIX\&quot;: it exists and is writable.&quot;
++                elif [ -d &quot;${DESTDIR}${PREFIX}&quot; ]; then
++                        if [ -w &quot;${DESTDIR}${PREFIX}&quot; ]; then
++                                echo &quot; Checking installation directory \&quot;${DESTDIR}$PREFIX\&quot;: it exists and is writable.&quot;

+                                 # That's enough for a standalone installation.
+-                                if [ &quot;${PREFIX}&quot; = &quot;.&quot; ]; then
++                                if [ &quot;${DESTDIR}${PREFIX}&quot; = &quot;.&quot; ]; then
+                                         chown -R ${RKHINST_OWNER} ./files 

+                                         for DIR in `find ./files -type d -name CVS`; do
+@@ -668,7 +660,7 @@

+                                         PREFIX=&quot;${PWD}&quot;

+-                                        echo &quot;LOGFILE=${PREFIX}/rkhunter.log&quot; &gt;&gt;rkhunter.conf 
++                                        echo &quot;LOGFILE=${PREFIX}/var/log/rkhunter/rkhunter.log&quot; &gt;&gt;rkhunter.conf 
+                                         echo &quot;TMPDIR=$PREFIX&quot; &gt;&gt;rkhunter.conf 
+                                         echo &quot;DBDIR=$PREFIX&quot; &gt;&gt;rkhunter.conf 
+                                         echo &quot;SCRIPTDIR=$PREFIX&quot; &gt;&gt;rkhunter.conf 
+@@ -691,7 +683,7 @@
+                                 echo &quot; Checking installation directory \&quot;$PREFIX\&quot;: it exists, but it is not writable. Exiting.&quot;
+                                 exit 1
+                         fi
+-                elif [ -e &quot;${PREFIX}&quot; ]; then
++                elif [ -e &quot;${DESTDIR}${PREFIX}&quot; ]; then
+                         echo &quot; Checking installation directory \&quot;$PREFIX\&quot;: it is not a directory. Exiting.&quot;
+                         exit 1
+                 else
+@@ -712,21 +704,21 @@

+         umask 022
+         for DIR in ${RKHDIR_LIST}; do
+-                if [ -d &quot;${DIR}&quot; ]; then
+-                        if [ -w &quot;${DIR}&quot; ]; then
+-                                echo &quot;  Directory ${DIR}: exists and is writable.&quot;
++                if [ -d &quot;${DESTDIR}${DIR}&quot; ]; then
++                        if [ -w &quot;${DESTDIR}${DIR}&quot; ]; then
++                                echo &quot;  Directory ${DESTDIR}${DIR}: exists and is writable.&quot;
+                         else
+-                                echo &quot;  Directory ${DIR}: exists, but it is not writable. Exiting.&quot;
++                                echo &quot;  Directory ${DESTDIR}${DIR}: exists, but it is not writable. Exiting.&quot;
+                                 exit 1
+                         fi
+                 else
+-                        mkdir -p ${DIR} &gt;/dev/null 2&gt;&amp;1
++                        mkdir -p ${DESTDIR}${DIR} &gt;/dev/null 2&gt;&amp;1
+                         ERRCODE=$?

+                         if [ $ERRCODE -eq 0 ]; then
+-                                echo &quot;  Directory ${DIR}: creating: OK&quot;
++                                echo &quot;  Directory ${DESTDIR}${DIR}: creating: OK&quot;
+                         else
+-                                echo &quot;  Directory ${DIR}: creating: FAILED: Code $ERRCODE&quot;
++                                echo &quot;  Directory ${DESTDIR}${DIR}: creating: FAILED: Code $ERRCODE&quot;
+                                 exit 1
+                         fi
+                 fi
+@@ -734,28 +726,28 @@
+         umask 027

+         for DIR in ${RKHINST_DIRS_EXCEP}; do
+-                if [ -d &quot;${DIR}&quot; ]; then
+-                        if [ -w &quot;${DIR}&quot; ]; then
+-                                echo &quot;  Directory ${DIR}: exists and is writable.&quot;
++                if [ -d &quot;${DESTDIR}${DIR}&quot; ]; then
++                        if [ -w &quot;${DESTDIR}${DIR}&quot; ]; then
++                                echo &quot;  Directory ${DESTDIR}${DIR}: exists and is writable.&quot;
+                         else
+-                                echo &quot;  Directory ${DIR}: exists, but it is not writable. Exiting.&quot;
++                                echo &quot;  Directory ${DESTDIR}${DIR}: exists, but it is not writable. Exiting.&quot;
+                                 exit 1
+                         fi
+                 else
+-                        mkdir -p ${DIR} &gt;/dev/null 2&gt;&amp;1
++                        mkdir -p ${DESTDIR}${DIR} &gt;/dev/null 2&gt;&amp;1
+                         ERRCODE=$?

+                         if [ $ERRCODE -eq 0 ]; then
+-                                echo &quot;  Directory ${DIR}: creating: OK&quot;
++                                echo &quot;  Directory ${DESTDIR}${DIR}: creating: OK&quot;
+                         else
+-                                echo &quot;  Directory ${DIR}: creating: FAILED: Code $ERRCODE&quot;
++                                echo &quot;  Directory ${DESTDIR}${DIR}: creating: FAILED: Code $ERRCODE&quot;
+                                 exit 1
+                         fi
+                 fi

+-                case &quot;${DIR}&quot; in
++                case &quot;${DESTDIR}${DIR}&quot; in
+                 */${APPNAME}|*/${APPNAME}/*|*/${APPNAME}-${APPVERSION}) 
+-                        chmod &quot;${RKHINST_MODE_EX}&quot; &quot;${DIR}&quot;
++                        chmod &quot;${RKHINST_MODE_EX}&quot; &quot;${DESTDIR}${DIR}&quot;
+                         ;
+                 esac
+         done
+@@ -769,20 +761,20 @@
+         for FILE in ${RKHINST_SCRIPT_FILES} ${RKHINST_DB_FILES} ${RKHINST_MAN_FILES}; do
+                 case &quot;${FILE}&quot; in
+                 *.pl|*.sh)
+-                        cp -f ./files/&quot;${FILE}&quot; &quot;${RKHINST_SCRIPT_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
++                        cp -f ./files/&quot;${FILE}&quot; &quot;${DESTDIR}${RKHINST_SCRIPT_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
+                         ERRCODE=$?

+                         if [ $ERRCODE -eq 0 ]; then
+                                 echo &quot; Installing ${FILE}: OK&quot;
+-                                chmod &quot;${RKHINST_MODE_EX}&quot; &quot;${RKHINST_SCRIPT_DIR}/${FILE}&quot;
++                                chmod &quot;${RKHINST_MODE_EX}&quot; &quot;${DESTDIR}${RKHINST_SCRIPT_DIR}/${FILE}&quot;
+                         else
+                                 echo &quot; Installing ${FILE}: FAILED: Code $ERRCODE&quot;
+                                 exit 1
+                         fi
+                         ;
+                 *.dat)
+-                        if [ &quot;${FILE}&quot; = &quot;mirrors.dat&quot; -a -f &quot;${RKHINST_DB_DIR}/mirrors.dat&quot; ]; then
+-                                RKHTMPVAR=`egrep '^(local|remote)=' ${RKHINST_DB_DIR}/mirrors.dat 2&gt;/dev/null`
++                        if [ &quot;${FILE}&quot; = &quot;mirrors.dat&quot; -a -f &quot;${DESTDIR}${RKHINST_DB_DIR}/mirrors.dat&quot; ]; then
++                                RKHTMPVAR=`egrep '^(local|remote)=' ${DESTDIR}${RKHINST_DB_DIR}/mirrors.dat 2&gt;/dev/null`

+                                 if [ -n &quot;${RKHTMPVAR}&quot; ]; then
+                                         echo &quot; Installing ${FILE}: Locally modified - not overwritten&quot;
+@@ -790,24 +782,24 @@
+                                 fi
+                         fi

+-                        cp -f ./files/&quot;${FILE}&quot; &quot;${RKHINST_DB_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
++                        cp -f ./files/&quot;${FILE}&quot; &quot;${DESTDIR}${RKHINST_DB_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
+                         ERRCODE=$?

+                         if [ $ERRCODE -eq 0 ]; then
+                                 echo &quot; Installing ${FILE}: OK&quot;
+-                                chmod &quot;${RKHINST_MODE_RW}&quot; &quot;${RKHINST_DB_DIR}/${FILE}&quot;
++                                chmod &quot;${RKHINST_MODE_RW}&quot; &quot;${DESTDIR}${RKHINST_DB_DIR}/${FILE}&quot;
+                         else
+                                 echo &quot; Installing ${FILE}: FAILED: Code $ERRCODE&quot;
+                                 exit 1
+                         fi
+                         ;
+                 *.8)
+-                        cp -f ./files/&quot;${FILE}&quot; &quot;${RKHINST_MAN_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
++                        cp -f ./files/&quot;${FILE}&quot; &quot;${DESTDIR}${RKHINST_MAN_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
+                         ERRCODE=$?

+                         if [ $ERRCODE -eq 0 ]; then
+                                 echo &quot; Installing ${FILE}: OK&quot;
+-                                chmod &quot;${RKHINST_MODE_RWR}&quot; &quot;${RKHINST_MAN_DIR}/${FILE}&quot;
++                                chmod &quot;${RKHINST_MODE_RWR}&quot; &quot;${DESTDIR}${RKHINST_MAN_DIR}/${FILE}&quot;
+                         else
+                                 echo &quot; Installing ${FILE}: FAILED: Code $ERRCODE&quot;
+                                 exit 1
+@@ -819,12 +811,12 @@

+         # Application documents
+         for FILE in ${RKHINST_DOC_FILES}; do
+-                cp -f ./files/&quot;${FILE}&quot; &quot;${RKHINST_DOC_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
++                cp -f ./files/&quot;${FILE}&quot; &quot;${DESTDIR}${RKHINST_DOC_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
+                 ERRCODE=$?

+                 if [ $ERRCODE -eq 0 ]; then
+                         echo &quot; Installing ${FILE}: OK&quot;
+-                        chmod &quot;${RKHINST_MODE_RWR}&quot; &quot;${RKHINST_DOC_DIR}/${FILE}&quot;
++                        chmod &quot;${RKHINST_MODE_RWR}&quot; &quot;${DESTDIR}${RKHINST_DOC_DIR}/${FILE}&quot;
+                 else
+                         echo &quot; Installing ${FILE}: FAILED: Code $ERRCODE&quot;
+                         exit 1
+@@ -836,7 +828,7 @@
+         ERRCODE=0

+         for FILE in `find ./files/i18n -type f`; do
+-                cp &quot;${FILE}&quot; &quot;${RKHINST_LANG_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
++                cp &quot;${FILE}&quot; &quot;${DESTDIR}${RKHINST_LANG_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
+                 ERRCODE=$?

+                 test $ERRCODE -ne 0 &amp;&amp; break
+@@ -854,7 +846,7 @@
+         ERRCODE=0

+         for FILE in `find ./files/signatures -type f`; do
+-                cp &quot;${FILE}&quot; &quot;${RKHINST_SIG_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
++                cp &quot;${FILE}&quot; &quot;${DESTDIR}${RKHINST_SIG_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
+                 ERRCODE=$?

+                 test $ERRCODE -ne 0 &amp;&amp; break
+@@ -871,24 +863,24 @@
+         for FILE in ${RKHINST_BIN_FILES}; do
+                 case &quot;${RKHINST_LAYOUT}&quot; in
+                 RPM|DEB|TGZ|TXZ)        
+-                        cp -f ./files/&quot;${FILE}&quot; &quot;${RKHINST_BIN_DIR}/${FILE}&quot; &gt;/dev/null 2&gt;&amp;1
++                        cp -f ./files/&quot;${FILE}&quot; &quot;${DESTDIR}${RKHINST_BIN_DIR}/${FILE}&quot; &gt;/dev/null 2&gt;&amp;1
+                         ERRCODE=$?

+                         if [ $ERRCODE -eq 0 ]; then
+                                 echo &quot; Installing ${FILE}: OK&quot;
+-                                chmod &quot;${RKHINST_MODE_EX}&quot; &quot;${RKHINST_BIN_DIR}/${FILE}&quot;
++                                chmod &quot;${RKHINST_MODE_EX}&quot; &quot;${DESTDIR}${RKHINST_BIN_DIR}/${FILE}&quot;
+                         else
+                                 echo &quot; Installing ${FILE}: FAILED: Code $ERRCODE&quot;
+                                 exit 1
+                         fi
+                         ;
+                 *)        
+-                        sed -e &quot;s|-f /etc/rkhunter.conf|-f $RKHINST_ETC_DIR/rkhunter.conf|g&quot; -e &quot;s|CONFIGFILE=\&quot;/etc|CONFIGFILE=\&quot;$RKHINST_ETC_DIR|g&quot; ./files/&quot;${FILE}&quot; &gt;&quot;${RKHINST_BIN_DIR}/${FILE}&quot;
++                        sed -e &quot;s|-f /etc/rkhunter.conf|-f $RKHINST_ETC_DIR/rkhunter.conf|g&quot; -e &quot;s|CONFIGFILE=\&quot;/etc|CONFIGFILE=\&quot;$RKHINST_ETC_DIR|g&quot; ./files/&quot;${FILE}&quot; &gt;&quot;${DESTDIR}${RKHINST_BIN_DIR}/${FILE}&quot;
+                         ERRCODE=$?

+                         if [ $ERRCODE -eq 0 ]; then
+                                 echo &quot; Installing ${FILE}: OK&quot;
+-                                chmod &quot;${RKHINST_MODE_EX}&quot; &quot;${RKHINST_BIN_DIR}/${FILE}&quot;
++                                chmod &quot;${RKHINST_MODE_EX}&quot; &quot;${DESTDIR}${RKHINST_BIN_DIR}/${FILE}&quot;
+                         else
+                                 echo &quot; Installing ${FILE}: FAILED: Code $ERRCODE&quot;
+                                 exit 1
+@@ -902,7 +894,7 @@
+         for FILE in ${RKHINST_ETC_FILE}; do
+                 test $OVERWRITE -eq 1 &amp;&amp; rm -f &quot;${RKHINST_ETC_DIR}/${FILE}&quot;

+-                if [ -f &quot;${RKHINST_ETC_DIR}/${FILE}&quot; ]; then
++                if [ -f &quot;${DESTDIR}${RKHINST_ETC_DIR}/${FILE}&quot; ]; then
+                         # We need people to make local changes themselves, so
+                         # give opportunity and alert. Don't use Perl to get value.

+@@ -918,7 +910,7 @@

+                         NEWFILE=&quot;${FILE}.${RANDVAL}&quot;

+-                        cp -f &quot;./files/${FILE}&quot; &quot;${RKHINST_ETC_DIR}/${NEWFILE}&quot; &gt;/dev/null 2&gt;&amp;1
++                        cp -f &quot;./files/${FILE}&quot; &quot;${DESTDIR}${RKHINST_ETC_DIR}/${NEWFILE}&quot; &gt;/dev/null 2&gt;&amp;1
+                         ERRCODE=$?

+                         if [ $ERRCODE -eq 0 ]; then
+@@ -929,18 +921,18 @@
+                                 exit 1
+                         fi

+-                        echo &quot;&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${NEWFILE}&quot;
++                        echo &quot;&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${NEWFILE}&quot;

+-                        test -z &quot;${PREFIX}&quot; &amp;&amp; RKHTMPVAR=&quot;/&quot; || RKHTMPVAR=&quot;${PREFIX}&quot;
++                        test -z &quot;${DESTDIR}${PREFIX}&quot; &amp;&amp; RKHTMPVAR=&quot;/&quot; || RKHTMPVAR=&quot;${DESTDIR}${PREFIX}&quot;

+-                        echo &quot;INSTALLDIR=${RKHTMPVAR}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${NEWFILE}&quot;
+-                        echo &quot;DBDIR=${RKHINST_DB_DIR}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${NEWFILE}&quot;
+-                        echo &quot;SCRIPTDIR=${RKHINST_SCRIPT_DIR}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${NEWFILE}&quot;
+-                        echo &quot;TMPDIR=${RKHINST_TMP_DIR}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${NEWFILE}&quot;
++                        echo &quot;INSTALLDIR=${RKHTMPVAR}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${NEWFILE}&quot;
++                        echo &quot;DBDIR=${RKHINST_DB_DIR}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${NEWFILE}&quot;
++                        echo &quot;SCRIPTDIR=${RKHINST_SCRIPT_DIR}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${NEWFILE}&quot;
++                        echo &quot;TMPDIR=${RKHINST_TMP_DIR}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${NEWFILE}&quot;

+                         if [ &quot;$FILE&quot; = &quot;rkhunter.conf&quot; ]; then
+-                                echo &quot;USER_FILEPROP_FILES_DIRS=${RKHINST_ETC_DIR}/${FILE}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${NEWFILE}&quot;
+-                                test -f &quot;${RKHINST_ETC_DIR}/${FILE}.local&quot; &amp;&amp; echo &quot;USER_FILEPROP_FILES_DIRS=${RKHINST_ETC_DIR}/${FILE}.local&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${NEWFILE}&quot;
++                                echo &quot;USER_FILEPROP_FILES_DIRS=${RKHINST_ETC_DIR}/${FILE}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${NEWFILE}&quot;
++                                test -f &quot;${RKHINST_ETC_DIR}/${FILE}.local&quot; &amp;&amp; echo &quot;USER_FILEPROP_FILES_DIRS=${RKHINST_ETC_DIR}/${FILE}.local&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${NEWFILE}&quot;
+                         fi

+                         case &quot;${RKHINST_LAYOUT}&quot; in
+@@ -955,21 +947,21 @@
+                                 ;
+                         esac
+                 else
+-                        cp -f &quot;./files/${FILE}&quot; &quot;${RKHINST_ETC_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
++                        cp -f &quot;./files/${FILE}&quot; &quot;${DESTDIR}${RKHINST_ETC_DIR}&quot; &gt;/dev/null 2&gt;&amp;1
+                         ERRCODE=$?

+                         if [ $ERRCODE -eq 0 ]; then
+                                 echo &quot; Installing ${FILE}: OK&quot;
+-                                chmod &quot;${RKHINST_MODE_RW}&quot; &quot;${RKHINST_ETC_DIR}/${FILE}&quot;
++                                chmod &quot;${RKHINST_MODE_RW}&quot; &quot;${DESTDIR}${RKHINST_ETC_DIR}/${FILE}&quot;
+                         else
+                                 echo &quot; Installing ${FILE}: FAILED: Code $ERRCODE&quot;
+                                 exit 1
+                         fi

+-                        echo &quot;&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
++                        echo &quot;&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${FILE}&quot;

+                         if [ -n &quot;${RPM_BUILD_ROOT}&quot; -a $RPM_USING_ROOT -eq 0 ]; then
+-                                echo &quot;INSTALLDIR=${PREFIX}&quot; | sed &quot;s|${RPM_BUILD_ROOT}||g&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
++                                echo &quot;INSTALLDIR=${DESTDIR}${PREFIX}&quot; | sed &quot;s|${RPM_BUILD_ROOT}||g&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
+                                 echo &quot;DBDIR=${RKHINST_DB_DIR}&quot; | sed &quot;s|${RPM_BUILD_ROOT}||g&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
+                                 echo &quot;SCRIPTDIR=${RKHINST_SCRIPT_DIR}&quot; | sed &quot;s|${RPM_BUILD_ROOT}||g&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
+                                 echo &quot;TMPDIR=${RKHINST_TMP_DIR}&quot; | sed &quot;s|${RPM_BUILD_ROOT}||g&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
+@@ -992,11 +984,11 @@
+                         else
+                                 test -z &quot;${PREFIX}&quot; &amp;&amp; RKHTMPVAR=&quot;/&quot; || RKHTMPVAR=&quot;${PREFIX}&quot;

+-                                echo &quot;INSTALLDIR=${RKHTMPVAR}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
+-                                echo &quot;DBDIR=${RKHINST_DB_DIR}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
+-                                echo &quot;SCRIPTDIR=${RKHINST_SCRIPT_DIR}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
+-                                echo &quot;TMPDIR=${RKHINST_TMP_DIR}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
+-                                echo &quot;USER_FILEPROP_FILES_DIRS=${RKHINST_ETC_DIR}/${FILE}&quot; &gt;&gt;&quot;${RKHINST_ETC_DIR}/${FILE}&quot;
++                                echo &quot;INSTALLDIR=${RKHTMPVAR}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${FILE}&quot;
++                                echo &quot;DBDIR=${RKHINST_DB_DIR}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${FILE}&quot;
++                                echo &quot;SCRIPTDIR=${RKHINST_SCRIPT_DIR}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${FILE}&quot;
++                                echo &quot;TMPDIR=${RKHINST_TMP_DIR}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${FILE}&quot;
++                                echo &quot;USER_FILEPROP_FILES_DIRS=${RKHINST_ETC_DIR}/${FILE}&quot; &gt;&gt;&quot;${DESTDIR}${RKHINST_ETC_DIR}/${FILE}&quot;
+                         fi
+                 fi
+         done
+@@ -1274,6 +1266,9 @@
+         -o | --overwrite)
+                 OVERWRITE=1
+                 ;
++        DESTDIR*)
++                DESTDIR=`echo &quot;$1&quot; | awk 'BEGIN {FS=&quot;=&quot;}; {print $2}'`
++                ;
+         *)
+                 echo &quot;Unknown option given: $1&quot;
+                 echo &quot;&quot;
</ins></span></pre></div>
<a id="trunkdportssysutilsrkhunterfilesrkhunterconflocalsample"></a>
<div class="addfile"><h4>Added: trunk/dports/sysutils/rkhunter/files/rkhunter.conf.local.sample (0 => 148268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/sysutils/rkhunter/files/rkhunter.conf.local.sample                                (rev 0)
+++ trunk/dports/sysutils/rkhunter/files/rkhunter.conf.local.sample        2016-05-02 00:51:21 UTC (rev 148268)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+#        rkhunter.conf.local
+
+#        version 1.0.0
+#        20150316
+#        by Marius Schamschula
+
+#        Tested under OS X 10.9.5
+
+#        Apple installed files
+RTKT_FILE_WHITELIST=/etc/sshd_config
+RTKT_FILE_WHITELIST=/etc/ssh_host_key
+
+#        Apple installed scripts
+SCRIPTWHITELIST=/usr/bin/fuser
+SCRIPTWHITELIST=/usr/bin/whatis
+SCRIPTWHITELIST=/usr/bin/shasum
+
+#        MacPorts installed scripts
+SCRIPTWHITELIST=/opt/local/bin/egrep
+SCRIPTWHITELIST=/opt/local/bin/fgrep
</ins></span></pre>
</div>
</div>

</body>
</html>