source: freewrt/package/iptables/Makefile@ 15aec9e

Last change on this file since 15aec9e was 99cbe83, checked in by Thorsten Glaser <tg@…>, 19 years ago

the treebreaker ☺

overhaul the fetch'n'checksum system to be more bsd-like

  • make fetch, make checksum supported
  • future expansion possibilities already prepared: – more distfiles than just one – check sizes of downloaded files (size matters!!!!!111) – more hashes than just MD5 – recursive fetch/checksum targets – PERMIT_{SOURCES,DISTFILES}=Yes/«reason» – licence issues
  • download.pl dies

quirks:

  • GNU make only has a poor excuse for a .for loop
  • some things (esp. toolchain and target/linux) now have a ${WRKDIR} where they didn't have it before
  • ${WRKDIR}/.checksum_done – no comment… it was necessary because otherwise everything will get rebuilt every time (did I mention that GNU make sucks?)
  • I had troubles tracking the dependency problems down because GNU make, unlike BSD make, doesn't have good debugging
  • DISTFILES -> FULLDISTFILES
  • DL_DIR -> DISTDIR
  • PKG_SOURCE -> DISTFILES
  • PKG_SOURCE_URL -> MASTER_SITES
  • no @SF and @GNU any more, use BSD network.template syntax (feel free to add more master sites)
  • GNU make doesn't really strip whitespaces from variables… (did I mention how much better BSD make is?)
  • echo 'LOCAL_DISTFILES=/path/to/distfiles' >>${TOPDIR}/prefs.mk will save the need to download 'em, Closes: #102
  • MASTER_SITES now *must* have the trailing slashes (there may be a few that don't and a few with double ones, please fix them)

I've tested that a normal build (unchanged .config from the default) works
on GNU/Linux. There's definitively room for improvement, but most of that
will come with the NFO system only. Fixes appreciated.

This work sponsored by AurISP, part of the NFO conversion project ☻

git-svn-id: svn://www.freewrt.org/trunk/freewrt@2678 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 2.4 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include ${TOPDIR}/rules.mk
8
9PKG_NAME:= iptables
10PKG_VERSION:= 1.3.7
11PKG_RELEASE:= 6
12PKG_MD5SUM:= dd965bdacbb86ce2a6498829fddda6b7
13MASTER_SITES:= http://www.netfilter.org/projects/iptables/files/ \
14 ftp://ftp.be.netfilter.org/pub/netfilter/iptables/ \
15 ftp://ftp.de.netfilter.org/pub/netfilter/iptables/ \
16 ftp://ftp.no.netfilter.org/pub/netfilter/iptables/
17DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
18
19include ${TOPDIR}/mk/package.mk
20include ${LINUX_DIR}/.config
21
22$(eval $(call PKG_template,IPTABLES,iptables,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
23$(eval $(call PKG_template,IPTABLES_UTILS,iptables-utils,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
24ifeq ($(FWRT_IPV6),y)
25$(eval $(call PKG_template,IP6TABLES,ip6tables,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
26endif
27
28BUILD_STYLE:= auto
29INSTALL_STYLE:= auto
30INSTALL_TARGET:= install install-devel
31XAKE_FLAGS+= COPT_FLAGS='${TCFLAGS} ${TCPPFLAGS} -Iinclude' \
32 LDFLAGS='${TLDFLAGS} -rdynamic' \
33 KERNEL_DIR='${LINUX_DIR}' \
34 PREFIX=/usr
35ifeq ($(FWRT_IPV6),y)
36XAKE_FLAGS+= DO_IPV6=1
37endif
38
39SUB_INSTALL-${FWRT_PACKAGE_IPTABLES_UTILS}+= iptables-utils-install
40ifeq ($(FWRT_IPV6),y)
41SUB_INSTALL-${FWRT_PACKAGE_IP6TABLES}+= ip6tables-install
42endif
43
44do-configure:
45 chmod a+x $(WRKBUILD)/extensions/.*-test*
46 $(SED) 's/^DO_IPV6.*//' $(WRKBUILD)/Makefile
47
48post-install: ${SUB_INSTALL-m} ${SUB_INSTALL-y}
49 ${INSTALL_DIR} ${IDIR_IPTABLES}/usr/sbin
50 ${INSTALL_DIR} ${IDIR_IPTABLES}/usr/lib/iptables
51 ${INSTALL_BIN} ${WRKINST}/usr/sbin/iptables ${IDIR_IPTABLES}/usr/sbin/
52 (cd ${WRKINST}/usr/lib/iptables ; \
53 ${INSTALL_DATA} libipt_*.so ${IDIR_IPTABLES}/usr/lib/iptables/ \
54 )
55
56iptables-utils-install:
57 ${INSTALL_DIR} ${IDIR_IPTABLES_UTILS}/usr/sbin
58 ${INSTALL_BIN} ${WRKINST}/usr/sbin/iptables-{save,restore} ${IDIR_IPTABLES_UTILS}/usr/sbin/
59
60ip6tables-install:
61 ${INSTALL_DIR} ${IDIR_IP6TABLES}/usr/sbin
62 ${INSTALL_DIR} ${IDIR_IP6TABLES}/usr/lib/iptables
63 ${INSTALL_BIN} ${WRKINST}/usr/sbin/ip6tables ${IDIR_IP6TABLES}/usr/sbin/
64 (cd ${WRKINST}/usr/lib/iptables ; \
65 ${INSTALL_DATA} libip6t_*.so ${IDIR_IP6TABLES}/usr/lib/iptables/ \
66 )
67
68layer7-install:
69 ${INSTALL_DIR} ${IDIR_IPTABLES_MOD_FILTER}/etc/l7-protocols
70 ${INSTALL_DATA} files/l7/*.pat ${IDIR_IPTABLES_MOD_FILTER}/etc/l7-protocols/
71
72include ${TOPDIR}/mk/pkg-bottom.mk
Note: See TracBrowser for help on using the repository browser.