please quit breaking things
[openwrt.git] / package / bridge / Makefile
1 #############################################################
2 #
3 # ebtables
4 #
5 #############################################################
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=bridge
9 PKG_VERSION:=1.0.4
10 PKG_RELEASE:=1
11 PKG_MD5SUM:=2cab42847c4654e58c4d0ba114bfe2c2
12 PKG_SOURCE_URL:=@SF/bridge
13 PKG_SOURCE:=bridge-utils-$(PKG_VERSION).tar.gz
14 PKG_BUILD_DIR:=$(BUILD_DIR)/bridge-utils-$(PKG_VERSION)
15 PKG_CAT:=zcat
16 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
17 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
18
19 $(DL_DIR)/$(PKG_SOURCE):
20 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
21
22 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
23 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
24 touch $(PKG_BUILD_DIR)/.unpacked
25
26 $(PKG_BUILD_DIR)/.patched: $(PKG_BUILD_DIR)/.unpacked
27 $(PATCH) $(PKG_BUILD_DIR) ./patches
28 touch $(PKG_BUILD_DIR)/.patched
29
30 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
31 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
32 $(TARGET_CONFIGURE_OPTS) \
33 CFLAGS="$(TARGET_CFLAGS)" \
34 ./configure \
35 --target=$(GNU_TARGET_NAME) \
36 --host=$(GNU_TARGET_NAME) \
37 --build=$(GNU_HOST_NAME) \
38 --prefix=/usr \
39 --exec-prefix=/usr \
40 --bindir=/usr/bin \
41 --sbindir=/usr/sbin \
42 --libexecdir=/usr/lib \
43 --sysconfdir=/etc \
44 --datadir=/usr/share \
45 --localstatedir=/var \
46 --mandir=/usr/man \
47 --infodir=/usr/info \
48 $(DISABLE_NLS) \
49 --with-linux-headers=$(LINUX_DIR) \
50 );
51 touch $(PKG_BUILD_DIR)/.configured
52
53 $(PKG_BUILD_DIR)/brctl/brctl: $(PKG_BUILD_DIR)/.configured
54 $(MAKE) -C $(PKG_BUILD_DIR)
55
56 $(PKG_IPK): $(PKG_BUILD_DIR)/brctl/brctl
57 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
58 mkdir -p $(PKG_IPK_DIR)/usr/sbin
59 cp $(PKG_BUILD_DIR)/brctl/brctl $(PKG_IPK_DIR)/usr/sbin/
60 $(STRIP) $(PKG_IPK_DIR)/usr/sbin/brctl
61 mkdir -p $(PACKAGE_DIR)
62 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
63
64 $(IPKG_STATE_DIR)/info/bridge.list: $(PKG_IPK)
65 $(IPKG) install $(PKG_IPK)
66
67 source: $(DL_DIR)/$(PKG_SOURCE)
68 prepare: $(PKG_BUILD_DIR)/.patched
69 compile: $(PKG_IPK)
70 install: $(IPKG_STATE_DIR)/info/bridge.list
71
72 clean:
73 rm -rf $(PKG_BUILD_DIR)
74 rm -f $(PKG_IPK)
This page took 0.053639 seconds and 5 git commands to generate.