815a22f28f
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.)
38 lines
1.0 KiB
Makefile
38 lines
1.0 KiB
Makefile
# $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 <bsd.prog.mk>
|
|
|
|
|