tweak readme: say that we're installing something

put that into mtree (to be done in src as well)
install in LOCALBASE, independently from PREFIX (newer pkg_adds are happy
with @cwd outside of PREFIX)
This commit is contained in:
espie 2010-10-27 14:34:33 +00:00
parent ec8cdee460
commit d9d6c3c0f1
2 changed files with 10 additions and 6 deletions

View File

@ -138,6 +138,8 @@
dict
..
doc
pkg-readmes
..
..
examples
..

View File

@ -1,6 +1,6 @@
#-*- mode: Makefile; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: bsd.port.mk,v 1.1046 2010/10/27 14:29:01 espie Exp $
# $OpenBSD: bsd.port.mk,v 1.1047 2010/10/27 14:34:33 espie Exp $
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
#
@ -517,7 +517,7 @@ BASE_PKGPATH := ${PKGPATH}
_FLAVOR_EXT2 :=
BUILD_PKGPATH := ${PKGPATH}
_PKG_ARGS =
_README_DIR = ${PREFIX}/share/doc/pkg-readmes/
_README_DIR = ${LOCALBASE}/share/doc/pkg-readmes
# (applies only to PLIST for now)
.if !empty(FLAVORS)
@ -2477,14 +2477,16 @@ ${_FAKE_COOKIE}: ${_BUILD_COOKIE}
.endfor
.if ${MULTI_PACKAGES} == "-"
@if test -e ${PKGDIR}/README; then \
${INSTALL_DATA_DIR} ${WRKINST}${_README_DIR}; \
${SUDO} ${SUBST_CMD} -c ${PKGDIR}/README ${WRKINST}${_README_DIR}/${FULLPKGNAME}; \
r=${WRKINST}${_README_DIR}/${FULLPKGNAME}; \
echo "Installing ${PKGDIR}/README as $$r"; \
${SUDO} ${SUBST_CMD} -c ${PKGDIR}/README $$r; \
fi
.else
. for _s in ${MULTI_PACKAGES}
@if test -e ${PKGDIR}/README-${_s}; then \
${INSTALL_DATA_DIR} ${WRKINST}${_README_DIR}; \
${SUDO} ${SUBST_CMD} -c ${PKGDIR}/README-${_s} ${WRKINST}${_README_DIR}/${FULLPKGNAME${_s}}; \
r=${WRKINST}${_README_DIR}/${FULLPKGNAME${_s}}; \
echo "Installing ${PKGDIR}/README-${_s} as $$r"; \
${SUDO} ${SUBST_CMD} -c ${PKGDIR}/README-${_s} $$r; \
fi
. endfor
.endif