1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 04:14:01 +02:00
openwrt-packages/net/wget/Makefile
Jeffery To 53e1692ae9 treewide: Use default PKG_BUILD_DIR when possible
This removes lines that set PKG_BUILD_DIR when the set value is no
different from the default value.

Specifically, the line is removed if the assigned value is:

* $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)

  The default PKG_BUILD_DIR was updated[1] to incorporate BUILD_VARIANT
  if it is set, so now this is identical to the default value.

* $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)

  if PKG_SOURCE_SUBDIR is set to $(PKG_NAME)-$(PKG_VERSION), making it
  the same as the previous case

* $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

  This is the same as the default PKG_BUILD_DIR when there is no
  BUILD_VARIANT.

* $(BUILD_DIR)/[name]-$(PKG_VERSION)

  where [name] is a string that is identical to PKG_NAME

[1]: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=e545fac8d968864a965edb9e50c6f90940b0a6c9

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-10-13 02:01:34 +08:00

109 lines
2.6 KiB
Makefile

#
# Copyright (C) 2007-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=wget
PKG_VERSION:=1.20.3
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_HASH:=31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e
PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:gnu:wget
include $(INCLUDE_DIR)/package.mk
define Package/wget/Default
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libpcre +zlib
SUBMENU:=File Transfer
TITLE:=Non-interactive network downloader
URL:=https://www.gnu.org/software/wget/index.html
PROVIDES:=wget
endef
define Package/wget/Default/description
Wget is a network utility to retrieve files from the Web using http
and ftp, the two most widely used Internet protocols. It works
non-interactively, so it will work in the background, after having
logged off. The program supports recursive retrieval of web-authoring
pages as well as ftp sites -- you can use wget to make mirrors of
archives and home pages or to travel the Web like a WWW robot.
endef
define Package/wget
$(call Package/wget/Default)
DEPENDS+= +libopenssl +librt
TITLE+= (with SSL support)
VARIANT:=ssl
PROVIDES+=gnu-wget
ALTERNATIVES:=300:/usr/bin/wget:/usr/bin/wget-ssl
endef
define Package/wget/description
$(call Package/wget/Default/description)
This package is built with SSL support.
endef
define Package/wget-nossl
$(call Package/wget/Default)
TITLE+= (without SSL support)
VARIANT:=nossl
PROVIDES+=gnu-wget
ALTERNATIVES:=300:/usr/bin/wget:/usr/bin/wget-nossl
endef
define Package/wget-nossl/description
$(call Package/wget/Default/description)
This package is built without SSL support.
endef
CONFIGURE_ARGS+= \
--disable-rpath \
--disable-iri \
--disable-pcre2 \
--with-included-libunistring \
--without-libuuid \
--without-libpsl
CONFIGURE_VARS += \
ac_cv_header_uuid_uuid_h=no
ifeq ($(BUILD_VARIANT),ssl)
CONFIGURE_ARGS+= \
--with-ssl=openssl \
--with-libssl-prefix="$(STAGING_DIR)/usr"
CONFIGURE_VARS += \
ac_cv_libssl=yes
endif
ifeq ($(BUILD_VARIANT),nossl)
CONFIGURE_ARGS+= \
--disable-ntlm \
--without-ssl
endif
define Package/wget/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-ssl
endef
define Package/wget-nossl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-nossl
endef
$(eval $(call BuildPackage,wget))
$(eval $(call BuildPackage,wget-nossl))