1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00

Support stage

Use pkg-plist
This commit is contained in:
Baptiste Daroussin 2014-01-25 00:05:37 +00:00
parent 54db749e75
commit 4bb7234ce9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=340957
2 changed files with 52 additions and 18 deletions

View File

@ -11,13 +11,15 @@ MASTER_SITES= GNU/gnu-arch \
MAINTAINER= ports@FreeBSD.org
COMMENT= The original arch source control management CLI written in C
OPTIONS_DEFINE= DOCS
BUILD_DEPENDS= gpatch:${PORTSDIR}/devel/patch \
gdiff:${PORTSDIR}/textproc/diffutils \
gtar:${PORTSDIR}/archivers/gtar
RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= gmake
HAS_CONFIGURE= yes
USE_GMAKE= yes
MAKE_JOBS_UNSAFE= yes
CONFIGURE_SCRIPT= ../configure
@ -30,10 +32,7 @@ CONFIGURE_ARGS= --prefix=${PREFIX} \
ORIGWRKSRC= ${WRKDIR}/${DISTNAME}/src
PATCH_WRKSRC= ${ORIGWRKSRC}/..
WRKSRC= ${ORIGWRKSRC}/=build
PLIST= ${WRKDIR}/plist
PLIST_FILES= bin/tla bin/tla-gpg-check
NO_STAGE= yes
pre-patch:
${MKDIR} ${WRKSRC}
@ -41,26 +40,16 @@ test:
cd ${WRKSRC} ; ${GMAKE} test
pre-install:
.if !defined(NOPORTDOCS)
${RM} -rf ${ORIGWRKSRC}/docs-tla/PLUGIN \
${ORIGWRKSRC}/docs-tla/{arch} ${ORIGWRKSRC}/docs-tla/.arch-ids
cd ${ORIGWRKSRC}/docs-tla && ${FIND} . -type f -name '*.html' \
-exec ${ECHO_CMD} "%%DOCSDIR%%/{}" \; > ${PLIST}
cd ${ORIGWRKSRC}/docs-tla && ${FIND} -d . -mindepth 1 -maxdepth 1 \
-type d -exec ${ECHO_CMD} "@dirrm %%DOCSDIR%%/{}" \; >> ${PLIST}
${ECHO} @dirrm %%DOCSDIR%% >> ${PLIST}
.endif
do-install:
${INSTALL_PROGRAM} ${ORIGWRKSRC}/=build/tla/tla/tla ${PREFIX}/bin
${INSTALL_PROGRAM} ${ORIGWRKSRC}/=build/tla/tla/tla ${STAGEDIR}${PREFIX}/bin
${SED} 's,^#!.*$$,#!${AWK} -f,' ${ORIGWRKSRC}/tla/=gpg-check.awk \
> ${WRKDIR}/tla-gpg-check
${INSTALL_SCRIPT} ${WRKDIR}/tla-gpg-check ${PREFIX}/bin
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_SCRIPT} ${WRKDIR}/tla-gpg-check ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${ORIGWRKSRC}/docs-tla && ${FIND} . -name '*.html' | \
${CPIO} -pdm -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
${CHMOD} -R a=rX ${DOCSDIR}
.endif
${CPIO} -pdm -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

45
devel/tla/pkg-plist Normal file
View File

@ -0,0 +1,45 @@
bin/tla
bin/tla-gpg-check
%%PORTDOCS%%%%DOCSDIR%%/COPYING.html
%%PORTDOCS%%%%DOCSDIR%%/archreg/coords.html
%%PORTDOCS%%%%DOCSDIR%%/archreg/mirrormgt.html
%%PORTDOCS%%%%DOCSDIR%%/archreg/register.html
%%PORTDOCS%%%%DOCSDIR%%/archreg/top-nav.html
%%PORTDOCS%%%%DOCSDIR%%/build/help.html
%%PORTDOCS%%%%DOCSDIR%%/build/install.html
%%PORTDOCS%%%%DOCSDIR%%/build/othertools.html
%%PORTDOCS%%%%DOCSDIR%%/build/sources.html
%%PORTDOCS%%%%DOCSDIR%%/build/top-nav.html
%%PORTDOCS%%%%DOCSDIR%%/build/why.html
%%PORTDOCS%%%%DOCSDIR%%/checkout/checkout-config.html
%%PORTDOCS%%%%DOCSDIR%%/checkout/checkout.html
%%PORTDOCS%%%%DOCSDIR%%/checkout/top-nav.html
%%PORTDOCS%%%%DOCSDIR%%/checkout/tree-state.html
%%PORTDOCS%%%%DOCSDIR%%/hacking/branch-publishing.html
%%PORTDOCS%%%%DOCSDIR%%/hacking/changes.html
%%PORTDOCS%%%%DOCSDIR%%/hacking/commit.html
%%PORTDOCS%%%%DOCSDIR%%/hacking/merge-from-upstream.html
%%PORTDOCS%%%%DOCSDIR%%/hacking/my-archive.html
%%PORTDOCS%%%%DOCSDIR%%/hacking/my-branch.html
%%PORTDOCS%%%%DOCSDIR%%/hacking/my-config.html
%%PORTDOCS%%%%DOCSDIR%%/hacking/top-nav.html
%%PORTDOCS%%%%DOCSDIR%%/index.html
%%PORTDOCS%%%%DOCSDIR%%/my/archloc.html
%%PORTDOCS%%%%DOCSDIR%%/my/id.html
%%PORTDOCS%%%%DOCSDIR%%/my/mirrorloc.html
%%PORTDOCS%%%%DOCSDIR%%/my/revlib.html
%%PORTDOCS%%%%DOCSDIR%%/my/top-nav.html
%%PORTDOCS%%%%DOCSDIR%%/top-nav.html
%%PORTDOCS%%%%DOCSDIR%%/treedelta/add.html
%%PORTDOCS%%%%DOCSDIR%%/treedelta/delete.html
%%PORTDOCS%%%%DOCSDIR%%/treedelta/inventory.html
%%PORTDOCS%%%%DOCSDIR%%/treedelta/naming-conventions.html
%%PORTDOCS%%%%DOCSDIR%%/treedelta/rename.html
%%PORTDOCS%%%%DOCSDIR%%/treedelta/top-nav.html
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/treedelta
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/my
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/hacking
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/checkout
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/build
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/archreg
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%