Author: rebus
Update of /cvs/nonfree/rpms/amap/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv17868/devel
Modified Files:
.cvsignore sources
Added Files:
amap-destdir.patch amap-ldflags.patch amap-lnamap6.patch
amap-new-homepage.patch amap-optflags.patch amap-path.patch
amap-system-pcre.patch amap.spec
Log Message:
Initial import to devel branch
amap-destdir.patch:
Makefile.am | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- NEW FILE amap-destdir.patch ---
diff -urN amap-5.2/Makefile.am amap-5.2.new/Makefile.am
--- amap-5.2/Makefile.am 2005-09-22 17:39:18.000000000 +0200
+++ amap-5.2.new/Makefile.am 2008-09-18 18:14:01.000000000 +0200
@@ -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
clean:
cd pcre-3.9 && make clean
amap-ldflags.patch:
Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE amap-ldflags.patch ---
diff -urN amap-5.2/Makefile.am amap-5.2.new/Makefile.am
--- amap-5.2/Makefile.am 2005-09-22 17:39:18.000000000 +0200
+++ amap-5.2.new/Makefile.am 2008-09-18 18:42:52.000000000 +0200
@@ -17,11 +17,11 @@
amap: amap-lib.o amap.c
@echo
- $(CC) $(OPT) -o amap amap.c amap-lib.o $(LIB) $(XLIBS) $(XLIBPATHS) $(XIPATHS)
$(XDEFINES)
+ $(CC) $(OPT) $(LDFLAGS) -o amap amap.c amap-lib.o $(LIB) $(XLIBS) $(XLIBPATHS)
$(XIPATHS) $(XDEFINES)
test -e amap6 -o -e amap6.lnk || ln -s amap amap6
amapcrap: amapcrap.c
- $(CC) $(OPT) -o amapcrap amapcrap.c $(XLIBS) $(XLIBPATHS) $(XIPATHS) $(XDEFINES)
+ $(CC) $(OPT) $(LDFLAGS) -o amapcrap amapcrap.c $(XLIBS) $(XLIBPATHS) $(XIPATHS)
$(XDEFINES)
@echo
strip: amap amapcrap
amap-lnamap6.patch:
Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE amap-lnamap6.patch ---
diff -ru amap-5.2.orig/Makefile.am amap-5.2/Makefile.am
--- amap-5.2.orig/Makefile.am 2010-03-21 14:32:23.000000000 +0100
+++ amap-5.2/Makefile.am 2010-03-21 15:56:37.000000000 +0100
@@ -38,11 +38,11 @@
-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 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
+ -test -e $(DESTDIR)$(PREFIX)$(BINDIR)/amap6 || ln -s amap
$(DESTDIR)$(PREFIX)$(BINDIR)/amap6
clean:
cd pcre-3.9 && make clean
amap-new-homepage.patch:
amap.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE amap-new-homepage.patch ---
diff -urN amap-5.2/amap.h amap-5.2.new/amap.h
--- amap-5.2/amap.h 2005-09-08 00:08:57.000000000 +0200
+++ amap-5.2.new/amap.h 2008-09-18 18:52:31.000000000 +0200
@@ -22,7 +22,7 @@
#define AMAP_YEAR "2005"
#define AMAP_AUTHOR "van Hauser"
#define AMAP_EMAIL "amap-dev(a)thc.org"
-#define AMAP_RESOURCE "www.thc.org/thc-amap"
+#define AMAP_RESOURCE "freeworld.thc.org/thc-amap"
#ifndef AMAP_PREFIX
#ifdef PREFIX
amap-optflags.patch:
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE amap-optflags.patch ---
diff -ru amap-5.2/Makefile.am amap-5.2.orig/Makefile.am
--- amap-5.2/Makefile.am 2010-01-08 11:23:46.000000000 +0100
+++ amap-5.2.orig/Makefile.am 2010-01-08 11:23:31.000000000 +0100
@@ -1,6 +1,6 @@
CC=gcc
LIB=-lpcre
-OPT=-O2
+OPT+=-O2
OPT_DEBUG=-ggdb -Wall -lefence
BINDIR=/bin
DATADIR=/share/amap
amap-path.patch:
Makefile.am | 4 ++--
amap-lib.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
--- NEW FILE amap-path.patch ---
diff -urN amap-5.2/amap-lib.c amap-5.2.new/amap-lib.c
--- amap-5.2/amap-lib.c 2005-09-07 23:22:24.000000000 +0200
+++ amap-5.2.new/amap-lib.c 2008-09-18 18:29:01.000000000 +0200
@@ -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, "share/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, "/share/amap/");
strcat(opt->filename, AMAP_DEFAULT_FILENAME);
}
opt->file_log = malloc(strlen(opt->filename) + 6);
diff -urN amap-5.2/Makefile.am amap-5.2.new/Makefile.am
--- amap-5.2/Makefile.am 2005-09-22 17:39:18.000000000 +0200
+++ amap-5.2.new/Makefile.am 2008-09-18 18:32:07.000000000 +0200
@@ -3,8 +3,8 @@
OPT=-O2
OPT_DEBUG=-ggdb -Wall -lefence
BINDIR=/bin
-DATADIR=/etc
-MANDIR=/man/man1
+DATADIR=/share/amap
+MANDIR=/share/man/man1
SCRIPTS=appdefs.trig appdefs.resp appdefs.rpc
MANPAGE=amap.1
all: pcre strip
amap-system-pcre.patch:
amap-5.2.new/Makefile.am | 4 ++--
amap-5.2.new/amap-inc.h | 2 +-
amap-5.2/configure | 10 ++++------
3 files changed, 7 insertions(+), 9 deletions(-)
--- NEW FILE amap-system-pcre.patch ---
diff -urN amap-5.2/amap-inc.h amap-5.2.new/amap-inc.h
--- amap-5.2/amap-inc.h 2003-10-29 23:37:41.000000000 +0100
+++ amap-5.2.new/amap-inc.h 2008-09-18 18:54:40.000000000 +0200
@@ -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 -urN amap-5.2/Makefile.am amap-5.2.new/Makefile.am
--- amap-5.2/Makefile.am 2005-09-22 17:39:18.000000000 +0200
+++ amap-5.2.new/Makefile.am 2008-09-18 18:55:34.000000000 +0200
@@ -1,5 +1,5 @@
CC=gcc
-LIB=-lpcre -L./pcre-3.9/ -I./pcre-3.9/
+LIB=-lpcre
OPT=-O2
OPT_DEBUG=-ggdb -Wall -lefence
BINDIR=/bin
@@ -8,6 +8,6 @@
SCRIPTS=appdefs.trig appdefs.resp appdefs.rpc
MANPAGE=amap.1
-all: pcre strip
+all: amap amapcrap
pcre:
cd pcre-3.9 && make
diff -ru amap-5.2.orig/configure amap-5.2/configure
--- amap-5.2.orig/configure 2010-03-21 14:32:23.000000000 +0100
+++ amap-5.2/configure 2010-03-26 19:02:49.000000000 +0100
@@ -13,15 +13,13 @@
exit 0
fi
-cd pcre-3.9 || exit 1
-./configure || exit 1
-cd ..
-
echo
echo
echo "Starting amap auto configuration ..."
rm -f Makefile.in
PREFIX=""
+PCRE_LIBS=`pcre-config --libs`
+PCRE_IPATH=`pcre-config --cflags`
SSL_PATH=""
SSL_IPATH=""
CRYPTO_PATH=""
@@ -123,9 +121,9 @@
echo
XDEFINES=""
-XLIBS=""
+XLIBS="$PCRE_LIBS"
XLIBPATHS=""
-XIPATHS=""
+XIPATHS="$PCRE_IPATH"
if [ -n "$SSL_PATH" ]; then
XDEFINES="$XDEFINES -DOPENSSL"
--- NEW FILE amap.spec ---
Name: amap
Version: 5.2
Release: 4%{?dist}
Summary: Network tool for application protocol detection
Group: Applications/System
License: AMAP License
#License AMAP non-commercial rules added to GPLv2
URL:
http://freeworld.thc.org/thc-amap/
Source0:
http://freeworld.thc.org/releases/%{name}-%{version}.tar.gz
Patch0: %{name}-destdir.patch
Patch1: %{name}-path.patch
Patch2: %{name}-ldflags.patch
Patch3: %{name}-new-homepage.patch
Patch4: %{name}-system-pcre.patch
Patch5: %{name}-optflags.patch
Patch6: %{name}-lnamap6.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openssl-devel
BuildRequires: pcre-devel
%description
THC Amap is a next-generation tool for assisting network penetration testing.
It performs fast and reliable application protocol detection, independent
on the TCP/UDP port they are being bound to.
%prep
%setup -q
%patch0 -p1 -b .0destdir
%patch1 -p1 -b .1path
%patch2 -p1 -b .2ldflags
%patch3 -p1 -b .3homepage
%patch4 -p1 -b .4pcre
%patch5 -p1 -b .5optflags
%patch6 -p1 -b .6lnamap6
%build
#%%configure
./configure --prefix=%{_prefix} --libdir=%{_libdir}
OPT="$RPM_OPT_FLAGS" make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(644,root,root,755)
%doc CHANGES README TODO LICENCE.AMAP LICENSE.GNU
%attr(755,root,root) %{_bindir}/*
%{_mandir}/man1/%{name}.1*
%{_datadir}/%{name}
%changelog
* Fri Mar 26 2010 Michal Ambroz <rebus at, seznam.cz> 5.2-4
- more flexible pcre cflags to build also on RHEL4
* Sun Mar 20 2010 Michal Ambroz <rebus at, seznam.cz> 5.2-3
- License changed to AMAP license to avoid confusion
- patch makefile to link to amap6 instead of copy
* Fri Jan 08 2010 Michal Ambroz <rebus at, seznam.cz> 5.2-2
- patched makefile & spec to honour RPM_OPT_FLAGS
- included verbatim copy of licenses
- RPM_OPT_FLAGS fixed build of debug package as well
- removed explicit dependency on openssl and pcre
* Tue Jan 05 2010 Michal Ambroz <rebus at, seznam.cz> 5.2-1
- Initial SPEC for Fedora 12 using SPEC and patches from PLD
- Original SPEC by luzik qboosh zbyniu baggins glen
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/amap/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 25 Mar 2010 22:16:43 -0000 1.1
+++ .cvsignore 27 Mar 2010 00:44:05 -0000 1.2
@@ -0,0 +1 @@
+amap-5.2.tar.gz
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/amap/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 25 Mar 2010 22:16:43 -0000 1.1
+++ sources 27 Mar 2010 00:44:05 -0000 1.2
@@ -0,0 +1 @@
+e3b1f5ebd24aac03aacb38ec183eb426 amap-5.2.tar.gz