axel: convert to gentargets and bump to 2.4
authorMartin Banky <martin.banky@gmail.com>
Sun, 26 Sep 2010 07:13:53 +0000 (00:13 -0700)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 26 Sep 2010 21:11:43 +0000 (23:11 +0200)
[Peter: fix build with locale, pass LDFLAGS, simplify install]
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/axel/Config.in
package/axel/axel.mk

diff --git a/CHANGES b/CHANGES
index 33299a02917679fef4625b5f32a2fc38394d8472..b01da23376d10d4e4935691b2c3c92e789391932 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -17,8 +17,8 @@
 
        New packages: xz
 
-       Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
-       bmon, boa, bridge-utils, bsdiff, busybox, dbus, dmraid,
+       Updated/fixed packages: alsa-lib, at, avahi, axel, berkeleydb,
+       bind, bmon, boa, bridge-utils, bsdiff, busybox, dbus, dmraid,
        docker, dosfstools, dropbear, e2fsprogs, expat, ezxml, fbset,
        freetype, gawk, gvfs, haserl, hostapd, hwdata, ifplugd, iperf,
        iproute2, iptables, jpeg, kexec, kismet, less, libcurl,
index c706d4c2c1d1b3044fa20995fe8c3290b9fa4a0d..cb9af322bed8766b5f7bffac7d163a48788a5c7a 100644 (file)
@@ -1,5 +1,7 @@
 config BR2_PACKAGE_AXEL
        bool "axel"
+       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+       select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
        help
          HTTP/FTP download accelerator.
 
index 88917959c0e831bb714176128c1335e38df2faba..1bf4d813f28e8295639483d1b92886b59fb6c381 100644 (file)
@@ -3,53 +3,45 @@
 # axel
 #
 #############################################################
-AXEL_VERSION:=1.1
-AXEL_SOURCE:=axel-$(AXEL_VERSION).tar.gz
-AXEL_SITE:=http://alioth.debian.org/frs/download.php/2287
-AXEL_CAT:=$(ZCAT)
-AXEL_DIR:=$(BUILD_DIR)/axel-$(AXEL_VERSION)
-AXEL_BINARY:=axel
-AXEL_TARGET_BINARY:=usr/bin/axel
-
-$(DL_DIR)/$(AXEL_SOURCE):
-        $(call DOWNLOAD,$(AXEL_SITE),$(AXEL_SOURCE))
-
-axel-source: $(DL_DIR)/$(AXEL_SOURCE)
-
-$(AXEL_DIR)/.unpacked: $(DL_DIR)/$(AXEL_SOURCE)
-       $(AXEL_CAT) $(DL_DIR)/$(AXEL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-       #toolchain/patch-kernel.sh $(AXEL_DIR) package/axel axel\*.patch
-       touch $@
-
-$(AXEL_DIR)/Makefile.settings: $(AXEL_DIR)/.unpacked
-       (cd $(AXEL_DIR); \
-               ./configure --i18n=0 --prefix=/usr \
-       )
-       touch $@
+AXEL_VERSION = 2.4
+AXEL_SOURCE = axel-$(AXEL_VERSION).tar.gz
+AXEL_SITE = https://alioth.debian.org/frs/download.php/3015
 
-$(AXEL_DIR)/$(AXEL_BINARY): $(AXEL_DIR)/Makefile.settings
-       $(MAKE) CC="$(TARGET_CC)" STRIP="$(TARGET_STRIP)" -C $(AXEL_DIR)
+AXEL_LDFLAGS = -lpthread
 
-$(TARGET_DIR)/$(AXEL_TARGET_BINARY): $(AXEL_DIR)/$(AXEL_BINARY)
-       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(AXEL_DIR) install-bin
-ifeq ($(BR2_HAVE_DOCUMENTATION),y)
-       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(AXEL_DIR) install-man
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+AXEL_DEPENDENCIES += gettext libintl
+AXEL_LDFLAGS += -lintl
 endif
 
-axel: $(TARGET_DIR)/$(AXEL_TARGET_BINARY)
+ifneq ($(BR2_ENABLE_LOCALE),y)
+AXEL_DISABLE_I18N=--i18n=0
+endif
 
-axel-clean:
-       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(AXEL_DIR) uninstall
-       -$(MAKE) -C $(AXEL_DIR) clean
+define AXEL_CONFIGURE_CMDS
+       (cd $(@D); \
+               ./configure \
+                       --prefix=/usr \
+                       --debug=1 \
+                       $(AXEL_DISABLE_I18N) \
+       )
+endef
 
-axel-dirclean:
-       rm -rf $(AXEL_DIR)
+define AXEL_BUILD_CMDS
+       $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+       LFLAGS="$(TARGET_LDFLAGS) $(AXEL_LDFLAGS)" -C $(@D)
+endef
 
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_AXEL),y)
-TARGETS+=axel
-endif
+define AXEL_INSTALL_TARGET_CMDS
+       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
+
+define AXEL_UNINSTALL_TARGET_CMDS
+       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
+endef
+
+define AXEL_CLEAN_CMDS
+       -$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(call GENTARGETS,package,axel))