replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / net / tftp-hpa / Makefile
index 2607d572b182af648fc8659f72b6cd9ba2f3f7dc..e74f19b1555f2dbfdb9f8f4fe8aed54b6ad8a1f8 100644 (file)
@@ -21,22 +21,27 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 
+define Package/tftp-hpa/Default
+  SECTION:=net
+  CATEGORY:=Network
+  URL:=http://www.kernel.org/pub/software/network/tftp
+endef
+
 define Package/tftp-hpa
- SECTION:=net
- CATEGORY:=Network
- TITLE:=tftp-hpa is an enhanced version of the BSD TFTP client
- URL:=http://www.kernel.org/pub/software/network/tftp
+  $(call Package/tftp-hpa/Default)
+  TITLE:=An enhanced version of the BSD TFTP client
 endef
 
 define Package/tftpd-hpa
- SECTION:=net
- CATEGORY:=Network
- TITLE:=tftp-hpa is an enhanced version of the BSD TFTP server
- URL:=http://www.kernel.org/pub/software/network/tftp
+  $(call Package/tftp-hpa/Default)
+  TITLE:=An enhanced version of the BSD TFTP server
 endef
 
 define Build/Configure 
-       $(call Build/Configure/Default)
+       $(call Build/Configure/Default, \
+               , \
+               CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
+       )
 endef
 
 define Build/Compile   
@@ -44,15 +49,15 @@ define Build/Compile
 endef
 
 define Package/tftp-hpa/install        
-       install -d -m0755 $(1)/usr/bin
-       install -m0755 $(PKG_BUILD_DIR)/tftp/tftp $(1)/usr/bin/tftp-hpa
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tftp/tftp $(1)/usr/bin/tftp-hpa
 endef
 
 define Package/tftpd-hpa/install
-       install -d -m0755 $(1)/usr/sbin
-       install -m0755 $(PKG_BUILD_DIR)/tftpd/tftpd $(1)/usr/sbin/tftpd-hpa
-       install -d -m0755 $(1)/etc/init.d
-       install -m0755 ./files/tftpd-hpa.init $(1)/etc/init.d/tftpd-hpa
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tftpd/tftpd $(1)/usr/sbin/tftpd-hpa
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/tftpd-hpa.init $(1)/etc/init.d/tftpd-hpa
 endef
 
 $(eval $(call BuildPackage,tftp-hpa))