1 #############################################################
5 #############################################################
6 include $(TOPDIR
)/rules.mk
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
)
16 PKG_IPK
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
17 PKG_IPK_DIR
:=$(PKG_BUILD_DIR
)/ipkg
19 $(DL_DIR
)/$(PKG_SOURCE
):
20 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
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
26 $(PKG_BUILD_DIR
)/.patched
: $(PKG_BUILD_DIR
)/.unpacked
27 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
28 touch
$(PKG_BUILD_DIR
)/.patched
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)" \
35 --target
=$(GNU_TARGET_NAME
) \
36 --host
=$(GNU_TARGET_NAME
) \
37 --build
=$(GNU_HOST_NAME
) \
42 --libexecdir
=/usr
/lib \
44 --datadir=/usr
/share \
45 --localstatedir
=/var \
49 --with-linux-headers
=$(LINUX_DIR
) \
51 touch
$(PKG_BUILD_DIR
)/.configured
53 $(PKG_BUILD_DIR
)/brctl
/brctl
: $(PKG_BUILD_DIR
)/.configured
54 $(MAKE
) -C
$(PKG_BUILD_DIR
)
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
)
64 $(IPKG_STATE_DIR
)/info/bridge.list
: $(PKG_IPK
)
65 $(IPKG
) install $(PKG_IPK
)
67 source
: $(DL_DIR
)/$(PKG_SOURCE
)
68 prepare
: $(PKG_BUILD_DIR
)/.patched
70 install: $(IPKG_STATE_DIR
)/info/bridge.list
73 rm -rf
$(PKG_BUILD_DIR
)