Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Oct 2002 09:30:21 -0800
From:      Adam Weinberger <adam@vectors.cx>
To:        ports@freebsd.org
Subject:   Some more PLIST substitutions
Message-ID:  <20021030173021.GU197@vectors.cx>

next in thread | raw e-mail | index | archive | help
The following may be useful, not to help in portability as much as
encouraging things to go in 'standard' locations. Additionally, it makes
pkg-plist creation easier... if you ${INSTALL_PROGRAM} to ${DOCSDIR}, it
makes sense to have the plist contain %%DOCSDIR%%/README.

This patch just adds PLIST substitutions for EXAMPLESDIR, DATADIR, and
DOCSDIR. The DOCSDIR target also acts like %%PORTDOCS%% and can replace
it. That is, if NOPORTDOCS is defined, it comes out as "@comment ".

Thoughts?

-Adam

Index: ports/Mk/bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.426
diff -u -r1.426 bsd.port.mk
--- ports/Mk/bsd.port.mk        2 Oct 2002 07:18:17 -0000       1.426
+++ ports/Mk/bsd.port.mk        30 Oct 2002 17:22:22 -0000
@@ -829,12 +829,16 @@
 BUILD_WRKSRC?= ${WRKSRC}
 INSTALL_WRKSRC?=${WRKSRC}
 
-PLIST_SUB+=    OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
+PLIST_SUB+=    OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \
+               EXAMPLESDIR=${EXAMPLESDIR:S/${PREFIX}\///} \
+               DATADIR=${DATADIR:S/${PREFIX}\///}
 
 .if defined(NOPORTDOCS)
 PLIST_SUB+=            PORTDOCS="@comment "
+PLIST_SUB+=            DOCSDIR="@comment "
 .else
 PLIST_SUB+=            PORTDOCS=""
+PLIST_SUB+=            DOCSDIR=${DOCSDIR:S/${PREFIX}\///}
 .endif
 
 CONFIGURE_SHELL?=      ${SH}


--
Adam Weinberger
adam@vectors.cx
adamw@FreeBSD.ORG


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021030173021.GU197>