1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-30 22:00:49 +02:00
openwrt-xburst/obsolete-buildroot/make/dhcp-fwd.mk
mbm 097635b79b massive changes
- sstrip cleanup from mjn3
- various patches from nico and others: http://openwrt.org/forum/viewtopic.php?t=368


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@145 3c298f89-4303-0410-b956-a3cf2f4a3e73
2004-08-24 23:50:14 +00:00

93 lines
2.7 KiB
Makefile

## dhcp-fwd
DHCP_FWD_VERSION := 0.7
DHCP_FWD_RELEASE := 1
DHCP_FWD_SOURCE := dhcp-forwarder-$(DHCP_FWD_VERSION).tar.bz2
DHCP_FWD_SITE := http://www-user.tu-chemnitz.de/~ensc/dhcp-fwd/files/
DHCP_FWD_DIR := $(BUILD_DIR)/dhcp-forwarder-$(DHCP_FWD_VERSION)
DHCP_FWD_CAT := bzcat
DHCP_FWD_BUILD_DIR := $(BUILD_DIR)/dhcp-fwd_$(DHCP_FWD_VERSION)-$(DHCP_FWD_RELEASE)
DHCP_FWD_IPK_DIR := $(OPENWRT_IPK_DIR)/dhcp-fwd
DHCP_FWD_IPK := $(DHCP_FWD_BUILD_DIR)_$(ARCH).ipk
$(DL_DIR)/$(DHCP_FWD_SOURCE):
$(WGET) -P $(DL_DIR) $(DHCP_FWD_SITE)/$(DHCP_FWD_SOURCE)
$(DHCP_FWD_DIR)/.stamp-unpacked: $(DL_DIR)/$(DHCP_FWD_SOURCE)
$(DHCP_FWD_CAT) $(DL_DIR)/$(DHCP_FWD_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(DHCP_FWD_DIR)/.stamp-unpacked
$(DHCP_FWD_DIR)/.stamp-configured: $(DHCP_FWD_DIR)/.stamp-unpacked
cd $(DHCP_FWD_DIR) ; \
rm -rf config.cache ; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_func_malloc_0_nonnull="yes" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--datadir=/usr/share \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--localstatedir=/var \
--sysconfdir=/etc \
$(DISABLE_NLS) \
touch $(DHCP_FWD_DIR)/.stamp-configured
$(DHCP_FWD_DIR)/.stamp-built: $(DHCP_FWD_DIR)/.stamp-configured
cd $(DHCP_FWD_DIR) ; \
touch config.guess ; \
touch config.sub ; \
$(MAKE) \
CC=$(TARGET_CC) \
cfg_filename="/etc/dhcp-fwd.conf" \
all \
touch $(DHCP_FWD_DIR)/.stamp-built
$(DHCP_FWD_BUILD_DIR)/CONTROL/control: $(DHCP_FWD_DIR)/.stamp-built
rm -rf $(DHCP_FWD_BUILD_DIR)
mkdir -p $(DHCP_FWD_BUILD_DIR)/usr/sbin
cp -a $(DHCP_FWD_DIR)/dhcp-fwd $(DHCP_FWD_BUILD_DIR)/usr/sbin/
$(STRIP) $(DHCP_FWD_BUILD_DIR)/usr/sbin/*
cp -a $(DHCP_FWD_IPK_DIR)/root/* $(DHCP_FWD_BUILD_DIR)/
chmod 0755 $(DHCP_FWD_BUILD_DIR)/etc
chmod 0755 $(DHCP_FWD_BUILD_DIR)/etc/init.d
chmod 0755 $(DHCP_FWD_BUILD_DIR)/etc/init.d/*
chmod 0644 $(DHCP_FWD_BUILD_DIR)/etc/dhcp-fwd.conf
chmod 0755 $(DHCP_FWD_BUILD_DIR)/usr
chmod 0755 $(DHCP_FWD_BUILD_DIR)/usr/sbin
chmod 0755 $(DHCP_FWD_BUILD_DIR)/usr/sbin/*
cp -a $(DHCP_FWD_IPK_DIR)/CONTROL $(DHCP_FWD_BUILD_DIR)/
perl -pi -e "s/^Vers.*:.*$$/Version: $(DHCP_FWD_VERSION)-$(DHCP_FWD_RELEASE)/" $(DHCP_FWD_BUILD_DIR)/CONTROL/control
perl -pi -e "s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(DHCP_FWD_BUILD_DIR)/CONTROL/control
touch $(DHCP_FWD_BUILD_DIR)/CONTROL/control
$(DHCP_FWD_IPK): $(DHCP_FWD_BUILD_DIR)/CONTROL/control
cd $(BUILD_DIR); $(IPKG_BUILD) $(DHCP_FWD_BUILD_DIR)
dhcp-fwd-ipk: ipkg-utils $(DHCP_FWD_IPK)
dhcp-fwd-clean:
rm -rf $(DHCP_FWD_IPK)
rm -rf $(DHCP_FWD_BUILD_DIR)
rm -rf $(DHCP_FWD_DIR)