diff --git a/utils/whois/Makefile b/utils/whois/Makefile new file mode 100644 index 000000000..60d5e389e --- /dev/null +++ b/utils/whois/Makefile @@ -0,0 +1,48 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=whois +PKG_VERSION:=5.5.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/w/whois +PKG_HASH:=3efa700dbf38d127c31b21af3176cd6e5a69f96a056be60ac1dcd13df7717393 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_BUILD_DEPENDS:=perl/host + +PKG_MAINTAINER:=Paul Spooren +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/whois + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Intelligent WHOIS client + URL:=https://github.com/rfc1036/whois +endef + +define Package/whois/description +This client is intelligent and can automatically select the appropriate whois +server for most queries. + +The internal database is often more accurate than IANA's published one, but +please send me any information you have regarding domains and network resources +which are not correctly handled by the program. +endef + +EXTRA_CFLAGS+=-DHAVE_GETOPT_LONG +MAKE_FLAGS += PERL=$(STAGING_DIR_HOSTPKG)/usr/bin/perl + +define Package/whois/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/whois $(1)/usr/bin/whois +endef + +$(eval $(call BuildPackage,whois)) diff --git a/utils/whois/patches/010-no-crypt.patch b/utils/whois/patches/010-no-crypt.patch new file mode 100644 index 000000000..ba6a40f6a --- /dev/null +++ b/utils/whois/patches/010-no-crypt.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -56,8 +56,6 @@ DEFS += -DHAVE_ICONV + endif + + ifeq ($(shell $(PKG_CONFIG) --exists 'libxcrypt >= 4.1' || echo NO),) +-DEFS += -DHAVE_CRYPT_H -DHAVE_LINUX_CRYPT_GENSALT $(shell $(PKG_CONFIG) --cflags libcrypt) +-mkpasswd_LDADD += $(shell $(PKG_CONFIG) --libs libcrypt) + else ifdef HAVE_XCRYPT + DEFS += -DHAVE_XCRYPT_H -DHAVE_LINUX_CRYPT_GENSALT + mkpasswd_LDADD += -lxcrypt diff --git a/utils/whois/patches/020-no-idn2.patch b/utils/whois/patches/020-no-idn2.patch new file mode 100644 index 000000000..e65ba6c00 --- /dev/null +++ b/utils/whois/patches/020-no-idn2.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -43,8 +43,6 @@ $(error Please fix your build system to stop defining HAVE_LIBIDN!) + endif + + ifeq ($(shell $(PKG_CONFIG) --exists 'libidn2 >= 2.0.3' || echo NO),) +-whois_LDADD += $(shell $(PKG_CONFIG) --libs libidn2) +-DEFS += -DHAVE_LIBIDN2 $(shell $(PKG_CONFIG) --cflags libidn2) + else ifeq ($(shell $(PKG_CONFIG) --exists 'libidn' || echo NO),) + whois_LDADD += $(shell $(PKG_CONFIG) --libs libidn) + DEFS += -DHAVE_LIBIDN $(shell $(PKG_CONFIG) --cflags libidn) diff --git a/utils/whois/patches/030-no-mkpasswd.patch b/utils/whois/patches/030-no-mkpasswd.patch new file mode 100644 index 000000000..bdaa41a04 --- /dev/null +++ b/utils/whois/patches/030-no-mkpasswd.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -72,7 +72,7 @@ endif + CPPFLAGS += $(DEFS) $(INCLUDES) + + ############################################################################## +-all: Makefile.depend whois mkpasswd pos ++all: Makefile.depend whois pos + + ############################################################################## + %.o: %.c diff --git a/utils/whois/test.sh b/utils/whois/test.sh new file mode 100644 index 000000000..8d7455c3f --- /dev/null +++ b/utils/whois/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +whois --version | grep "$2"