Add package install dependencies (don't install a package if it's already installed)
authorNicolas Thill <nico@openwrt.org>
Sun, 6 Mar 2005 12:03:54 +0000 (12:03 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 6 Mar 2005 12:03:54 +0000 (12:03 +0000)
SVN-Revision: 315

14 files changed:
openwrt/package/arptables/Makefile
openwrt/package/bridge/Makefile
openwrt/package/dnsmasq/Makefile
openwrt/package/dropbear/Makefile
openwrt/package/ebtables/Makefile
openwrt/package/iproute2/Makefile
openwrt/package/iptables/Makefile
openwrt/package/lzo/Makefile
openwrt/package/matrixssl/Makefile
openwrt/package/openssl/Makefile
openwrt/package/openvpn/Makefile
openwrt/package/ppp/Makefile
openwrt/package/pptpd/Makefile
openwrt/package/zlib/Makefile

index d6af30f33be83aa7cb7a4dde8d97bf7278764809..03c6322fe14a9ca3fa1219d8dbcf56a1de2e2e87 100644 (file)
@@ -34,10 +34,13 @@ $(PKG_IPK): $(PKG_BUILD_DIR)/arptables
        mkdir -p $(PACKAGE_DIR)
        $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/arptables.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
+
 source: $(DL_DIR)/$(PKG_SOURCE)
 prepare: $(PKG_BUILD_DIR)/.unpacked
 compile: $(PKG_IPK)
-install:
-       $(IPKG) install $(PKG_IPK)
+install: $(IPKG_STATE_DIR)/info/arptables.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
index 5340a9b58efe6a28a447f3a9d0df1c8813c08271..4381b1d40af148a88697ed9c0df3115005806788 100644 (file)
@@ -60,10 +60,13 @@ $(PKG_IPK): $(PKG_BUILD_DIR)/brctl/brctl
        mkdir -p $(PACKAGE_DIR)
        $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/bridge.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
+
 source: $(DL_DIR)/$(PKG_SOURCE)
 prepare: $(PKG_BUILD_DIR)/.patched
 compile: $(PKG_IPK)
-install:
-       $(IPKG) install $(PKG_IPK)
+install: $(IPKG_STATE_DIR)/info/bridge.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
index 3b6acb49d99828970f90806d6c814217b4b2d11a..899bad799fb5d2f1c3ad68d64bb14f03fef0ed61 100644 (file)
@@ -35,11 +35,14 @@ $(PKG_IPK): $(PKG_BUILD_DIR)/src/$(PKG_NAME)
        mkdir -p $(PACKAGE_DIR)
        $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/dnsmasq.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
+
 source: $(DL_DIR)/$(PKG_SOURCE)
 prepare: $(PKG_BUILD_DIR)/.patched
 compile: $(PKG_IPK)
-install:
-       $(IPKG) install $(PKG_IPK)
+install: $(IPKG_STATE_DIR)/info/dnsmasq.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
        rm -f $(PKG_IPK)
index eec889deaf19f14322c0b8cad2c8394159452e0c..62d802e9411d85d3a47e68458ea719981646a261 100644 (file)
@@ -69,11 +69,14 @@ $(PACKAGE_DIR)/$(DROPBEAR_IPK): $(DROPBEAR_DIR)/$(DROPBEAR_BINARY)
        chmod a+x $(DROPBEAR_IPK_DIR)/etc/init.d/S50dropbear
        $(IPKG_BUILD) $(DROPBEAR_IPK_DIR) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/dropbear.list: $(PACKAGE_DIR)/$(DROPBEAR_IPK)
+       $(IPKG) install $(PACKAGE_DIR)/$(DROPBEAR_IPK)
+
 source: $(DL_DIR)/$(DROPBEAR_SOURCE)
 prepare: $(DROPBEAR_DIR)/.patched
 compile: $(PACKAGE_DIR)/$(DROPBEAR_IPK)
-install: compile
-       $(IPKG) install $(PACKAGE_DIR)/$(DROPBEAR_IPK)
+install: $(IPKG_STATE_DIR)/info/dropbear.list
+
 clean:
        rm -rf $(DROPBEAR_DIR)
        rm -f $(PACKAGE_DIR)/$(DROPBEAR_IPK)
index 384576db9d33dc4f908da2011ebfcbd801a7dd29..fd168a8a189ab592e50221c7519e0580dc1466d1 100644 (file)
@@ -34,10 +34,13 @@ $(PKG_IPK): $(PKG_BUILD_DIR)/ebtables
        mkdir -p $(PACKAGE_DIR)
        $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/ebtables.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
+
 source: $(DL_DIR)/$(PKG_SOURCE)
 prepare: $(PKG_BUILD_DIR)/.unpacked
 compile: $(PKG_IPK)
-install:
-       $(IPKG) install $(PKG_IPK)
+install: $(IPKG_STATE_DIR)/info/ebtables.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
index a2d52df116f57304d209d24ae6805a4edb408e17..ad2ba0094d8f831403224572bc22693392ec5b67 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################
 #
-# ebtables
+# iproute2
 #
 #############################################################
 include $(TOPDIR)/rules.mk
@@ -53,6 +53,9 @@ $(PKG_IP): $(PKG_BUILD_DIR)/ip/ip $(PACKAGE_DIR)
        $(STRIP) $(PKG_IP_DIR)/usr/sbin/*
        $(IPKG_BUILD) $(PKG_IP_DIR) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/ip.list: $(PKG_IP)
+       $(IPKG) install $(PKG_IP)
+
 $(PKG_TC): $(PKG_BUILD_DIR)/tc/tc $(PACKAGE_DIR)
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_TC_DIR) tc.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
        mkdir -p $(PKG_TC_DIR)/usr/sbin
@@ -60,6 +63,9 @@ $(PKG_TC): $(PKG_BUILD_DIR)/tc/tc $(PACKAGE_DIR)
        $(STRIP) $(PKG_TC_DIR)/usr/sbin/*
        $(IPKG_BUILD) $(PKG_TC_DIR) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/tc.list: $(PKG_TC)
+       $(IPKG) install $(PKG_TC)
+
 $(PACKAGE_DIR):
        mkdir -p $(PACKAGE_DIR)
 
@@ -71,17 +77,17 @@ ifneq ($(BR2_PACKAGE_IPROUTE2_TC),)
 TARGETS += $(PKG_TC)
 endif
 
-source: $(DL_DIR)/$(PKG_SOURCE)
-prepare: $(PKG_BUILD_DIR)/.patched
-compile: $(TARGETS)
-install:
 ifeq ($(BR2_PACKAGE_IPROUTE2_IP),y)
-       $(IPKG) install $(PKG_IP)
+INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/ip.list
 endif
 ifeq ($(BR2_PACKAGE_IPROUTE2_TC),y)
-       $(IPKG) install $(PKG_TC)
+INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/tc.list
 endif
 
+source: $(DL_DIR)/$(PKG_SOURCE)
+prepare: $(PKG_BUILD_DIR)/.patched
+compile: $(TARGETS)
+install: $(INSTALL_TARGETS)
 
 clean:
        rm -rf $(PKG_BUILD_DIR)
index 1a0c385f3f9d5da51e2146d795c4189593e4ceae..67e4a2d737bff68cd97367f0265df648b083cbf0 100644 (file)
@@ -28,6 +28,14 @@ ifneq ($(BR2_PACKAGE_IP6TABLES),)
 TARGETS += $(PKG_IP6T)
 endif
 
+INSTALL_TARGETS := $(IPKG_STATE_DIR)/info/iptables.list
+ifeq ($(BR2_PACKAGE_IPTABLES_EXTRA),y)
+INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/iptables-extra.list
+endif
+ifeq ($(BR2_PACKAGE_IP6TABLES),y)
+INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/ip6tables.list
+endif
+
 $(DL_DIR)/$(PKG_SOURCE_FILE):
        mkdir -p $(DL_DIR)
        $(WGET) -P $(DL_DIR) $(PKG_SOURCE_SITE)/$(PKG_SOURCE_FILE)
@@ -58,6 +66,9 @@ $(PKG_IPT): $(PKG_BUILD_DIR)/iptables
        mkdir -p $(PACKAGE_DIR)
        $(IPKG_BUILD) $(I_IPT) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/iptables.list: $(PKG_IPT)
+       $(IPKG) install $(PKG_IPT)
+
 $(PKG_IPT_EXTRA): $(PKG_BUILD_DIR)/iptables
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_IPT_EXTRA) control/iptables-extra.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) 
        mkdir -p $(I_IPT_EXTRA)/usr/lib/iptables
@@ -67,6 +78,9 @@ $(PKG_IPT_EXTRA): $(PKG_BUILD_DIR)/iptables
        mkdir -p $(PACKAGE_DIR)
        $(IPKG_BUILD) $(I_IPT_EXTRA) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/iptables-extra.list: $(PKG_IPT)
+       $(IPKG) install $(PKG_IPT_EXTRA)
+
 $(PKG_IP6T): $(PKG_BUILD_DIR)/iptables
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_IP6T) control/ip6tables.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) 
        mkdir -p $(I_IP6T)/usr/sbin
@@ -79,18 +93,14 @@ $(PKG_IP6T): $(PKG_BUILD_DIR)/iptables
        mkdir -p $(PACKAGE_DIR)
        $(IPKG_BUILD) $(I_IP6T) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/ip6tables.list: $(PKG_IP6T)
+       $(IPKG) install $(PKG_IP6T)
+
 
 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
 prepare: $(PKG_BUILD_DIR)/.patched
 compile: $(TARGETS)
-install: compile
-       $(IPKG) install $(PKG_IPT)
-ifeq ($(BR2_PACKAGE_IPTABLES_EXTRA),y)
-       $(IPKG) install $(PKG_IPT_EXTRA)
-endif
-ifeq ($(BR2_PACKAGE_IP6TABLES),y)
-       $(IPKG) install $(PKG_IP6T)
-endif
+install: $(INSTALL_TARGETS)
 
 clean:
        rm -rf $(PKG_BUILD_DIR)
index 8d7398194e713f4ca219047c4a623732ebb18038..414ec3eb26570405dcb6ab6f869a8a85f4f295dc 100644 (file)
@@ -9,7 +9,7 @@ PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_CAT := zcat
 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
-PKG_IPK := $(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
 
 
 $(DL_DIR)/$(PKG_SOURCE_FILE):
@@ -49,7 +49,7 @@ $(STAGING_DIR)/lib/liblzo.a: $(PKG_BUILD_DIR)/src/liblzo.la
          DESTDIR="$(STAGING_DIR)" \
          install
 
-$(PACKAGE_DIR)/$(PKG_IPK): $(STAGING_DIR)/lib/liblzo.a
+$(PKG_IPK): $(STAGING_DIR)/lib/liblzo.a
        mkdir -p $(PACKAGE_DIR)
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/lzo lzo.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
        mkdir -p $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib
@@ -57,11 +57,14 @@ $(PACKAGE_DIR)/$(PKG_IPK): $(STAGING_DIR)/lib/liblzo.a
        $(STRIP) $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib/*
        $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/lzo $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/lzo.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
+
 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
 prepare: $(PKG_BUILD_DIR)/.patched
-compile: $(STAGING_DIR)/lib/liblzo.a $(PACKAGE_DIR)/$(PKG_IPK)
-install: $(PKG_ZLIB)
-       $(IPKG) install $(PACKAGE_DIR)/$(PKG_IPK)
+compile: $(STAGING_DIR)/lib/liblzo.a $(PKG_IPK)
+install: $(IPKG_STATE_DIR)/info/lzo.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
        rm -f $(STAGING_DIR)/lib/liblzo*
index 22209a9dd874b351ae8c303ffdb5ee00104bfe2f..4775c121e7baeeec448cda3f6c200e893bb5d9db 100644 (file)
@@ -9,7 +9,7 @@ PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_CAT := zcat
 PKG_SOURCE_DIR := $(PKG_NAME)
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
-PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+PKG_IPK := $(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
 
 
 $(DL_DIR)/$(PKG_SOURCE_FILE):
@@ -41,12 +41,14 @@ $(PKG_IPK): $(STAGING_DIR)/lib/libmatrixssl.so
        $(STRIP) $(PKG_BUILD_DIR)/ipkg/matrixssl/usr/lib/*
        $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/matrixssl $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/libmatrixssl.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
 
 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
 prepare: $(PKG_BUILD_DIR)/.patched
 compile: $(STAGING_DIR)/lib/libmatrixssl.so $(PKG_IPK)
-install: $(PKG_ZLIB)
-       $(IPKG) install $(PACKAGE_DIR)/$(PKG_IPK)
+install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/libmatrixssl.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
        rm -f $(STAGING_DIR)/lib/libmatrixssl* $(STAGING_DIR)/include/matrixssl*
index e5dd85185618812d0425ca70f0c4cadaec918f4d..eb566c53f5f4ce4f6daa35958b53a38967188ed0 100644 (file)
@@ -9,7 +9,7 @@ PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_CAT := zcat
 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
-PKG_IPK := $(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
 
 OPENSSL_NO_CIPHERS:=no-idea no-mdc2 no-rc5 no-rc2 no-md2 no-md4
 
@@ -51,7 +51,7 @@ $(STAGING_DIR)/lib/libssl.so: $(PKG_BUILD_DIR)/apps/openssl
        (cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so)
        (cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so.0)
 
-$(PACKAGE_DIR)/$(PKG_IPK): $(STAGING_DIR)/lib/libssl.so
+$(PKG_IPK): $(STAGING_DIR)/lib/libssl.so
        mkdir -p $(PACKAGE_DIR)
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/$(PKG_NAME) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
        mkdir -p $(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)/usr/lib
@@ -60,11 +60,14 @@ $(PACKAGE_DIR)/$(PKG_IPK): $(STAGING_DIR)/lib/libssl.so
        $(STRIP) $(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)/usr/lib/*
        $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/$(PKG_NAME) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/openssl.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
+
 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
 prepare: $(PKG_BUILD_DIR)/.patched
 compile: $(STAGING_DIR)/lib/libssl.so $(PACKAGE_DIR)/$(PKG_IPK)
-install: $(PKG_ZLIB)
-       $(IPKG) install $(PACKAGE_DIR)/$(PKG_IPK)
+install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/openssl.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
        rm -f $(STAGING_DIR)/lib/libssl*
index 41f7d67594b316f0f7b568119d49a6e937a5281a..94bee618d60c35289344d6250599f96396bc8ac5 100644 (file)
@@ -50,20 +50,23 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
        );
        touch $(PKG_BUILD_DIR)/.configured
 
-$(PKG_BUILD_DIR)/usr/sbin/openvpn: $(PKG_BUILD_DIR)/.configured
+$(PKG_BUILD_DIR)/openvpn: $(PKG_BUILD_DIR)/.configured
        $(MAKE) -C $(PKG_BUILD_DIR)
 
-$(PKG_IPK): $(PKG_BUILD_DIR)/usr/sbin/openvpn
+$(PKG_IPK): $(PKG_BUILD_DIR)/openvpn
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
        mkdir -p $(PKG_IPK_DIR)/usr/sbin
        cp $(PKG_BUILD_DIR)/openvpn $(PKG_IPK_DIR)/usr/sbin/
        mkdir -p $(PACKAGE_DIR)
        $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/openvpn.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
+
 source: $(DL_DIR)/$(PKG_SOURCE)
 prepare: $(PKG_BUILD_DIR)/.unpacked
 compile: $(PKG_IPK)
-install:
-       $(IPKG) install $(PKG_IPK)
+install: $(IPKG_STATE_DIR)/info/openvpn.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
index b246a3db33ca60caea58fa243aea87255849331f..69a934bea2672b2d253859f40a4f0a2fa0a507c7 100644 (file)
@@ -37,6 +37,20 @@ ifneq ($(BR2_PACKAGE_PPPSTATS),)
 TARGETS += $(PKG_PPPSTATS)
 endif
 
+INSTALL_TARGETS := $(IPKG_STATE_DIR)/info/ppp.list
+ifeq ($(BR2_PACKAGE_PPP_PPPOE),y)
+INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/ppp-pppoe-plugin.list
+endif
+ifeq ($(BR2_PACKAGE_PPP_RADIUS),y)
+INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/ppp-radius-plugin.list
+endif
+ifeq ($(BR2_PACKAGE_PPPDUMP),y)
+INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/pppdump.list
+endif
+ifeq ($(BR2_PACKAGE_PPPSTATS),y)
+INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/pppstats.list
+endif
+
 $(DL_DIR)/$(PKG_SOURCE_FILE):
        mkdir -p $(DL_DIR)
        $(WGET) -P $(DL_DIR) $(PKG_SOURCE_SITE)/$(PKG_SOURCE_FILE)
@@ -91,6 +105,9 @@ $(PKG_PPP): $(PKG_BUILD_DIR)/pppd/pppd
        cp $(MODULES_DIR)/kernel/drivers/net/bsd_comp.o $(I_PPP)/$(MODULES_SUBDIR)
        $(IPKG_BUILD) $(I_PPP) $(PACKAGE_DIR)
        
+$(IPKG_STATE_DIR)/info/ppp.list: $(PKG_PPP)
+       $(IPKG) install $(PKG_PPP)
+
 $(PKG_PPP_PPPOE_PLUGIN): $(PKG_PPP)
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPP_PPPOE_PLUGIN) control/ppp-pppoe-plugin.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
        mkdir -p $(I_PPP_PPPOE_PLUGIN)/usr/lib/pppd/rp-pppoe
@@ -101,6 +118,9 @@ $(PKG_PPP_PPPOE_PLUGIN): $(PKG_PPP)
        cp $(MODULES_DIR)/kernel/drivers/net/pppo*.o $(I_PPP_PPPOE_PLUGIN)/$(MODULES_SUBDIR)
        $(IPKG_BUILD) $(I_PPP_PPPOE_PLUGIN) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/ppp-pppoe-plugin.list: $(PKG_PPP_PPPOE_PLUGIN)
+       $(IPKG) install $(PKG_PPP_PPPOE_PLUGIN)
+
 $(PKG_PPP_RADIUS_PLUGIN): $(PKG_PPP)
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPP_RADIUS_PLUGIN) control/ppp-radius-plugin.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
        mkdir -p $(I_PPP_RADIUS_PLUGIN)/usr/lib/pppd/radius
@@ -109,6 +129,9 @@ $(PKG_PPP_RADIUS_PLUGIN): $(PKG_PPP)
        $(STRIP) $(I_PPP_RADIUS_PLUGIN)/usr/lib/pppd/*/*.so
        $(IPKG_BUILD) $(I_PPP_RADIUS_PLUGIN) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/ppp-radius-plugin.list: $(PKG_PPP_RADIUS_PLUGIN)
+       $(IPKG) install $(PKG_PPP_RADIUS_PLUGIN)
+
 $(PKG_PPPDUMP): $(PKG_PPP)
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPPDUMP) control/pppdump.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
        mkdir -p $(I_PPPDUMP)/usr/sbin
@@ -116,6 +139,9 @@ $(PKG_PPPDUMP): $(PKG_PPP)
        $(STRIP) $(I_PPPDUMP)/usr/sbin/*
        $(IPKG_BUILD) $(I_PPPDUMP) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/pppdump.list: $(PKG_PPPDUMP)
+       $(IPKG) install $(PKG_PPPDUMP)
+
 $(PKG_PPPSTATS): $(PKG_PPP)
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPPSTATS) control/pppstats.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
        mkdir -p $(I_PPPSTATS)/usr/sbin
@@ -123,24 +149,13 @@ $(PKG_PPPSTATS): $(PKG_PPP)
        $(STRIP) $(I_PPPSTATS)/usr/sbin/*
        $(IPKG_BUILD) $(I_PPPSTATS) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/pppstats.list: $(PKG_PPPSTATS)
+       $(IPKG) install $(PKG_PPPSTATS)
 
 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
 prepare: $(PKG_BUILD_DIR)/.patched
 compile: $(TARGETS)
-install: compile
-       $(IPKG) install $(PKG_PPP)
-ifeq ($(BR2_PACKAGE_PPP_PPPOE),y)
-       $(IPKG) install $(PKG_PPP_PPPOE_PLUGIN)
-endif
-ifeq ($(BR2_PACKAGE_PPP_RADIUS),y)
-       $(IPKG) install $(PKG_PPP_RADIUS_PLUGIN)
-endif
-ifeq ($(BR2_PACKAGE_PPPDUMP),y)
-       $(IPKG) install $(PKG_PPPDUMP)
-endif
-ifeq ($(BR2_PACKAGE_PPPSTATS),y)
-       $(IPKG) install $(PKG_PPPSTATS)
-endif
+install: $(INSTALL_TARGETS)
 
 clean:
        rm -rf $(PKG_BUILD_DIR)
index dcd4e94bb3c2acad7b3217b35d6e97e60a6025d2..a320b15ac67a473fbbe9831e5684e223dfc151ef 100644 (file)
@@ -60,11 +60,14 @@ $(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME)
        mkdir -p $(PACKAGE_DIR)
        $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/pptpd.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
+
 source: $(DL_DIR)/$(PKG_SOURCE)
 prepare: $(PKG_BUILD_DIR)/.unpacked
 compile: $(PKG_IPK)
-install:
-       $(IPKG) install $(PKG_IPK)
+install: $(IPKG_STATE_DIR)/info/pptpd.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
        rm -f $(PKG_IPK)
index 522c1b675c9a95f7de67b45f64ab9b43c4ef36b6..6d9144f16c55f50d0f8fc352efa53f7b673b10ef 100644 (file)
@@ -9,7 +9,7 @@ PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_CAT := zcat
 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
-PKG_IPK := zlib_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+PKG_IPK := $(PACKAGE_DIR)/zlib_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
 
 
 $(DL_DIR)/$(PKG_SOURCE_FILE):
@@ -41,7 +41,7 @@ $(STAGING_DIR)/lib/libz.so: $(PKG_BUILD_DIR)/libz.so
          DESTDIR="$(STAGING_DIR)" \
          install
 
-$(PACKAGE_DIR)/$(PKG_IPK): $(STAGING_DIR)/lib/libz.so
+$(PKG_IPK): $(STAGING_DIR)/lib/libz.so
        mkdir -p $(PACKAGE_DIR)
        $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/zlib zlib.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
        mkdir -p $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib
@@ -49,12 +49,14 @@ $(PACKAGE_DIR)/$(PKG_IPK): $(STAGING_DIR)/lib/libz.so
        $(STRIP) $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib/*
        $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/zlib $(PACKAGE_DIR)
 
+$(IPKG_STATE_DIR)/info/zlib.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
 
 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
 prepare: $(PKG_BUILD_DIR)/.patched
-compile: $(STAGING_DIR)/lib/libz.so $(PACKAGE_DIR)/$(PKG_IPK)
-install: $(PKG_ZLIB)
-       $(IPKG) install $(PACKAGE_DIR)/$(PKG_IPK)
+compile: $(STAGING_DIR)/lib/libz.so $(PKG_IPK)
+install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/zlib.list
+
 clean:
        rm -rf $(PKG_BUILD_DIR)
        rm -f $(STAGING_DIR)/lib/libz* $(STAGING_DIR)/include/zlib*