summaryrefslogtreecommitdiffstats
path: root/share/examples
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2016-05-10 00:51:50 +0000
committergjb <gjb@FreeBSD.org>2016-05-10 00:51:50 +0000
commit214f3b8bf1669c26162fb1f48f3321812c59a24a (patch)
treec5f1a54de70f91bb8560424f32338dfc1151d1fa /share/examples
parentb3ef210088efd911da25b4f4848ebda83869d069 (diff)
downloadFreeBSD-src-214f3b8bf1669c26162fb1f48f3321812c59a24a.zip
FreeBSD-src-214f3b8bf1669c26162fb1f48f3321812c59a24a.tar.gz
Update share/examples/* to properly install /usr/share/examples.
As result of this, a new examples package is now created. Note, this is only effective with 'SHARED=copies' (the default), as the 'SHARED=symlinks' mechanism will create a symlink to the source tree version of the file(s). Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'share/examples')
-rw-r--r--share/examples/FreeBSD_version/Makefile2
-rw-r--r--share/examples/Makefile11
-rw-r--r--share/examples/find_interface/Makefile2
-rw-r--r--share/examples/hwpmc/Makefile2
-rw-r--r--share/examples/ipfilter/Makefile1
-rw-r--r--share/examples/kld/Makefile2
-rw-r--r--share/examples/kld/cdev/Makefile2
-rw-r--r--share/examples/kld/cdev/module/Makefile2
-rw-r--r--share/examples/kld/cdev/test/Makefile2
-rw-r--r--share/examples/kld/dyn_sysctl/Makefile2
-rw-r--r--share/examples/kld/firmware/Makefile2
-rw-r--r--share/examples/kld/firmware/fwconsumer/Makefile2
-rw-r--r--share/examples/kld/firmware/fwimage/Makefile2
-rw-r--r--share/examples/kld/khelp/Makefile2
-rw-r--r--share/examples/kld/random_adaptor/Makefile2
-rw-r--r--share/examples/kld/syscall/Makefile2
-rw-r--r--share/examples/kld/syscall/module/Makefile2
-rw-r--r--share/examples/kld/syscall/test/Makefile2
-rw-r--r--share/examples/libusb20/Makefile3
-rw-r--r--share/examples/libvgl/Makefile2
-rw-r--r--share/examples/perfmon/Makefile2
-rw-r--r--share/examples/pf/Makefile1
-rw-r--r--share/examples/ppi/Makefile2
-rw-r--r--share/examples/scsi_target/Makefile2
-rw-r--r--share/examples/ses/Makefile2
-rw-r--r--share/examples/ses/getencstat/Makefile2
-rw-r--r--share/examples/ses/sesd/Makefile2
-rw-r--r--share/examples/ses/setencstat/Makefile2
-rw-r--r--share/examples/ses/setobjstat/Makefile2
-rw-r--r--share/examples/smbfs/Makefile1
-rw-r--r--share/examples/smbfs/print/Makefile1
-rw-r--r--share/examples/sunrpc/Makefile5
-rw-r--r--share/examples/sunrpc/dir/Makefile4
-rw-r--r--share/examples/sunrpc/msg/Makefile4
-rw-r--r--share/examples/sunrpc/sort/Makefile5
35 files changed, 84 insertions, 2 deletions
diff --git a/share/examples/FreeBSD_version/Makefile b/share/examples/FreeBSD_version/Makefile
index 834d925..437ad24 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 f926107..03b2952 100644
--- a/share/examples/Makefile
+++ b/share/examples/Makefile
@@ -4,6 +4,15 @@
.include <src.opts.mk>
+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 425d5d3..d1d828b 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 a455fc6..f03a2b0 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 1175897..5e45914 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 5e6fc74..4e76f4b 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 <bsd.subdir.mk>
diff --git a/share/examples/kld/cdev/Makefile b/share/examples/kld/cdev/Makefile
index 5c8f8f6..b03bd5a 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 a35c500..ed0b221 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 b108a69..9d828fa 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 695320d..5a6c81f 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 b4b733f..8608f23 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 <bsd.subdir.mk>
diff --git a/share/examples/kld/firmware/fwconsumer/Makefile b/share/examples/kld/firmware/fwconsumer/Makefile
index 1dea0c7..78bca7a 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 1ff8c46..1afe476 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 e4cd80f..f939ab8 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 d19b4dc..8f14a28 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 5c8f8f6..385de59 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 17066d1..94996fe 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 6cc6907..f8fecde 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 f0da6bf..abb8ffd 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 f78584e..7c30aa0 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 51ecf4d..f5a7be3 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 618f417..fe7c2ba 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 09a98cd..fa409ee 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 bab70b2..2264765 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 53bd0cb..69b8696 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 79141b6..198fcc7 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 99a3b92..27f41d3 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 bdf4e4d..ca74f5d 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 4a223b4..6cd0221 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 1bb1359..961172a 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 129cffa..e664fbc 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 ff50a3b..d5044c9 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 592c9d6..9894cc6 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 2f3f5dd..e630e5e 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 07627fa..017902f 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
OpenPOWER on IntegriCloud