`# $Id: Makefile.host,v 1.16 2008/12/11 00:34:14 anderson Exp $ # Install full_duplex on this host (from msrc) # # Autoupgrades from legacy duplex name to full_duplex for consistency # sake on Solaris 10 systems. Q= ''` INSTALLP= /usr/local/bin/install SOURCE= peg.conf peg.xml peg.init peg.pl GEN= peg MAN= peg.1 DOC= ${DESTDIR}/usr/local/man/man1 ETC= ${DESTDIR}/etc LOCALETC= ${DESTDIR}/usr/local/etc BIN= ${DESTDIR}/usr/local/sbin all: source ${GEN} ${MAN} source: ${SOURCE} peg.1: peg pod2man peg > $@ peg: source perl -p -e ${Q}if (! $$^V) { s#^(use\slib)(\s.*\$$\^V.*?\,)(\n)#$$1$$3#;}${Q} < $@.pl >$@ install: all 'dnl ifelse(HOSTTYPE,SUN5, `ifelse(eval(HOSTOS<21000),1, ` ${INSTALLP} -cq -S${ETC}/rc2.d/S99peg peg.init ${ETC}/init.d/peg ${INSTALLP} -cq -S${ETC}/init.d/peg peg ${BIN}/peg ', ` ${INSTALLP} -cq peg ${DESTDIR}/usr/local/svc/peg ${INSTALLP} -cq peg.xml ${DESTDIR}/var/svc/manifest/site/peg.xml ')',HOSTTYPE,LINUX, ` ${INSTALLP} -m 755 -o root -g root peg.init ${ETC}/init.d/peg ${INSTALLP} -m 644 -o root -g root peg.conf ${LOCALETC}/peg.conf ${INSTALLP} -m 644 -o root -g root peg.1 ${DOC}/peg.1 ${INSTALLP} -m 755 -o root -g root peg ${BIN}/peg ',HOSTTYPE,SUSE, ` ${INSTALLP} -m 755 -o root -g root peg.init ${ETC}/init.d/peg ${INSTALLP} -m 644 -o root -g root peg.conf ${LOCALETC}/peg.conf ${INSTALLP} -m 644 -o root -g root peg.1 ${DOC}/peg.1 ${INSTALLP} -m 755 -o root -g root peg ${BIN}/peg ', ` echo "ERROR: No $@ for this host type" false ')dnl ` @echo "\"make enable\" to enable the service on reboot" @echo "\"make start\" to start this service now" uninstall: disable FRC -${INSTALLP} -R ${ETC}/init.d/peg -${INSTALLP} -R ${LOCALETC}/peg.conf -${INSTALLP} -R ${DOC}/peg.1 -${INSTALLP} -R ${BIN}/peg 'dnl ifelse(HOSTTYPE,SUN5, `ifelse(eval(HOSTOS<21000),1, ` -rm ${ETC}/rc2.d/S99peg -rm ${ETC}/init.d/peg ', ` -svcadm disable site/peg -svccfg delete svc:site/peg -rm ${DESTDIR}/usr/local/svc/peg -rm ${DESTDIR}/var/svc/manifest/site/peg.xml ')',HOSTTYPE,LINUX, `',HOSTTYPE,SUSE, `', ` echo "ERROR: No $@ for this host type" false ')dnl ` enable: install 'dnl ifelse(HOSTTYPE,SUN5, `ifelse(eval(HOSTOS<21000),1, ` ${ETC}/init.d/peg start ', ` ${INSTALLP} -cq -S${ETC}/rc2.d/S99peg peg.init ${ETC}/init.d/peg cd ${DESTDIR}/var/svc/manifest && svccfg import site/peg.xml ')',HOSTTYPE,LINUX, ` chkconfig --add peg chkconfig peg reset ',HOSTTYPE,SUSE, ` chkconfig --add peg chkconfig peg reset ')dnl ` @echo "\"make start\" to start this service now" disable: stop FRC 'dnl ifelse(HOSTTYPE,SUN5, `ifelse(eval(HOSTOS<21000),1, ` -rm ${ETC}/rc2.d/S99peg ', ` -svcadm disable site/peg -svccfg delete svc:site/peg ')',HOSTTYPE,LINUX, ` -chkconfig peg off -chkconfig --del peg ',HOSTTYPE,SUSE, ` -chkconfig peg off -chkconfig --del peg ', ` echo "ERROR: No $@ for this host type" false ')dnl ` clean: FRC -rm peg* -rm postinstall* -rm ${SOURCE} ${GEN} # need to be installed to start stop: 'dnl ifelse(HOSTTYPE,SUN5, `ifelse(eval(HOSTOS<21000),1, ` -${ETC}/init.d/peg stop ',` -svcadm disable peg:default -svcadm refresh svc:/site/peg ')',HOSTTYPE,LINUX, ` -service peg stop ',HOSTTYPE,SUSE, ` -${ETC}/init.d/peg stop ', ` false ')dnl ` # need to be installed to start start: enable 'dnl ifelse(HOSTTYPE,SUN5, `ifelse(eval(HOSTOS<21000),1, ` ${ETC}/init.d/peg start ',` svcadm enable peg:default svcadm refresh svc:/site/peg ')',HOSTTYPE,LINUX, ` service peg start ',HOSTTYPE,SUSE, ` ${ETC}/init.d/peg start ', ` false ')dnl ` FRC: 'dnl