# # Makefile for the Mason firewall builder # #Copyleft: # Mason interactively creates a Linux packet filtering firewall. # Copyright (C) 1998 William Stearns # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # The author can also be reached at: # William Stearns #email: wstearns@pobox.com (preferred) #web: http://www.pobox.com/~wstearns #snail: 544 Winchester Place # Colchester VT, 05446, USA # ##Make sure mason has MASONVER updated when this changes MASONVER = 0.12.0 #No quotes around multi file specs. BINDIR=/usr/bin/ BINFILES=mason mason-gui-text CONFDIR=/etc/ CONFFILE=masonrc LIBDIR=/var/lib/mason/ LIBFILES=masonlib baserules.sample moreservices nmap-services DOCDIR=/usr/doc/mason-${MASONVER}/ DOCFILES=COPYING Quickstart TODO index.html mason.txt overview SYSVDIR=/etc/rc.d/init.d/ SYSVFILES=firewall install: @echo -n "Installing files... " @echo -n "${BINFILES}... " @install -o root -g root -m 0755 ${BINFILES} ${BINDIR} @echo -n "lib directory... " @install -o root -g root -m 0755 -d ${LIBDIR} @echo -n "${LIBFILES}... " @install -o root -g root -m 0755 ${LIBFILES} ${LIBDIR} @echo -n "doc directory... " @install -o root -g root -m 0755 -d ${DOCDIR} @echo -n "${DOCFILES}... " @install -o root -g root -m 0644 ${DOCFILES} ${DOCDIR} @echo -n "${SYSVFILES}... " @install -o root -g root -m 0755 ${SYSVFILES} ${SYSVDIR} @if [ ! -f ${LIBDIR}baserules ] ; then \ install -o root -g root -m 0600 ${LIBDIR}baserules.sample ${LIBDIR}baserules ; \ echo -n "baserules... " ; \ else \ echo -n "${LIBDIR}baserules already exists, not overwriting... " ; \ fi @if [ ! -f ${CONFDIR}${CONFFILE} ] ; then \ install -o root -g root -m 0600 ${CONFFILE} ${CONFDIR}${CONFFILE} ; \ echo -n "${CONFFILE}... " ; \ else \ rm -f ${CONFDIR}${CONFFILE}.old ; \ mv -f ${CONFDIR}${CONFFILE} ${CONFDIR}${CONFFILE}.old ; \ install -o root -g root -m 0600 ${CONFFILE} ${CONFDIR}${CONFFILE} ; \ echo "" >>${CONFDIR}${CONFFILE} ; \ echo "#Your previous settings, if any:" >>${CONFDIR}${CONFFILE} ; \ cat ${CONFDIR}${CONFFILE}.old | grep -v "^#" | grep -v "^$$" >>${CONFDIR}${CONFFILE} ; \ echo -n "${CONFDIR}${CONFFILE} already exists, appending your settings to the new ${CONFFILE}... " ; \ fi @echo done! distribs: @echo This should only need to be used by the author in @echo packing up the mason package. cd .. \ && tar cf - mason-${MASONVER}/ | \ gzip -9 > mason-${MASONVER}.tar.gz \ && rm -f mason-current \ && ln -sf mason-${MASONVER} mason-current \ && tar cf - mason-current/* | \ gzip -9 > mason-current.tar.gz \ && cp mason-${MASONVER}.tar.gz /usr/src/redhat/SOURCES/ \ && cd mason-${MASONVER} \ && cp -f mason-${MASONVER}*.spec /usr/src/redhat/SPECS/ \ && rpm-2.5 --buildarch noarch -ba /usr/src/redhat/SPECS/mason-${MASONVER}*.spec \ && mv -f /usr/src/mason-*.tar.gz /usr/src/mysource/ \ && mv -f /usr/src/redhat/RPMS/noarch/mason-*.noarch.rpm /usr/src/mysource/ \ && mv -f /usr/src/redhat/SRPMS/mason-*.src.rpm /usr/src/mysource/