add pwgen package (closes: #1276)
[openwrt/svn-archive/archive.git] / ipv6 / dhcp6 / Makefile
index f472b83..6dafeef 100644 (file)
@@ -15,9 +15,9 @@ PKG_RELEASE:=1
 PKG_SOURCE:=dhcpv6-linux-$(PKG_VERSION).zip
 PKG_SOURCE_URL:=@SF/dhcpv6-linux
 PKG_MD5SUM:=86193dfa62137db3ea459543db4f1102
-PKG_CAT:=unzip
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_UNPACK:=unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE)
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -49,6 +49,12 @@ define Package/dhcp6-server/conffiles
 /etc/dhcpd6/partial_leases6.conf
 endef
 
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       # prevent package from rebuilding
+       find $(PKG_BUILD_DIR) | xargs touch
+endef
+
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)/client \
                CC="$(TARGET_CC)" \
@@ -61,15 +67,15 @@ define Build/Compile
 endef
 
 define Package/dhcp6-client/install
-       install -d $(1)/usr/sbin $(1)/etc/dhcp6
-       install -m0755 $(PKG_BUILD_DIR)/client/cli $(1)/usr/sbin/dhcp6client
-       install -m0755 $(PKG_BUILD_DIR)/client/solicit.conf $(1)/etc/dhcp6/
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/dhcp6
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/client/cli $(1)/usr/sbin/dhcp6client
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/client/solicit.conf $(1)/etc/dhcp6/
 endef
 
 define Package/dhcp6-server/install
-       install -d -m0755 $(1)/usr/sbin $(1)/etc/dhcpd6
-       install -m0755 $(PKG_BUILD_DIR)/server/serv $(1)/usr/sbin/dhcpd6
-       install -m0755 $(PKG_BUILD_DIR)/server/*.conf $(1)/etc/dhcpd6/
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/dhcpd6
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/serv $(1)/usr/sbin/dhcpd6
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/*.conf $(1)/etc/dhcpd6/
 endef
 
 $(eval $(call BuildPackage,dhcp6-client))