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
This commit is contained in:
gjb 2016-05-10 00:51:50 +00:00
parent b3ef210088
commit 214f3b8bf1
36 changed files with 90 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/${PROG}
PROG= FreeBSD_version
MAN=

View File

@ -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

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/${PROG}
PROG= find_interface
MAN=

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/hwpmc
PROG= overhead
LDFLAGS+= -lpmc
MAN=

View File

@ -1,5 +1,6 @@
# $FreeBSD$
PACKAGE=examples
FILES= README
# dist sample files

View File

@ -67,6 +67,8 @@
# $FreeBSD$
#
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld
SUBDIR= cdev dyn_sysctl firmware khelp random_adaptor syscall
.include <bsd.subdir.mk>

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/cdev
SUBDIR= module test
load unload: _SUBDIR

View File

@ -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

View File

@ -66,6 +66,8 @@
#
# $FreeBSD$
#
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/cdev/test
PROG= testcdev
MAN=
WARNS?= 5

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/${KMOD}
SRCS = dyn_sysctl.c
KMOD = dyn_sysctl

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/firmware
SUBDIR= fwimage fwconsumer
.include <bsd.subdir.mk>

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/fwconsumer
KMOD= fw_consumer
SRCS= fw_consumer.c

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/fwimage
KMOD= beastie
FIRMWS= firmware.img:beastie

View File

@ -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

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/${KMOD}
KMOD= random_adaptor_example
SRCS= ${KMOD}.c

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/syscall
SUBDIR= module test
load unload: _SUBDIR

View File

@ -1,6 +1,8 @@
# Makefile for building the sample syscall module
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/${KMOD}
KMOD= syscall
SRCS= syscall.c

View File

@ -1,6 +1,8 @@
# Makefile for simple caller of syscall
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/kld/test
PROG= call
MAN=
WARNS?= 5

View File

@ -1,4 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/libusb20
TARGETS= bulk control
CFLAGS+= -Wall

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/libvgl
PROG= demo
MAN=
DPADD= ${LIBVGL}

View File

@ -1,5 +1,7 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/${PROG}
PROG= perfmon
MAN=

View File

@ -1,5 +1,6 @@
# $FreeBSD$
PACKAGE=examples
FILES= faq-example1 faq-example2 faq-example3 \
ackpri queue1 queue2 queue3 queue4 \
pf.conf \

View File

@ -2,6 +2,8 @@
#
# $FreeBSD$
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/ppi
PROG= ppilcd
MAN=

View File

@ -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}

View File

@ -32,6 +32,8 @@
# mjacob@feral.com
#
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/ses
UNUSED = getobjmap getnobj getobjstat
SUBDIR = getencstat setencstat setobjstat sesd

View File

@ -34,6 +34,8 @@
.PATH: ${.CURDIR}/../srcs
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/ses/${PROG}
PROG= getencstat
SRCS= getencstat.c eltsub.c
MAN= getencstat.8

View File

@ -34,6 +34,8 @@
.PATH: ${.CURDIR}/../srcs
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/ses/${PROG}
PROG= sesd
SRCS= sesd.c eltsub.c
MAN= sesd.8

View File

@ -34,6 +34,8 @@
.PATH: ${.CURDIR}/../srcs
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/ses/${PROG}
PROG= setencstat
SRCS= setencstat.c eltsub.c
MAN= setencstat.8

View File

@ -34,6 +34,8 @@
.PATH: ${.CURDIR}/../srcs
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/ses/${PROG}
PROG= setobjstat
SRCS= setobjstat.c eltsub.c
MAN= setobjstat.8

View File

@ -1,5 +1,6 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR= ${SHAREDIR}/examples/smbfs
FILES= dot.nsmbrc

View File

@ -1,5 +1,6 @@
# $FreeBSD$
PACKAGE=examples
FILESDIR= ${SHAREDIR}/examples/smbfs/print
FILES= lj6l ljspool printcap.sample tolj

View File

@ -4,6 +4,11 @@
#
# Build all demo services
#
# $FreeBSD$
#
PACKAGE=examples
FILESDIR=${SHAREDIR}/examples/sunrpc
MAKE = make
LIB=

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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: