diff --git a/share/examples/FreeBSD_version/Makefile b/share/examples/FreeBSD_version/Makefile index 834d925a6fe2..437ad2445255 100644 --- a/share/examples/FreeBSD_version/Makefile +++ b/share/examples/FreeBSD_version/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/${PROG} PROG= FreeBSD_version MAN= diff --git a/share/examples/Makefile b/share/examples/Makefile index f92610786e6e..03b295286380 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -4,6 +4,15 @@ .include +PACKAGE=examples +FILESDIR= ${SHAREDIR}/examples + +.for _XFILE in ${XFILES} +FILESGROUPS+= ${_XFILE} +PACKAGE_${_XFILE}?=examples +${_XFILE}DIR= ${SHAREDIR}/examples/${_XFILE:H} +.endfor + LDIRS= BSD_daemon \ FreeBSD_version \ IPv6 \ @@ -232,7 +241,7 @@ copies: mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr .for file in ${XFILES} - ${INSTALL} -T package=${PACKAGE_${file}:Uruntime} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ + ${INSTALL} -T package=${PACKAGE_${file}:Uexamples} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ ${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file} .endfor diff --git a/share/examples/find_interface/Makefile b/share/examples/find_interface/Makefile index 425d5d3fa106..d1d828b46f6b 100644 --- a/share/examples/find_interface/Makefile +++ b/share/examples/find_interface/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/${PROG} PROG= find_interface MAN= diff --git a/share/examples/hwpmc/Makefile b/share/examples/hwpmc/Makefile index a455fc6b5551..f03a2b0955ed 100644 --- a/share/examples/hwpmc/Makefile +++ b/share/examples/hwpmc/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/hwpmc PROG= overhead LDFLAGS+= -lpmc MAN= diff --git a/share/examples/ipfilter/Makefile b/share/examples/ipfilter/Makefile index 117589728077..5e459149c4e7 100644 --- a/share/examples/ipfilter/Makefile +++ b/share/examples/ipfilter/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ +PACKAGE=examples FILES= README # dist sample files diff --git a/share/examples/kld/Makefile b/share/examples/kld/Makefile index 5e6fc7459bc5..4e76f4b6dd9a 100644 --- a/share/examples/kld/Makefile +++ b/share/examples/kld/Makefile @@ -67,6 +67,8 @@ # $FreeBSD$ # +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld SUBDIR= cdev dyn_sysctl firmware khelp random_adaptor syscall .include diff --git a/share/examples/kld/cdev/Makefile b/share/examples/kld/cdev/Makefile index 5c8f8f608f38..b03bd5ada942 100644 --- a/share/examples/kld/cdev/Makefile +++ b/share/examples/kld/cdev/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/cdev SUBDIR= module test load unload: _SUBDIR diff --git a/share/examples/kld/cdev/module/Makefile b/share/examples/kld/cdev/module/Makefile index a35c5001395d..ed0b221e5be2 100644 --- a/share/examples/kld/cdev/module/Makefile +++ b/share/examples/kld/cdev/module/Makefile @@ -1,6 +1,8 @@ # Makefile for kld char device driver. # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/${KMOD}/module KMOD= cdev SRCS= cdev.c cdevmod.c diff --git a/share/examples/kld/cdev/test/Makefile b/share/examples/kld/cdev/test/Makefile index b108a690532f..9d828fada048 100644 --- a/share/examples/kld/cdev/test/Makefile +++ b/share/examples/kld/cdev/test/Makefile @@ -66,6 +66,8 @@ # # $FreeBSD$ # +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/cdev/test PROG= testcdev MAN= WARNS?= 5 diff --git a/share/examples/kld/dyn_sysctl/Makefile b/share/examples/kld/dyn_sysctl/Makefile index 695320de6080..5a6c81f38a30 100644 --- a/share/examples/kld/dyn_sysctl/Makefile +++ b/share/examples/kld/dyn_sysctl/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/${KMOD} SRCS = dyn_sysctl.c KMOD = dyn_sysctl diff --git a/share/examples/kld/firmware/Makefile b/share/examples/kld/firmware/Makefile index b4b733faae98..8608f23301ab 100644 --- a/share/examples/kld/firmware/Makefile +++ b/share/examples/kld/firmware/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/firmware SUBDIR= fwimage fwconsumer .include diff --git a/share/examples/kld/firmware/fwconsumer/Makefile b/share/examples/kld/firmware/fwconsumer/Makefile index 1dea0c7eab69..78bca7a68de6 100644 --- a/share/examples/kld/firmware/fwconsumer/Makefile +++ b/share/examples/kld/firmware/fwconsumer/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/fwconsumer KMOD= fw_consumer SRCS= fw_consumer.c diff --git a/share/examples/kld/firmware/fwimage/Makefile b/share/examples/kld/firmware/fwimage/Makefile index 1ff8c462ff35..1afe4766f2ba 100644 --- a/share/examples/kld/firmware/fwimage/Makefile +++ b/share/examples/kld/firmware/fwimage/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/fwimage KMOD= beastie FIRMWS= firmware.img:beastie diff --git a/share/examples/kld/khelp/Makefile b/share/examples/kld/khelp/Makefile index e4cd80fd5b76..f939ab863324 100644 --- a/share/examples/kld/khelp/Makefile +++ b/share/examples/kld/khelp/Makefile @@ -5,6 +5,8 @@ # Change if the src tree you are compiling for is not in /usr/src #SYSDIR=/usr/src/sys +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/khelp KMOD= h_example SRCS= h_example.c diff --git a/share/examples/kld/random_adaptor/Makefile b/share/examples/kld/random_adaptor/Makefile index d19b4dc26473..8f14a281c1bc 100644 --- a/share/examples/kld/random_adaptor/Makefile +++ b/share/examples/kld/random_adaptor/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/${KMOD} KMOD= random_adaptor_example SRCS= ${KMOD}.c diff --git a/share/examples/kld/syscall/Makefile b/share/examples/kld/syscall/Makefile index 5c8f8f608f38..385de5954b5e 100644 --- a/share/examples/kld/syscall/Makefile +++ b/share/examples/kld/syscall/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/syscall SUBDIR= module test load unload: _SUBDIR diff --git a/share/examples/kld/syscall/module/Makefile b/share/examples/kld/syscall/module/Makefile index 17066d141fce..94996fe334cb 100644 --- a/share/examples/kld/syscall/module/Makefile +++ b/share/examples/kld/syscall/module/Makefile @@ -1,6 +1,8 @@ # Makefile for building the sample syscall module # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/${KMOD} KMOD= syscall SRCS= syscall.c diff --git a/share/examples/kld/syscall/test/Makefile b/share/examples/kld/syscall/test/Makefile index 6cc6907d1f4c..f8fecdebba8f 100644 --- a/share/examples/kld/syscall/test/Makefile +++ b/share/examples/kld/syscall/test/Makefile @@ -1,6 +1,8 @@ # Makefile for simple caller of syscall # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/kld/test PROG= call MAN= WARNS?= 5 diff --git a/share/examples/libusb20/Makefile b/share/examples/libusb20/Makefile index f0da6bf527a4..abb8ffd8133e 100644 --- a/share/examples/libusb20/Makefile +++ b/share/examples/libusb20/Makefile @@ -1,4 +1,7 @@ # $FreeBSD$ + +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/libusb20 TARGETS= bulk control CFLAGS+= -Wall diff --git a/share/examples/libvgl/Makefile b/share/examples/libvgl/Makefile index f78584ed3888..7c30aa0b6e6c 100644 --- a/share/examples/libvgl/Makefile +++ b/share/examples/libvgl/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/libvgl PROG= demo MAN= DPADD= ${LIBVGL} diff --git a/share/examples/perfmon/Makefile b/share/examples/perfmon/Makefile index 51ecf4dd74db..f5a7be35ce92 100644 --- a/share/examples/perfmon/Makefile +++ b/share/examples/perfmon/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/${PROG} PROG= perfmon MAN= diff --git a/share/examples/pf/Makefile b/share/examples/pf/Makefile index 618f417e8fe2..fe7c2baae27a 100644 --- a/share/examples/pf/Makefile +++ b/share/examples/pf/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ +PACKAGE=examples FILES= faq-example1 faq-example2 faq-example3 \ ackpri queue1 queue2 queue3 queue4 \ pf.conf \ diff --git a/share/examples/ppi/Makefile b/share/examples/ppi/Makefile index 09a98cdc8963..fa409ee91e2c 100644 --- a/share/examples/ppi/Makefile +++ b/share/examples/ppi/Makefile @@ -2,6 +2,8 @@ # # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/ppi PROG= ppilcd MAN= diff --git a/share/examples/scsi_target/Makefile b/share/examples/scsi_target/Makefile index bab70b2f5d03..22647655a925 100644 --- a/share/examples/scsi_target/Makefile +++ b/share/examples/scsi_target/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/${PROG} PROG= scsi_target SRCS= scsi_target.h scsi_target.c scsi_cmds.c DPADD= ${LIBCAM} ${LIBSBUF} diff --git a/share/examples/ses/Makefile b/share/examples/ses/Makefile index 53bd0cb8cf59..69b8696a1d4f 100644 --- a/share/examples/ses/Makefile +++ b/share/examples/ses/Makefile @@ -32,6 +32,8 @@ # mjacob@feral.com # +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/ses UNUSED = getobjmap getnobj getobjstat SUBDIR = getencstat setencstat setobjstat sesd diff --git a/share/examples/ses/getencstat/Makefile b/share/examples/ses/getencstat/Makefile index 79141b69657c..198fcc7bb36c 100644 --- a/share/examples/ses/getencstat/Makefile +++ b/share/examples/ses/getencstat/Makefile @@ -34,6 +34,8 @@ .PATH: ${.CURDIR}/../srcs +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/ses/${PROG} PROG= getencstat SRCS= getencstat.c eltsub.c MAN= getencstat.8 diff --git a/share/examples/ses/sesd/Makefile b/share/examples/ses/sesd/Makefile index 99a3b9274536..27f41d351a07 100644 --- a/share/examples/ses/sesd/Makefile +++ b/share/examples/ses/sesd/Makefile @@ -34,6 +34,8 @@ .PATH: ${.CURDIR}/../srcs +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/ses/${PROG} PROG= sesd SRCS= sesd.c eltsub.c MAN= sesd.8 diff --git a/share/examples/ses/setencstat/Makefile b/share/examples/ses/setencstat/Makefile index bdf4e4df8c0c..ca74f5dfca3b 100644 --- a/share/examples/ses/setencstat/Makefile +++ b/share/examples/ses/setencstat/Makefile @@ -34,6 +34,8 @@ .PATH: ${.CURDIR}/../srcs +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/ses/${PROG} PROG= setencstat SRCS= setencstat.c eltsub.c MAN= setencstat.8 diff --git a/share/examples/ses/setobjstat/Makefile b/share/examples/ses/setobjstat/Makefile index 4a223b455c29..6cd0221f0d57 100644 --- a/share/examples/ses/setobjstat/Makefile +++ b/share/examples/ses/setobjstat/Makefile @@ -34,6 +34,8 @@ .PATH: ${.CURDIR}/../srcs +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/ses/${PROG} PROG= setobjstat SRCS= setobjstat.c eltsub.c MAN= setobjstat.8 diff --git a/share/examples/smbfs/Makefile b/share/examples/smbfs/Makefile index 1bb13590a715..961172ad4a76 100644 --- a/share/examples/smbfs/Makefile +++ b/share/examples/smbfs/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ +PACKAGE=examples FILESDIR= ${SHAREDIR}/examples/smbfs FILES= dot.nsmbrc diff --git a/share/examples/smbfs/print/Makefile b/share/examples/smbfs/print/Makefile index 129cffa09372..e664fbc0a82d 100644 --- a/share/examples/smbfs/print/Makefile +++ b/share/examples/smbfs/print/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ +PACKAGE=examples FILESDIR= ${SHAREDIR}/examples/smbfs/print FILES= lj6l ljspool printcap.sample tolj diff --git a/share/examples/sunrpc/Makefile b/share/examples/sunrpc/Makefile index ff50a3b0af5e..d5044c921486 100644 --- a/share/examples/sunrpc/Makefile +++ b/share/examples/sunrpc/Makefile @@ -4,6 +4,11 @@ # # Build all demo services # +# $FreeBSD$ +# + +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/sunrpc MAKE = make LIB= diff --git a/share/examples/sunrpc/dir/Makefile b/share/examples/sunrpc/dir/Makefile index 592c9d6861e9..9894cc6761a7 100644 --- a/share/examples/sunrpc/dir/Makefile +++ b/share/examples/sunrpc/dir/Makefile @@ -1,6 +1,10 @@ # # @(#)Makefile 2.1 88/08/02 4.0 RPCSRC # +# $FreeBSD$ +# +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/sunrpc/dir BIN = dir_svc rls GEN = dir_clnt.c dir_svc.c dir_xdr.c dir.h LIB = -lrpclib diff --git a/share/examples/sunrpc/msg/Makefile b/share/examples/sunrpc/msg/Makefile index 2f3f5ddf1655..e630e5e67615 100644 --- a/share/examples/sunrpc/msg/Makefile +++ b/share/examples/sunrpc/msg/Makefile @@ -1,6 +1,10 @@ # # @(#)Makefile 2.1 88/08/11 4.0 RPCSRC # +# $FreeBSD$ +# +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/sunrpc/msg BIN = printmsg msg_svc rprintmsg GEN = msg_clnt.c msg_svc.c msg.h LIB = -lrpclib diff --git a/share/examples/sunrpc/sort/Makefile b/share/examples/sunrpc/sort/Makefile index 07627fafbe39..017902f150d4 100644 --- a/share/examples/sunrpc/sort/Makefile +++ b/share/examples/sunrpc/sort/Makefile @@ -1,7 +1,10 @@ # # @(#)Makefile 2.1 88/08/11 4.0 RPCSRC # - +# $FreeBSD$ +# +PACKAGE=examples +FILESDIR=${SHAREDIR}/examples/sunrpc/sort BIN = rsort sort_svc GEN = sort_clnt.c sort_svc.c sort_xdr.c sort.h LIB = -lrpclib diff --git a/share/sendmail/Makefile b/share/sendmail/Makefile index 1dac25938d85..e4dcb68b56d2 100644 --- a/share/sendmail/Makefile +++ b/share/sendmail/Makefile @@ -2,11 +2,15 @@ # # Doing a make install builds /usr/share/sendmail/ +PACKAGE= sendmail +FILESGROUPS+= SM SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail CFDIR= cf CFPACKAGE= sendmail CFDIRS!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print) CFFILES!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type f -print) +SMFILES= ${CFFILES} +SMFILESDIR= ${DDIR} DDIR= ${DESTDIR}${SHAREDIR}/sendmail @@ -22,10 +26,10 @@ META_TARGETS+= copies symlinks copies: if [ -L ${DDIR}/${CFDIR} ]; then rm -f ${DDIR}/${CFDIR}; fi .for dir in ${CFDIRS} - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 -d ${DDIR}/${dir} + ${INSTALL} -T package=${PACKAGE:Usendmail} ${TAGS_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 -d ${DDIR}/${dir} .endfor .for file in ${CFFILES} - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 ${SENDMAIL_DIR}/${file} ${DDIR}/${file} + ${INSTALL} -T package=${PACKAGE:Usendmail} ${TAGS_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ${SENDMAIL_DIR}/${file} ${DDIR}/${file} .endfor symlinks: