mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
128 lines
4.5 KiB
Diff
128 lines
4.5 KiB
Diff
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 -march=i386 -mtune=i686
|
|
OPT_DEBUG=-ggdb -Wall -lefence
|
|
BINDIR=/bin
|
|
-DATADIR=/etc
|
|
+DATADIR=/lib/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, "lib/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) + 10 + strlen(AMAP_DEFAULT_FILENAME) + 2);
|
|
strcpy(opt->filename, AMAP_PREFIX);
|
|
- strcat(opt->filename, "/etc/");
|
|
+ strcat(opt->filename, "/lib/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/lib/amap and $PREFIX/man"
|
|
echo " (change this by running ./configure --prefix=path)"
|
|
echo
|
|
|