wol: Cleanup Makefile
authorOliver Ertl <oliver@ertl-net.net>
Wed, 19 Sep 2007 16:00:24 +0000 (16:00 +0000)
committerOliver Ertl <oliver@ertl-net.net>
Wed, 19 Sep 2007 16:00:24 +0000 (16:00 +0000)
SVN-Revision: 8843

net/wol/Makefile

index 91856a5c7b417029792d348a39e11c7cb0c9cc4f..fe8616cdcd297dcc89a6d06add6d3bd506ee80b8 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -11,14 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=wol
 PKG_VERSION:=0.7.1
 PKG_RELEASE:=1
-PKG_MD5SUM:=c2fa9d7e771134ac8c89d56b8197d4ca
 
 PKG_SOURCE_URL:=@SF/ahh
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_MD5SUM:=c2fa9d7e771134ac8c89d56b8197d4ca
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -26,58 +22,24 @@ define Package/wol
   SECTION:=net
   CATEGORY:=Network
   TITLE:=Wake On LAN client
-  DESCRIPTION:=\
-       wol implements Wake On LAN functionality in a small program.\
-       It wakes up hardware that is Magic Packet compliant.
   URL:=http://ahh.sourceforge.net/wol/
 endef
 
-
-define Build/Configure
-       (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
-               $(TARGET_CONFIGURE_OPTS) \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               ./configure \
-                 ac_cv_func_malloc_0_nonnull=yes \
-                 ac_cv_func_realloc_0_nonnull=yes \
-                 ac_cv_func_mmap_fixed_mapped=yes \
-                 jm_cv_func_working_malloc=yes \
-                 ac_cv_func_alloca_works=yes \
-                 --target=$(GNU_TARGET_NAME) \
-                 --host=$(GNU_TARGET_NAME) \
-                 --build=$(GNU_HOST_NAME) \
-                 --program-prefix="" \
-                 --program-suffix="" \
-                 --prefix=/usr \
-                 --exec-prefix=/usr \
-                 --bindir=/usr/bin \
-                 --datadir=/usr/share \
-                 --includedir=/usr/include \
-                 --infodir=/usr/share/info \
-                 --libdir=/usr/lib \
-                 --libexecdir=/usr/lib \
-                 --localstatedir=/var \
-                 --mandir=/usr/share/man \
-                 --sbindir=/usr/sbin \
-                 --sysconfdir=/etc \
-                 $(DISABLE_NLS) \
-                 $(DISABLE_LARGEFILE) \
-       );
+define Package/wol/description
+ wol implements Wake On LAN functionality in a small program.
+ It wakes up hardware that is Magic Packet compliant.
 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)" \
-               all install
-endef
+CONFIGURE_VARS += \
+       ac_cv_func_malloc_0_nonnull=yes \
+       ac_cv_func_realloc_0_nonnull=yes \
+       ac_cv_func_mmap_fixed_mapped=yes \
+       jm_cv_func_working_malloc=yes \
+       ac_cv_func_alloca_works=yes \
 
 define Package/wol/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/wol $(1)/usr/bin/
-       $(RSTRIP) $(1)
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,wol))