From f675513383767ddab1640375284ffe29a8c79e60 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 30 Jul 2011 10:57:32 -0700 Subject: [PATCH] Make 'build' work on a Mac Signed-off-by: Tom Eastep --- Shorewall/install.sh | 8 +++++--- Shorewall6/install.sh | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Shorewall/install.sh b/Shorewall/install.sh index ce7a983da..110d0be1b 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -111,6 +111,7 @@ SPARSE= MANDIR=${MANDIR:-"/usr/share/man"} [ -n "${LIBEXEC:=/usr/share}" ] [ -n "${PERLLIB:=/usr/share/shorewall}" ] +MACHOST= case "$LIBEXEC" in /*) @@ -152,6 +153,7 @@ case $(uname) in [ -z "$OWNER" ] && OWNER=root [ -z "$GROUP" ] && GROUP=wheel MAC=Yes + MACHOST=Yes INSTALLD= T= ;; @@ -280,12 +282,12 @@ if [ -z "$CYGWIN" ]; then install_file shorewall ${DESTDIR}/sbin/shorewall 0755 echo "shorewall control program installed in ${DESTDIR}/sbin/shorewall" - if [ -z "$MAC" ]; then + if [ -z "$MACHOST" ]; then eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall else - eval sed -i -e \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall - eval sed -i -e \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall + eval sed -i \'\' -e \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall + eval sed -i \'\' -e \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall fi else install_file shorewall ${DESTDIR}/bin/shorewall 0755 diff --git a/Shorewall6/install.sh b/Shorewall6/install.sh index fcc7b8c37..a9e4b65e4 100755 --- a/Shorewall6/install.sh +++ b/Shorewall6/install.sh @@ -110,6 +110,7 @@ ANNOTATED= DEBIAN= CYGWIN= MAC= +MACHOST= MANDIR=${MANDIR:-"/usr/share/man"} SPARSE= INSTALLD='-D' @@ -154,6 +155,7 @@ case $(uname) in [ -z "$OWNER" ] && OWNER=root [ -z "$GROUP" ] && GROUP=wheel MAC=Yes + MACHOST=Yes INSTALLD= ;; *) @@ -272,12 +274,12 @@ fi if [ -z "$CYGWIN" ]; then install_file shorewall6 ${DESTDIR}/sbin/shorewall6 0755 ${DESTDIR}/var/lib/shorewall6-${VERSION}.bkout - if [ -z "$MAC" ]; then + if [ -z "$MACHOST" ]; then eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall6 eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall6 else - eval sed -i -e \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall6 - eval sed -i -e \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall6 + eval sed -i \'\' -e \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall6 + eval sed -i \'\' -e \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall6 fi echo "shorewall6 control program installed in ${DESTDIR}/sbin/shorewall6" else