replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / net / miau / Makefile
index b14efc1..78b84a6 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=miau
 PKG_VERSION:=0.6.0.2
 PKG_RELEASE:=1
-PKG_MD5SUM:=1b78d219a03655399c165eeb021cddd8
 
-PKG_SOURCE_URL:= @SF/miau
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/miau
+PKG_MD5SUM:=1b78d219a03655399c165eeb021cddd8
 PKG_CAT:=zcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -26,41 +26,39 @@ define Package/miau
   SECTION:=net
   CATEGORY:=Network
   TITLE:=Another IRC-bouncer/proxy
-  DESCRIPTION:=In short, miau is an IRC-bouncer/proxy.\\\
-Being more verbose, miau is small but quite featured\\\
-IRC-bouncer - a service bit like HTTP-proxy, but\\\
-for IRC-networks.\\\
+  DESCRIPTION:=\
+       In short, miau is an IRC-bouncer/proxy.\\\
+       Being more verbose, miau is small but quite featured \\\
+       IRC-bouncer - a service bit like HTTP-proxy, but \\\
+       for IRC-networks.
   URL:=http://sourceforge.net/projects/miau/
 endef
 
 define Build/Configure
-$(call Build/Configure/Default,--enable-automode \
---enable-releasenick \
---enable-uptime \
---enable-privlog \
---enable-onconnect,ac_cv_func_malloc_0_nonnull=yes \
-ac_cv_func_realloc_0_nonnull=yes)
+       $(call Build/Configure/Default, \
+               --enable-automode \
+               --enable-releasenick \
+               --enable-uptime \
+               --enable-privlog \
+               --enable-onconnect \
+       )
 endef
 
-
 define Build/Compile   
-       rm -rf $(PKG_INSTALL_DIR)
-       mkdir -p $(PKG_INSTALL_DIR)
        $(MAKE) -C $(PKG_BUILD_DIR) \
-               CC=$(TARGET_CC) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               install
+               all install
 endef
 
 define Package/miau/install    
-       install -d -m0755 $(1)/usr/bin          
+       $(INSTALL_DIR) $(1)/usr/bin     
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
-       install -d -m0755 $(1)/etc/init.d
-       install -d -m0755 $(1)/etc/default
-       install -d -m0755 $(1)/etc/miau
-       install -m0755 ./files/S50miau $(1)/etc/init.d/S50miau
-       install -m0644 ./files/miau $(1)/etc/default/miau
-       install -m0644 ./files/miaurc $(1)/etc/miau/miaurc
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_DIR) $(1)/etc/default
+       $(INSTALL_DIR) $(1)/etc/miau
+       $(INSTALL_BIN) ./files/miau.init $(1)/etc/init.d/miau
+       $(INSTALL_DATA) ./files/miau $(1)/etc/default/miau
+       $(INSTALL_DATA) ./files/miaurc $(1)/etc/miau/miaurc
 endef
 
 $(eval $(call BuildPackage,miau))