annotate src/winpcap.mk @ 537:2cb44815809c

update version of package winpcap
author Volker Grabsch <vog@notjusthosting.com>
date Mon, 09 Nov 2009 23:55:56 +0100
parents e9afec55fd6b
children 8e6053c0b62a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
417
c82e9294b774 replace the contact email address with hints to the project mailing list
Volker Grabsch <vog@notjusthosting.com>
parents: 414
diff changeset
1 # Copyright (C) 2009 Volker Grabsch
414
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
2 #
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
3 # Permission is hereby granted, free of charge, to any person obtaining
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
4 # a copy of this software and associated documentation files (the
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
5 # "Software"), to deal in the Software without restriction, including
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
6 # without limitation the rights to use, copy, modify, merge, publish,
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
7 # distribute, sublicense, and/or sell copies of the Software, and to
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
8 # permit persons to whom the Software is furnished to do so, subject
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
9 # to the following conditions:
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
10 #
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
11 # The above copyright notice and this permission notice shall be
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
12 # included in all copies or substantial portions of the Software.
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
13 #
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
15 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
16 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
17 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
18 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
19 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
20 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
21
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
22 # WinPcap
306
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
23 PKG := winpcap
448
e9afec55fd6b improved version recognition, enable the notation of ignored (bad) package versions
Volker Grabsch <vog@notjusthosting.com>
parents: 417
diff changeset
24 $(PKG)_IGNORE :=
537
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
25 $(PKG)_VERSION := 4_1_1
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
26 $(PKG)_CHECKSUM := f2f7dd0dc29dd3d89bfdab5a9ed192aa5ffa8eb0
306
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
27 $(PKG)_SUBDIR := winpcap
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
28 $(PKG)_FILE := WpcapSrc_$($(PKG)_VERSION).zip
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
29 $(PKG)_WEBSITE := http://www.winpcap.org/
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
30 $(PKG)_URL := http://www.winpcap.org/install/bin/$($(PKG)_FILE)
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
31 $(PKG)_DEPS := gcc
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
32
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
33 define $(PKG)_UPDATE
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
34 wget -q -O- 'http://www.winpcap.org/devel.htm' | \
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
35 $(SED) -n 's,.*WpcapSrc_\([0-9][^>]*\)\.zip.*,\1,p' | \
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
36 head -1
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
37 endef
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
38
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
39 define $(PKG)_BUILD
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
40 mv '$(1)/Common' '$(1)/common'
537
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
41 mv '$(1)/packetNtx/Dll/strsafe.h' '$(1)/packetNtx/Dll/StrSafe.h'
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
42 -cp '$(1)/common/Packet32.h' '$(1)/common/packet32.h'
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
43 $(SED) '/#include/ s,\\,/,g' -i '$(1)/packetNtx/Dll/Packet32.c'
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
44 $(SED) 's,#include <Iphlpapi\.h>,,' -i '$(1)/packetNtx/Dll/Packet32.c'
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
45 $(SED) 's,#include <IPIfCons\.h>,,' -i '$(1)/packetNtx/Dll/Packet32.c'
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
46 cd '$(1)' && $(TARGET)-gcc -Icommon -IpacketNtx/Dll -O -c '$(1)/packetNtx/Dll/Packet32.c'
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
47 $(TARGET)-ar rc '$(1)/libpacket.a' '$(1)/Packet32.o'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
48 $(TARGET)-ranlib '$(1)/libpacket.a'
285
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
49 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
50 $(INSTALL) -m644 '$(1)/common'/*.h '$(PREFIX)/$(TARGET)/include/'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
51 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
52 $(INSTALL) -m644 '$(1)/libpacket.a' '$(PREFIX)/$(TARGET)/lib/'
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
53 mv '$(1)/wpcap/libpcap/Win32/Include/ip6_misc.h' '$(1)/wpcap/libpcap/Win32/Include/IP6_misc.h'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
54 $(SED) 's,(char\*)tUstr +=,tUstr +=,' -i '$(1)/wpcap/libpcap/inet.c'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
55 $(SED) 's,-DHAVE_AIRPCAP_API,,' -i '$(1)/wpcap/PRJ/GNUmakefile'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
56 echo -e 'libwpcap.a: $${OBJS}' >> '$(1)/wpcap/PRJ/GNUmakefile'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
57 echo -e '\t$${AR} rc $$@ $${OBJS}' >> '$(1)/wpcap/PRJ/GNUmakefile'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
58 echo -e '\t$${RANLIB} $$@' >> '$(1)/wpcap/PRJ/GNUmakefile'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
59 echo '/* already handled by <ws2tcpip.h> */' > '$(1)/wpcap/libpcap/Win32/Src/gai_strerror.c'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
60 CC='$(TARGET)-gcc' \
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
61 AR='$(TARGET)-ar' \
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
62 RANLIB='$(TARGET)-ranlib' \
182
d1678aced603 disable parallel builds for packages pthreads, winpcap and gdal
Volker Grabsch <vog@notjusthosting.com>
parents: 136
diff changeset
63 $(MAKE) -C '$(1)/wpcap/PRJ' -j 1 libwpcap.a
285
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
64 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
65 $(INSTALL) -m644 '$(1)/wpcap/libpcap/'*.h '$(1)/wpcap/Win32-Extensions/'*.h '$(PREFIX)/$(TARGET)/include/'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
66 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
67 $(INSTALL) -m644 '$(1)/wpcap/PRJ/libwpcap.a' '$(PREFIX)/$(TARGET)/lib/'
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
68 endef