summaryrefslogtreecommitdiffstats
path: root/network/amap
diff options
context:
space:
mode:
author Marco Bonetti <sid77@slackware.it>2010-05-13 00:35:33 +0200
committer David Somero <xgizzmo@slackbuilds.org>2010-05-13 00:35:33 +0200
commit474e5fbe21c45726ec0677901e3b9b0153eead3f (patch)
treec81472bfe751b038601965c836ad2347f72cdc41 /network/amap
parentf7d0021d2ec7cf8808c0517c9a580c19be6e4fcd (diff)
downloadslackbuilds-474e5fbe21c45726ec0677901e3b9b0153eead3f.tar.gz
slackbuilds-474e5fbe21c45726ec0677901e3b9b0153eead3f.tar.xz
network/amap: Updated for version 5.2
Diffstat (limited to 'network/amap')
-rw-r--r--network/amap/amap.SlackBuild15
-rw-r--r--network/amap/amap.info4
-rw-r--r--network/amap/slackware.diff (renamed from network/amap/slackware.patch)0
-rw-r--r--network/amap/slackware64.diff128
4 files changed, 143 insertions, 4 deletions
diff --git a/network/amap/amap.SlackBuild b/network/amap/amap.SlackBuild
index 7c6d2cf64e..bbbb900752 100644
--- a/network/amap/amap.SlackBuild
+++ b/network/amap/amap.SlackBuild
@@ -26,7 +26,7 @@
PRGNAM=amap
VERSION=${VERSION:-5.2}
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -36,6 +36,14 @@ OUTPUT=${OUTPUT:-/tmp}
DOCS="LICENCE.AMAP LICENSE.GNU README"
+if [ "$ARCH" = "i486" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+fi
+
set -e
rm -rf $PKG
@@ -52,7 +60,7 @@ find . \
-exec chmod 644 {} \;
# Add DESTDIR support and fix up a few other things
-patch -p1 < $CWD/slackware.patch
+patch -p1 --verbose < $CWD/slackware$LIBDIRSUFFIX.diff
./configure --prefix=/usr
@@ -79,4 +87,5 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
diff --git a/network/amap/amap.info b/network/amap/amap.info
index 2126eda05d..62d0733af5 100644
--- a/network/amap/amap.info
+++ b/network/amap/amap.info
@@ -3,6 +3,8 @@ VERSION="5.2"
HOMEPAGE="http://freeworld.thc.org/thc-amap/"
DOWNLOAD="http://freeworld.thc.org/releases/amap-5.2.tar.gz"
MD5SUM="e3b1f5ebd24aac03aacb38ec183eb426"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
MAINTAINER="Marco Bonetti"
EMAIL="sid77@slackware.it"
-APPROVED="rworkman"
+APPROVED="dsomero"
diff --git a/network/amap/slackware.patch b/network/amap/slackware.diff
index dc3fa3c449..dc3fa3c449 100644
--- a/network/amap/slackware.patch
+++ b/network/amap/slackware.diff
diff --git a/network/amap/slackware64.diff b/network/amap/slackware64.diff
new file mode 100644
index 0000000000..3636631a74
--- /dev/null
+++ b/network/amap/slackware64.diff
@@ -0,0 +1,128 @@
+diff -Naur amap-5.2.orig/Makefile.am amap-5.2/Makefile.am
+--- amap-5.2.orig/Makefile.am 2005-09-22 17:39:18.000000000 +0200
++++ amap-5.2/Makefile.am 2009-03-03 13:48:56.000000000 +0100
+@@ -1,13 +1,13 @@
+ CC=gcc
+-LIB=-lpcre -L./pcre-3.9/ -I./pcre-3.9/
+-OPT=-O2
++LIB=-lpcre
++OPT=-O2 -fPIC
+ OPT_DEBUG=-ggdb -Wall -lefence
+ BINDIR=/bin
+-DATADIR=/etc
++DATADIR=/lib64/amap
+ MANDIR=/man/man1
+ SCRIPTS=appdefs.trig appdefs.resp appdefs.rpc
+ MANPAGE=amap.1
+-all: pcre strip
++all: strip
+
+ pcre:
+ cd pcre-3.9 && make
+@@ -34,15 +34,15 @@
+ $(CC) $(OPT_DEBUG) -o amapcrap amapcrap.c $(XLIBS) $(XLIBPATHS) $(XIPATHS) $(XDEFINES)
+
+ install: all
+- @echo Installing to $(PREFIX), change this by running ./configure --prefix=path
+- -mkdir -vp $(PREFIX)$(BINDIR) 2> /dev/null
+- -mkdir -vp $(PREFIX)$(DATADIR) 2> /dev/null
+- -mkdir -vp $(PREFIX)$(MANDIR) 2> /dev/null
+- -test -e amap.exe || cp -f amap amap6 amapcrap $(PREFIX)$(BINDIR)
+- -test -e amap.exe && cp -f amap.exe amapcrap.exe $(PREFIX)$(BINDIR) || echo
+- -cp -f $(SCRIPTS) $(PREFIX)$(DATADIR)
+- -cp -f $(MANPAGE) $(PREFIX)$(MANDIR)
+- -test $(PREFIX)$(BINDIR)/amap6 || cd $(PREFIX)$(BINDIR) && ln -s amap amap6
++ @echo Installing to $(DESTDIR)$(PREFIX), change this by running ./configure --prefix=path
++ -mkdir -vp $(DESTDIR)$(PREFIX)$(BINDIR) 2> /dev/null
++ -mkdir -vp $(DESTDIR)$(PREFIX)$(DATADIR) 2> /dev/null
++ -mkdir -vp $(DESTDIR)$(PREFIX)$(MANDIR) 2> /dev/null
++ -test -e amap.exe || cp -f amap amap6 amapcrap $(DESTDIR)$(PREFIX)$(BINDIR)
++ -test -e amap.exe && cp -f amap.exe amapcrap.exe $(DESTDIR)$(PREFIX)$(BINDIR) || echo
++ -cp -f $(SCRIPTS) $(DESTDIR)$(PREFIX)$(DATADIR)
++ -cp -f $(MANPAGE) $(DESTDIR)$(PREFIX)$(MANDIR)
++ -test $(DESTDIR)$(PREFIX)$(BINDIR)/amap6 || cd $(DESTDIR)$(PREFIX)$(BINDIR) && ln -s amap amap6 || true
+
+ clean:
+ cd pcre-3.9 && make clean
+diff -Naur amap-5.2.orig/amap-inc.h amap-5.2/amap-inc.h
+--- amap-5.2.orig/amap-inc.h 2003-10-29 23:37:41.000000000 +0100
++++ amap-5.2/amap-inc.h 2009-03-03 13:49:14.000000000 +0100
+@@ -20,7 +20,7 @@
+ #include <errno.h>
+ #include <sys/resource.h>
+ #include <sys/wait.h>
+-#include "pcre-3.9/pcre.h"
++#include <pcre.h>
+ #ifdef OPENSSL
+ #include <openssl/ssl.h>
+ #include <openssl/err.h>
+diff -Naur amap-5.2.orig/amap-lib.c amap-5.2/amap-lib.c
+--- amap-5.2.orig/amap-lib.c 2005-09-07 23:22:24.000000000 +0200
++++ amap-5.2/amap-lib.c 2009-03-03 13:49:17.000000000 +0100
+@@ -306,7 +306,7 @@
+ strcpy(file_name, AMAP_PREFIX);
+ if (file_name[strlen(file_name) - 1] != '/')
+ strcat(file_name, "/");
+- strcat(file_name, "etc/");
++ strcat(file_name, "lib64/amap/");
+ strcat(file_name, AMAP_DEFAULT_FILENAME);
+ strcat(file_name, extension);
+ f = fopen(file_name, "r");
+@@ -2032,9 +2032,9 @@
+ if (opt->update) {
+ printf("Running Online Update for fingerprints, connecting to %s\n", AMAP_RESOURCE);
+ if (opt->filename == NULL) {
+- opt->filename = malloc(strlen(AMAP_PREFIX) + 5 + strlen(AMAP_DEFAULT_FILENAME) + 2);
++ opt->filename = malloc(strlen(AMAP_PREFIX) + 12 + strlen(AMAP_DEFAULT_FILENAME) + 2);
+ strcpy(opt->filename, AMAP_PREFIX);
+- strcat(opt->filename, "/etc/");
++ strcat(opt->filename, "/lib64/amap/");
+ strcat(opt->filename, AMAP_DEFAULT_FILENAME);
+ }
+ opt->file_log = malloc(strlen(opt->filename) + 6);
+diff -Naur amap-5.2.orig/amap.h amap-5.2/amap.h
+--- amap-5.2.orig/amap.h 2005-09-08 00:08:57.000000000 +0200
++++ amap-5.2/amap.h 2009-03-03 13:49:06.000000000 +0100
+@@ -22,7 +22,7 @@
+ #define AMAP_YEAR "2005"
+ #define AMAP_AUTHOR "van Hauser"
+ #define AMAP_EMAIL "amap-dev@thc.org"
+-#define AMAP_RESOURCE "www.thc.org/thc-amap"
++#define AMAP_RESOURCE "freeworld.thc.org/thc-amap"
+
+ #ifndef AMAP_PREFIX
+ #ifdef PREFIX
+diff -Naur amap-5.2.orig/configure amap-5.2/configure
+--- amap-5.2.orig/configure 2005-06-03 15:34:19.000000000 +0200
++++ amap-5.2/configure 2009-03-03 13:49:22.000000000 +0100
+@@ -152,17 +152,6 @@
+ XLIBS="$XLIBS -lresolv"
+ fi
+
+-for i in /usr/man /usr/share/man /usr/local/man /usr/local/share/man ; do
+- if [ -d $i ]; then
+- MANDIR=$i
+- fi
+-done
+-if [ "X" = "X$MANDIR" ]; then
+- MANDIR="/usr/local/man"
+-fi
+-echo "Manual page will be install to: $MANDIR"
+-echo
+-
+ if [ -d /usr/kerberos/include ]; then
+ XIPATHS="$XIPATHS -I/usr/kerberos/include"
+ fi
+@@ -172,7 +161,11 @@
+ else
+ PREFIX="/usr/local"
+ fi
+-echo "Amap will be installed into .../bin and .../etc of: $PREFIX"
++
++# fix mandir
++MANDIR=$PREFIX/man
++
++echo "Amap will be installed into $PREFIX/bin $PREFIX/lib64/amap and $PREFIX/man"
+ echo " (change this by running ./configure --prefix=path)"
+ echo
+