ports/184830: security/fl0p: Support CC/CFLAGS properly
KATO Tsuguru
tkato432 at yahoo.com
Mon Dec 16 18:10:08 UTC 2013
>Number: 184830
>Category: ports
>Synopsis: security/fl0p: Support CC/CFLAGS properly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 16 18:10:07 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: KATO Tsuguru
>Release: FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Support CC/CFLAGS properly
- Add LICENSE
- Support PLIST_FILES
Remove file:
files/patch-config.h
pkg-plist
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/security/fl0p/Makefile security/fl0p/Makefile
--- /usr/ports/security/fl0p/Makefile 2013-11-06 22:03:13.000000000 +0900
+++ security/fl0p/Makefile 2013-12-17 00:00:00.000000000 +0900
@@ -3,6 +3,7 @@
PORTNAME= fl0p
PORTVERSION= 0.0.2.b
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://lcamtuf.coredump.cx/soft/
DISTNAME= fl0p-devel
@@ -11,22 +12,33 @@
MAINTAINER= ports at FreeBSD.org
COMMENT= Passive L7 flow fingerprinting tool
-WRKSRC= ${WRKDIR}/fl0p/
+LICENSE= LGPL21
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+PORTDOCS= ChangeLog CREDITS README TODO
+PLIST_FILES= bin/fl0p %%DATADIR%%/fl0p.fp
+PLIST_DIRS= %%DATADIR%%
-NO_STAGE= yes
post-patch:
- ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/config.h
+ @${REINPLACE_CMD} -e \
+ 's|"/etc/fl0p"|"${DATADIR}"|' ${WRKSRC}/config.h
+ @${REINPLACE_CMD} -e \
+ 's|^GMAKE_OK|#GMAKE_OK|' ${WRKSRC}/Build
+ @${REINPLACE_CMD} -e \
+ '/^CC/s|\([[:blank:]]\)=|\1?=| ; \
+ /^CFLAGS/s|\([[:blank:]]\)=|\1+=| ; \
+ s|-g -ggdb|| ; \
+ s|-I.*|$$(CPPFLAGS)| ; \
+ /^all:/s|strip||' ${WRKSRC}/mk/Linux
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/fl0p ${PREFIX}/bin
- ${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/fl0p.fp ${DATADIR}/
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_MAN} ${WRKSRC}/doc/README ${DOCSDIR}/
- ${INSTALL_MAN} ${WRKSRC}/doc/ChangeLog ${DOCSDIR}/
- ${INSTALL_MAN} ${WRKSRC}/doc/TODO ${DOCSDIR}/
- ${INSTALL_MAN} ${WRKSRC}/doc/CREDITS ${DOCSDIR}/
-.endif
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} fl0p ${STAGEDIR}${PREFIX}/bin)
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+ (cd ${WRKSRC} && ${INSTALL_DATA} fl0p.fp ${STAGEDIR}${DATADIR})
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for i in ${PORTDOCS}
+ (cd ${WRKSRC}/doc && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR})
+.endfor
.include <bsd.port.mk>
diff -urN /usr/ports/security/fl0p/files/patch-config.h security/fl0p/files/patch-config.h
--- /usr/ports/security/fl0p/files/patch-config.h 2013-11-06 22:03:13.000000000 +0900
+++ security/fl0p/files/patch-config.h 1970-01-01 09:00:00.000000000 +0900
@@ -1,11 +0,0 @@
---- config.h.orig Mon Dec 4 22:49:35 2006
-+++ config.h Mon Dec 4 22:50:40 2006
-@@ -19,7 +19,7 @@
- #ifdef WIN32
- # define CONFIG_DIR "."
- #else
--# define CONFIG_DIR "/etc/fl0p"
-+# define CONFIG_DIR "%%PREFIX%%/share/fl0p"
- #endif /* WIN32 */
-
- #define FPRINT_DB "fl0p.fp"
diff -urN /usr/ports/security/fl0p/pkg-plist security/fl0p/pkg-plist
--- /usr/ports/security/fl0p/pkg-plist 2013-11-06 22:03:13.000000000 +0900
+++ security/fl0p/pkg-plist 1970-01-01 09:00:00.000000000 +0900
@@ -1,8 +0,0 @@
-bin/fl0p
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%%%DOCSDIR%%/TODO
-%%PORTDOCS%%%%DOCSDIR%%/CREDITS
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%DATADIR%%/fl0p.fp
- at dirrm %%DATADIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list