head 1.3; access; symbols FLOW2RRD_0_9_1:1.3 FLOW2RRD_0_9_0:1.2; locks; strict; comment @# @; 1.3 date 2004.12.26.18.52.45; author rse; state Exp; branches; next 1.2; 1.2 date 2004.12.26.15.20.00; author rse; state Exp; branches; next 1.1; 1.1 date 2004.12.26.13.10.39; author rse; state Exp; branches; next ; desc @@ 1.3 log @1. Adjust default configuration path. 2. Create "localstatedir" under "make install" and place default RRD into this directory. @ text @## ## OSSP flow2rrd -- NetFlow to Round-Robin Database ## Copyright (c) 2004 Ralf S. Engelschall ## Copyright (c) 2004 The OSSP Project ## ## This file is part of OSSP flow2rrd, a tool for storing NetFlow data ## into an RRD which can be found at http://www.ossp.org/pkg/tool/flow2rrd/. ## ## 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## USA, or contact Ralf S. Engelschall . ## ## Makefile.in: make(1) build procedure ## @@SET_MAKE@@ # installation paths DESTDIR = prefix = @@prefix@@ exec_prefix = @@exec_prefix@@ bindir = @@bindir@@ sysconfdir = @@sysconfdir@@ libdir = @@libdir@@ includedir = @@includedir@@ mandir = @@mandir@@ localstatedir = @@localstatedir@@ # build tools RM = rm -f RMDIR = rmdir SHTOOL = ./shtool TRUE = true PERL = @@PERL@@ POD2MAN = @@POD2MAN@@ # default targets all: flow2rrd flow2rrd.1 # generate program flow2rrd: flow2rrd.pl @@echo "generating: flow2rrd <-- flow2rrd.pl"; \ V=`$(SHTOOL) version -l txt -d long VERSION`; \ sed -e "s;@@PERL\@@;$(PERL);g" \ -e "s;@@POD2MAN\@@;$(POD2MAN);g" \ -e "s;@@SYSCONFDIR\@@;$(sysconfdir);g" \ -e "s;@@VERSION\@@;$$V;g" \ flow2rrd && chmod a+x flow2rrd # generate manual page flow2rrd.1: flow2rrd.pod @@echo "generating: flow2rrd.1 <-- flow2rrd.pod"; \ V1=`$(SHTOOL) version -l txt -d short VERSION`; \ V2=`$(SHTOOL) version -l txt -d long VERSION`; \ D=`$(SHTOOL) version -l txt -d long VERSION | sed -e 's;.*(;;' -e 's;).*;;'`; \ $(POD2MAN) --quotes=none \ --section=1 --center="NetFlow to Round-Robin Database (RRD)" \ --release="$$D" --date="OSSP flow2rrd $$V1" flow2rrd.pod | \ sed -e "s;FLOW2RRD_VERSION_STR;$$V2;" >flow2rrd.1 # perform installation procedure install: all $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1 $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(sysconfdir) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(localstatedir) $(SHTOOL) install -c -m 755 flow2rrd $(DESTDIR)$(bindir)/ $(SHTOOL) install -c -m 644 flow2rrd.1 $(DESTDIR)$(mandir)/man1/ $(SHTOOL) install -c -m 644 -e 's;@@LOCALSTATEDIR\@@;$(localstatedir);g' flow2rrd.cfg $(DESTDIR)$(sysconfdir)/ # perform uninstallation procedure uninstall: -$(RM) $(DESTDIR)$(bindir)/flow2rrd -$(RM) $(DESTDIR)$(mandir)/man1/flow2rrd.1 -$(RM) $(DESTDIR)$(sysconfdir)/flow2rrd.cfg -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(mandir)/man1 >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(mandir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(sysconfdir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(localstatedir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE) # perform build clean up procedure clean: -$(RM) flow2rrd -$(RM) flow2rrd.1 # perform distribution clean up procedure distclean: clean -$(RM) config.log config.status config.cache -$(RM) Makefile # perform developer clean up procedure realclean: distclean @ 1.2 log @more source tree cleanups and enhancements @ text @d30 9 a38 8 DESTDIR = prefix = @@prefix@@ exec_prefix = @@exec_prefix@@ bindir = @@bindir@@ sysconfdir = @@sysconfdir@@ libdir = @@libdir@@ includedir = @@includedir@@ mandir = @@mandir@@ d41 6 a46 6 RM = rm -f RMDIR = rmdir SHTOOL = ./shtool TRUE = true PERL = @@PERL@@ POD2MAN = @@POD2MAN@@ d57 1 d73 1 a73 1 install: d78 1 d81 1 a81 1 $(SHTOOL) install -c -m 644 flow2rrd.cfg $(DESTDIR)$(sysconfdir)/ d92 1 @ 1.1 log @add the usual amount of distribution files @ text @d2 1 a2 1 ## OSSP flow2rrd -- NetFlow to Round-Robin Database (RRD) d34 1 d47 1 a47 1 # default target d50 10 d61 1 a69 5 flow2rrd: flow2rrd.pl sed -e 's;@@PERL@@;$(PERL);g' \ -e 's;@@POD2MAN@@;$(POD2MAN);g' \ flow2rrd d75 4 a78 2 $(SHTOOL) install -c -m 755 flow2rrd $(DESTDIR)$(bindir)/flow2rrd $(SHTOOL) install -c -m 644 flow2rrd.1 $(DESTDIR)$(mandir)/man1/flow2rrd.1 d82 1 a82 1 -$(RM) $(DESTDIR)$(mandir)/bin/flow2rrd d84 2 d87 2 a88 1 -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE) @