summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2005-05-22 15:16:46 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2005-05-22 15:16:46 +0000
commit2d0c4afee3188207f247a2afe8c8b1754f385847 (patch)
treed772543c04d7e1a944e7d9cc4271066027f2793d
parento Update distfile's checksum; thus, removing BROKEN status (diff)
- Update to 5.0 [1]
- Install configuration files in ${PREFIX}/etc/amap, and preserve user modifications across updates - Do not define PORTDOCS if NOPORTDOCS is defined - Respect ${LOCALBASE}, ${PREFIX}, ${CC} and ${CFLAGS} - Add USE_OPENSSL=yes PR: ports/81354 [1] Submitted by: maintainer [1]
Notes
Notes: svn path=/head/; revision=135872
-rw-r--r--security/amap/Makefile40
-rw-r--r--security/amap/distinfo4
-rw-r--r--security/amap/files/patch-amap.h11
-rw-r--r--security/amap/files/patch-configure38
-rw-r--r--security/amap/files/patch-pcre-3.9_chartables.c11
-rw-r--r--security/amap/files/pkg-deinstall.in9
-rw-r--r--security/amap/files/pkg-install.in7
-rw-r--r--security/amap/pkg-descr2
-rw-r--r--security/amap/pkg-plist15
9 files changed, 76 insertions, 61 deletions
diff --git a/security/amap/Makefile b/security/amap/Makefile
index f3cb18fdb5ca..8cfb72fa83ae 100644
--- a/security/amap/Makefile
+++ b/security/amap/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= amap
-PORTVERSION= 4.8
+PORTVERSION= 5.0
CATEGORIES= security
MASTER_SITES= http://www.thc.org/releases/
@@ -14,16 +14,45 @@ MAINTAINER= onatan@gmail.com
COMMENT= Application mapper
HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --prefix=${PREFIX}
+
+USE_REINPLACE= yes
+USE_OPENSSL= yes
MAN1= amap.1
-PORTDOCS= README TODO CHANGES
+.if !defined(NOPORTDOCS)
+PORTDOCS= README TODO CHANGES AMAP-LIB-INTERFACE
+.endif
+PLIST_SUB= AMAPLIBDIR=lib/${PORTNAME} AMAPINCDIR=include/${PORTNAME}
+
+CONF_DIR= ${PREFIX}/etc/${PORTNAME}
+CONF_FILES= appdefs.resp appdefs.rpc appdefs.trig
+
+SUB_FILES= pkg-install pkg-deinstall
+SUB_LIST= CONF_FILES="${CONF_FILES}" CONF_DIR="${CONF_DIR}"
+
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|/usr/local|${LOCALBASE}|g; \
+ s|\(-DAMAP_PREFIX\)=\(\$$PREFIX\)|\1=\\\\\\"\2\\\\\\"|' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|-O2|${CFLAGS}|; s|^CC=.*||' \
+ ${WRKSRC}/Makefile.am
+ @${REINPLACE_CMD} -e 's|etc/|etc/amap/|g' ${WRKSRC}/amap-lib.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/amap ${PREFIX}/bin
+ ${LN} -s ${PREFIX}/bin/amap ${PREFIX}/bin/amap6
${INSTALL_PROGRAM} ${WRKSRC}/amapcrap ${PREFIX}/bin
- ${MKDIR} ${DATADIR}
-. for i in appdefs.resp appdefs.rpc appdefs.trig
- ${INSTALL_DATA} ${WRKSRC}/${i} ${DATADIR}
+ ${MKDIR} ${PREFIX}/lib/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/amap-lib.o ${PREFIX}/lib/${PORTNAME}
+ ${MKDIR} ${PREFIX}/include/${PORTNAME}
+. for i in amap.h amap-inc.h amap-lib.h
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/include/${PORTNAME}
+. endfor
+ ${MKDIR} ${CONF_DIR}
+. for i in ${CONF_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${CONF_DIR}/${i}.default
. endfor
${INSTALL_MAN} ${WRKSRC}/amap.1 ${MANPREFIX}/man/man1
. if !defined(NOPORTDOCS)
@@ -32,5 +61,6 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/$i ${DOCSDIR}
. endfor
. endif
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>
diff --git a/security/amap/distinfo b/security/amap/distinfo
index ab1b3b3b6fbf..ac02327959c5 100644
--- a/security/amap/distinfo
+++ b/security/amap/distinfo
@@ -1,2 +1,2 @@
-MD5 (amap-4.8.tar.gz) = db6f6aa06afc6aeea7c7e0c594c73b69
-SIZE (amap-4.8.tar.gz) = 258019
+MD5 (amap-5.0.tar.gz) = 4f43cbaeac859523ee2d1af9a3bd39a9
+SIZE (amap-5.0.tar.gz) = 261784
diff --git a/security/amap/files/patch-amap.h b/security/amap/files/patch-amap.h
deleted file mode 100644
index 8b65eff2c244..000000000000
--- a/security/amap/files/patch-amap.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- amap.h.orig Tue Feb 1 20:07:14 2005
-+++ amap.h Sun Feb 13 14:28:05 2005
-@@ -33,7 +33,7 @@
- #endif
- #endif
-
--#define AMAP_APPDEF_PATH AMAP_PREFIX"/etc"
-+#define AMAP_APPDEF_PATH AMAP_PREFIX"/share/amap"
- #define AMAP_BUFSIZE 1024 // standard buffer size
- #define AMAP_BUFSIZE_BIG 65536 // big standard buffer size
- #define AMAP_REGEX_OPTIONS ( PCRE_MULTILINE | PCRE_CASELESS | PCRE_DOTALL )
diff --git a/security/amap/files/patch-configure b/security/amap/files/patch-configure
deleted file mode 100644
index bbc0fc2cae4a..000000000000
--- a/security/amap/files/patch-configure
+++ /dev/null
@@ -1,38 +0,0 @@
---- configure.orig Fri Jan 7 14:37:18 2005
-+++ configure Sun Feb 13 14:34:25 2005
-@@ -33,7 +33,7 @@
- echo
-
- echo "Checking for openssl ..."
--for i in $LIBDIRS /lib /usr/lib /usr/local/lib /opt/local/lib \
-+for i in ${PREFIX}/lib $LIBDIRS /lib /usr/lib /usr/local/lib /opt/local/lib \
- /*ssl /usr/*ssl /opt/*ssl /usr/local/*ssl /opt/local/*ssl \
- /*ssl/lib /usr/*ssl/lib /opt/*ssl/lib /usr/local/*ssl/lib /opt/local/*ssl/lib .
- do
-@@ -61,7 +61,7 @@
- fi
- done
-
--for i in /usr/local/include /*ssl/include /usr/include \
-+for i in ${PREFIX}/include /usr/local/include /*ssl/include /usr/include \
- /opt/*ssl/include /usr/*ssl/include /usr/local/*ssl/include .
- do
- if [ "X" = "X$SSL_IPATH" ]; then
-@@ -127,7 +127,7 @@
- XLIBPATHS=""
- XIPATHS=""
-
--SYS=`uname -o`
-+SYS=`uname -o 2>/dev/null`
- if [ "$SYS" = "Cygwin" ]; then
- echo "Cygwin detected, enabling compability options ..."
- XDEFINES="-DCYGWIN"
-@@ -159,7 +159,7 @@
- XLIBS="$XLIBS -lresolv"
- fi
-
--for i in /usr/man /usr/share/man /usr/local/man /usr/local/share/man ; do
-+for i in ${PREFIX}/man /usr/man /usr/share/man /usr/local/man /usr/local/share/man ; do
- if [ -d $i ]; then
- MANDIR=$i
- fi
diff --git a/security/amap/files/patch-pcre-3.9_chartables.c b/security/amap/files/patch-pcre-3.9_chartables.c
new file mode 100644
index 000000000000..288d07254bd2
--- /dev/null
+++ b/security/amap/files/patch-pcre-3.9_chartables.c
@@ -0,0 +1,11 @@
+--- pcre-3.9/chartables.c.orig Sun May 22 12:18:27 2005
++++ pcre-3.9/chartables.c Sun May 22 12:18:34 2005
+@@ -10,7 +10,7 @@
+ character tables which are used when no tables are passed to the compile
+ function. */
+
+-static unsigned char pcre_default_tables[] = {
++unsigned char pcre_default_tables[] = {
+
+ /* This table is a lower casing table. */
+
diff --git a/security/amap/files/pkg-deinstall.in b/security/amap/files/pkg-deinstall.in
new file mode 100644
index 000000000000..19c51b8a3ad8
--- /dev/null
+++ b/security/amap/files/pkg-deinstall.in
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+[ "$2" != "DEINSTALL" ] && exit 0
+
+for f in %%CONF_FILES%%; do
+ if cmp -s "%%CONF_DIR%%/$f" "%%CONF_DIR%%/$f.default"; then
+ rm -f "%%CONF_DIR%%/$f"
+ fi
+done
diff --git a/security/amap/files/pkg-install.in b/security/amap/files/pkg-install.in
new file mode 100644
index 000000000000..585a18d73eba
--- /dev/null
+++ b/security/amap/files/pkg-install.in
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ "$2" != "POST-INSTALL" ] && exit 0
+
+for f in %%CONF_FILES%%; do
+ [ -f "%%CONF_DIR%%/$f" ] || cp -p "%%CONF_DIR%%/$f.default" "%%CONF_DIR%%/$f"
+done
diff --git a/security/amap/pkg-descr b/security/amap/pkg-descr
index ed00c3341756..b64f835f6156 100644
--- a/security/amap/pkg-descr
+++ b/security/amap/pkg-descr
@@ -2,4 +2,4 @@ Amap is a next-generation scanning tool, it identifies applications
and services even if they are not listening to the default port
by creating a bogus-communication.
-WWW: http://www.thc.org/releases.php
+WWW: http://thc.org/thc-amap/
diff --git a/security/amap/pkg-plist b/security/amap/pkg-plist
index 496e03fba69a..4aac38bdf575 100644
--- a/security/amap/pkg-plist
+++ b/security/amap/pkg-plist
@@ -1,7 +1,14 @@
@comment $FreeBSD$
bin/amap
+bin/amap6
bin/amapcrap
-%%DATADIR%%/appdefs.resp
-%%DATADIR%%/appdefs.rpc
-%%DATADIR%%/appdefs.trig
-@dirrm %%DATADIR%%
+etc/amap/appdefs.resp.default
+etc/amap/appdefs.rpc.default
+etc/amap/appdefs.trig.default
+%%AMAPLIBDIR%%/amap-lib.o
+%%AMAPINCDIR%%/amap.h
+%%AMAPINCDIR%%/amap-inc.h
+%%AMAPINCDIR%%/amap-lib.h
+@dirrm %%AMAPLIBDIR%%
+@dirrm %%AMAPINCDIR%%
+@unexec rmdir %D/etc/amap 2>/dev/null || true