diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-01-16 13:45:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-01-16 13:50:12 +0000 |
commit | 42d8f3ac74f86c7d696928aae3ea8ca69c581c09 (patch) | |
tree | 9b5321fda638410b805e27a400e5ac480d87f305 /testing/cowpatty | |
parent | 70ab9cfdc15de810fb71363b0bff829372500d80 (diff) | |
download | aports-42d8f3ac74f86c7d696928aae3ea8ca69c581c09.tar.bz2 aports-42d8f3ac74f86c7d696928aae3ea8ca69c581c09.tar.xz |
testing/cowpatty: parallel build fix
Basicly a rewrite of the makefile.
The author does not know how GNU make works.
Diffstat (limited to 'testing/cowpatty')
-rw-r--r-- | testing/cowpatty/APKBUILD | 20 | ||||
-rw-r--r-- | testing/cowpatty/makefile.patch | 78 |
2 files changed, 92 insertions, 6 deletions
diff --git a/testing/cowpatty/APKBUILD b/testing/cowpatty/APKBUILD index 198533fe9e..1c630ab1e0 100644 --- a/testing/cowpatty/APKBUILD +++ b/testing/cowpatty/APKBUILD @@ -12,9 +12,19 @@ depends_dev="" makedepends="libpcap-dev openssl-dev" install="" subpackages="" -source="http://www.willhackforsushi.com/code/$pkgname/$pkgver/$pkgname-$pkgver.tgz" +source="http://www.willhackforsushi.com/code/$pkgname/$pkgver/$pkgname-$pkgver.tgz + makefile.patch" _builddir="$srcdir"/$pkgname-$pkgver +prepare() { + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + build() { cd "$_builddir" make || return 1 @@ -22,10 +32,8 @@ build() { package() { cd "$_builddir" - install -m755 -D "$_builddir"/$pkgname \ - "$pkgdir"/usr/bin/$pkgname || return 1 - install -m755 -D "$_builddir"/genpmk \ - "$pkgdir"/usr/bin/genpmk || return 1 + make install DESTDIR="$pkgdir" BINDIR=/usr/bin || return 1 } -md5sums="deccac0763a05ef7014107d347bf9190 cowpatty-4.3.tgz" +md5sums="deccac0763a05ef7014107d347bf9190 cowpatty-4.3.tgz +0c4e93c53b0356a5513d4a2dd798815d makefile.patch" diff --git a/testing/cowpatty/makefile.patch b/testing/cowpatty/makefile.patch new file mode 100644 index 0000000000..3f676e74b1 --- /dev/null +++ b/testing/cowpatty/makefile.patch @@ -0,0 +1,78 @@ + +This patch was set upstream to author 2012-01-16 + +--- ./Makefile.orig ++++ ./Makefile +@@ -7,36 +7,42 @@ + # <dragorn> i think thats all anyone does + # <dragorn> make is a twisted beast + ################################## +-LDLIBS = -lpcap +-CFLAGS = -pipe -Wall -DOPENSSL +-CFLAGS += -O2 +-LDLIBS += -lcrypto +-CFLAGS += -g3 -ggdb +-#CFLAGS += -static ++ ++CFLAGS ?= -O2 -g3 -ggdb -pipe ++ ++PCAP_LIBS = -lpcap ++CRYPTO_LIBS = -lcrypto ++CRYPTO_CFLAGS = -DOPENSSL ++ ++LDLIBS = $(PCAP_LIBS) $(CRYPTO_LIBS) ++ + PROGOBJ = md5.o sha1.o utils.o cowpatty.o genpmk.o + PROG = cowpatty genpmk + BINDIR = /usr/local/bin + +-all: $(PROGOBJ) $(PROG) ++OBJS_cowpatty = cowpatty.o md5.o sha1.o utils.o ++OBJS_genpmk = genpmk.o md5.o sha1.o utils.o + +-cowpatty: common.h md5.c md5.h sha1.h cowpatty.c cowpatty.h sha1.c \ +- sha1.h utils.c utils.h +- $(CC) $(CFLAGS) cowpatty.c -o cowpatty utils.o md5.o sha1.o $(LDLIBS) ++all: $(PROG) + +-genpmk: genpmk.c cowpatty.h utils.h sha1.h common.h +- $(CC) $(CFLAGS) genpmk.c -o genpmk utils.o sha1.o $(LDLIBS) ++cowpatty: $(OBJS_cowpatty) ++ $(CC) $(CFLAGS) -o $@ $(OBJS_cowpatty) $(LDLIBS) + +-utils: utils.c utils.h +- $(CC) $(CFLAGS) utils.c -c ++genpmk: $(OBJS_genpmk) ++ $(CC) $(CFLAGS) -o $@ $(OBJS_genpmk) $(LDLIBS) + +-md5: md5.c md5.h +- $(CC) $(CFLAGS) md5.c -c ++cowpatty.o: cowpatty.h common.h utils.h sha1.h md5.h radiotap.h ++genpmk.o: cowpatty.h common.h utils.h sha1.h ++md5.o: common.h md5.h ++sha1.o: common.h sha1.h ++utils.o: utils.h radiotap.h ++md5.o: md5.h + +-sha1: sha1.c sha1.h +- $(CC) $(CFLAGS) sha1.c -c ++%.o: %.c ++ $(CC) $(CFLAGS) $(CRYPTO_CFLAGS) $(CFLAGS_$@) -c $< + + clean: +- @rm $(PROGOBJ) $(PROG) ++ @rm -f $(PROGOBJ) $(PROG) *.o + + strip: + @ls -l $(PROG) +@@ -45,7 +51,9 @@ + + install: all + install -d $(DESTDIR)$(BINDIR) +- install -m 755 $(PROG) $(BINDIR)$(DESTDIR) ++ install -m 755 $(PROG) $(DESTDIR)$(BINDIR) + + love: + @echo "Not right now, I have a headache." ++ ++ |