From 99e4ba42657eb0c19b187eb182f04d2bb8115ad3 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Tue, 9 Aug 1994 18:25:38 +0000 Subject: [PATCH] Make examples install into /usr/share/examples. Like with includes, you have a choice between SHARED=copies and SHARED=symlinks. The default is to copy. I have also added a /usr/share/examples/etc directory, where I hope to have all sample configuration files which in real use go into /etc installed. (This way, if the user really screws the real one up, they can always go back to a known-working distribution copy, even if they don't have sources.) --- share/Makefile | 2 +- share/examples/Makefile | 37 ++++++++++++++++++++++++++++++++++++ share/examples/etc/host.conf | 7 +++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 share/examples/Makefile create mode 100644 share/examples/etc/host.conf diff --git a/share/Makefile b/share/Makefile index 9eec20e0d7c4..5763c3e757a7 100644 --- a/share/Makefile +++ b/share/Makefile @@ -2,6 +2,6 @@ # XXX BROKEN LINKS: doc # XXX BROKEN TEMP: man mk -SUBDIR= dict me misc skel tabset termcap tmac zoneinfo +SUBDIR= dict examples me misc skel tabset termcap tmac zoneinfo .include diff --git a/share/examples/Makefile b/share/examples/Makefile new file mode 100644 index 000000000000..eadac571d6fe --- /dev/null +++ b/share/examples/Makefile @@ -0,0 +1,37 @@ +# $Id$ +# +# Doing a make install builds /usr/share/examples +# +all clean cleandir depend lint tags: + +DIRS=sunrpc etc + +# Define SHARED to indicate whether you want symbolic links to the system +# source (``symlinks''), or a separate copy (``copies''); (latter useful +# in environments where it's not possible to keep /sys publicly readable) +SHARED?= copies + +beforeinstall: ${SHARED} + +copies: + @echo installing ${DESTDIR}/usr/share/examples + @rm -rf ${DESTDIR}/usr/share/examples + @-mkdir ${DESTDIR}/usr/share/examples + @tar cf - ${DIRS} | \ + (cd ${DESTDIR}/usr/share/examples; tar xpfB -); + @chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/share/examples + @chmod -R a-w ${DESTDIR}/usr/share/examples + +symlinks: + @echo installing symlinks in ${DESTDIR}/usr/share/examples + @rm -rf ${DESTDIR}/usr/share/examples + @-mkdir ${DESTDIR}/usr/share/examples + @-for a in ${DIRS}; do \ + ln -s ${.CURDIR}/$$a ${DESTDIR}/usr/share/examples; \ + done + @chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/share/examples + @chmod -R a-w ${DESTDIR}/usr/share/examples + +.include + + diff --git a/share/examples/etc/host.conf b/share/examples/etc/host.conf new file mode 100644 index 000000000000..4c82560a1fa3 --- /dev/null +++ b/share/examples/etc/host.conf @@ -0,0 +1,7 @@ +# $Id: host.conf,v 1.2 1993/11/07 01:02:57 wollman Exp $ +# Default is to use the nameserver first +bind +# If that doesn't work, then try the /etc/hosts file +hosts +# If you have YP/NIS configured, uncomment the next line +# nis