`# $Id: Makefile.host,v 1.12 2010/12/06 15:31:53 ksb Exp $ # platform recipe for namedstats, msrc 2008 Q='' ifdef(`CHROOT',`',`define(CHROOT,`ifelse(HOSTTYPE,`FREEBSD',`yes',`no')')')dnl ` PROG= namedstats BIN= ${DESTDIR}/usr/local/libexec NAMED_SLASH= ${DESTDIR}'ifelse(CHROOT,`no',`',`/var/named')` NAMED_VAR=${NAMED_SLASH}/var STATS= ${NAMED_VAR}/stats CVULIB= ${DESTDIR}/var/peg/lib/cvu SRCl= SRCs= namedstats.pl MAN= OTHER= README named.cvu namedstats.chkconfig site_namedstats.xml namedstats.rc SOURCE= Makefile ITO.spec ${OTHER} ${MAN} ${SRCl} ${SRCs} all: namedstats namedstats.rc namedstats.chkconfig site_namedstats.xml namedstats: namedstats.pl perl -p -e ${Q}if (! $$^V) { s#^(use\slib)(\s.*\$$\^V.*?\,)(\n)#$$1$$3#; }${Q} <$@.pl >$@ perl -w -c $@ && chmod +x $@ clean: FRC rm -f Makefile.bak ${PROG} a.out core errs lint.out tags deinstall: FRC install -R ${BIN}/${PROG} depend: FRC dirs: ${BIN} ${STATS} distrib: FRC distrib -c ${BIN}/${PROG} HOST install.rc: all dirs FRC 'ifelse(HOSTTYPE,`FREEBSD', ` install -dr ${DESTDIR}/usr/local/etc/rc.d/ install -c ${PROG}.rc ${DESTDIR}/usr/local/etc/rc.d/', HOSTTYPE,`LINUX', ` install -dr ${DESTDIR}/etc/init.d/ install -c -m 755 namedstats.chkconfig ${DESTDIR}/etc/init.d/namedstats', HOSTTYPE,`SUN5', ` install -dr ${DESTDIR}/usr/local/svc/ install -dr ${DESTDIR}/var/svc/manifest/site/ install -c -m 755 namedstats.chkconfig ${DESTDIR}/usr/local/svc/namedstats install -c -m 644 site_namedstats.xml ${DESTDIR}/var/svc/manifest/site/site_namedstats.xml svccfg import ${DESTDIR}/var/svc/manifest/site/site_namedstats.xml', ` false not supported on HOSTTYPE') `install: all dirs FRC install -c ${PROG} ${BIN}/ install.cvu: named.cvu ${CVULIB} FRC install -cv -m 644 -o sample:sample named.cvu ${CVULIB}/named.cvu lint: FRC print: source FRC lpr -J"${PROG} source" ${SOURCE} source: ${SOURCE} spotless: clean rcsclean ${SOURCE} tags: FRC ${DESTDIR}: install -dr -o root -g wheel $@ ${DESTDIR}/var/peg/lib/cvu: ${DESTDIR}/var/peg/lib install -d -o sample:sample -m 0755 $@ ${DESTDIR}/var/peg/lib: ${DESTDIR}/var/peg install -d -o sample:sample -m 0755 $@ ${DESTDIR}/var/peg: ${DESTDIR}/var install -d -o root:sample -m 0555 $@ 'ifelse(CHROOT,`yes', `${NAMED_SLASH}: ${DESTDIR} install -dr -o root -g wheel $@ ') ` ${NAMED_VAR}: ${NAMED_SLASH} install -dr -o root -g wheel $@ ${STATS}: ${NAMED_VAR} 'ifelse(HOSTTYPE,`FREEBSD', ` install -dr -o bind -g wheel ${STATS}', HOSTTYPE,`LINUX', ` install -d -o named -g named ${STATS}', HOSTTYPE,`SUN5', ` install -d -o bind -g bind ${STATS}', ` false "not supported on HOSTTYPE"') ` ${BIN}: install -dr $@ ${SOURCE}: co -q $@ FRC: 'dnl