From 1720395be1d9dcce5c50a07faf0f9c11b7c7d77b Mon Sep 17 00:00:00 2001 From: "Vanilla I. Shu" Date: Wed, 15 Jan 2014 08:25:17 +0000 Subject: [PATCH] 1: Fix building on 10 and -current. 2: support stagedir PR: ports/185694 Submitted by: KATO Tsuguru --- net-mgmt/bpft/Makefile | 20 +++++++++----------- net-mgmt/bpft/pkg-plist | 6 +++++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/net-mgmt/bpft/Makefile b/net-mgmt/bpft/Makefile index 4bdf5f4cea9f..8305815b4d20 100644 --- a/net-mgmt/bpft/Makefile +++ b/net-mgmt/bpft/Makefile @@ -21,11 +21,6 @@ WRKSRC= ${WRKDIR}/${PORTNAME} MAKE_JOBS_UNSAFE= yes -MANCOMPRESSED= yes -MAN1= traflog.1 trafstat.1 -MAN8= trafstatd.8 trafd.8 - -NO_STAGE= yes .include post-patch: @@ -33,20 +28,23 @@ post-patch: 's|/usr/local|${PREFIX}|g' ${WRKSRC}/include/pathnames.h @${REINPLACE_CMD} -e \ '/^PATH_TOSAVE/s|=.*|= ${PREFIX}/var/bpft| ; \ - /^INSTALL_DIRECTORY/s|=.*|= ${MKDIR}|' ${WRKSRC}/Makefile + /^INSTALL_DIRECTORY/s|=.*|= ${MKDIR}| ; \ + s|please!|&"| ; \ + s| $${PATH_| $${DESTDIR}$${PATH_|g ; \ + s| $${PREFIX_| $${DESTDIR}$${PREFIX_|g' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e \ + 's|bpf_dump.[co]||' ${WRKSRC}/lib/Makefile @${REINPLACE_CMD} -e \ 's||"../linux-include/net/slip.h"|' \ ${WRKSRC}/lib/interfaces.c post-install: .for i in bin/traflog bin/trafstat sbin/trafd sbin/trafstatd - @${STRIP_CMD} ${PREFIX}/${i} + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/${i} .endfor -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in README WhatsNew - (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DOCSDIR}) + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR}) .endfor -.endif .include diff --git a/net-mgmt/bpft/pkg-plist b/net-mgmt/bpft/pkg-plist index d655ae60e672..c4b2d8f71f5c 100644 --- a/net-mgmt/bpft/pkg-plist +++ b/net-mgmt/bpft/pkg-plist @@ -6,10 +6,14 @@ bin/trafstat bin/trafstop etc/rc.d/trafd.sh etc/traflog.format +man/man1/traflog.1.gz +man/man1/trafstat.1.gz +man/man8/trafd.8.gz +man/man8/trafstatd.8.gz sbin/trafd sbin/trafstatd %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/WhatsNew -%%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrmtry var/bpft @dirrmtry var +%%PORTDOCS%%@dirrm %%DOCSDIR%%