You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2008-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=ngircd
  9. PKG_VERSION:=25
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://ngircd.barton.de/pub/ngircd
  13. PKG_HASH:=c4997cae3e3dd6ff6a605ca274268f2b8c9ba0b1a96792c7402e5594222eee4e
  14. PKG_MAINTAINER:=
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:ngircd:ngircd
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/ngircd/Default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=Instant Messaging
  25. DEPENDS:=+zlib
  26. TITLE:=Next Generation IRC Server
  27. URL:=https://ngircd.barton.de
  28. endef
  29. define Package/ngircd/Default/description
  30. ngIRCd is an Open Source server for the Internet Relay Chat (IRC), which
  31. is developed and published under the terms of the GNU General Public Licence.
  32. ngIRCd means "next generation IRC daemon", it's written from scratch and
  33. not deduced from the "grandfather of IRC daemons", the daemon of the IRCNet.
  34. endef
  35. define Package/ngircd
  36. $(call Package/ngircd/Default)
  37. TITLE+= (with OpenSSL support)
  38. DEPENDS+= +libopenssl
  39. VARIANT:=ssl
  40. endef
  41. define Package/ngircd/conffiles
  42. /etc/ngircd.conf
  43. endef
  44. define Package/ngircd/description
  45. $(call Package/ngircd/Default/description)
  46. This package is built with OpenSSL support.
  47. endef
  48. define Package/ngircd-nossl
  49. $(call Package/ngircd/Default)
  50. TITLE+= (without OpenSSL support)
  51. VARIANT:=nossl
  52. endef
  53. Package/ngircd-nossl/conffiles = $(Package/ngircd/conffiles)
  54. define Package/ngircd-nossl/description
  55. $(call Package/ngircd/Default/description)
  56. This package is built without OpenSSL support.
  57. endef
  58. ifeq ($(CONFIG_IPV6),y)
  59. CONFIGURE_ARGS += \
  60. --enable-ipv6
  61. endif
  62. ifeq ($(BUILD_VARIANT),ssl)
  63. CONFIGURE_ARGS += \
  64. --with-openssl="$(STAGING_DIR)/usr"
  65. endif
  66. ifeq ($(BUILD_VARIANT),nossl)
  67. CONFIGURE_ARGS += \
  68. --without-openssl
  69. endif
  70. # The test for HAVE_WORKING_GETADDRINFO fails
  71. # when cross-compiling.
  72. #
  73. define Build/Configure
  74. $(call Build/Configure/Default)
  75. $(SED) 's/\/\* #undef HAVE_WORKING_GETADDRINFO \*\//#define HAVE_WORKING_GETADDRINFO 1/' $(PKG_BUILD_DIR)/src/config.h
  76. endef
  77. define Package/ngircd/install
  78. $(INSTALL_DIR) $(1)/usr/sbin
  79. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ngircd $(1)/usr/sbin/
  80. $(INSTALL_DIR) $(1)/etc
  81. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ngircd.conf $(1)/etc/
  82. $(INSTALL_DIR) $(1)/etc/init.d
  83. $(INSTALL_BIN) ./files/ngircd.init $(1)/etc/init.d/ngircd
  84. endef
  85. Package/ngircd-nossl/install = $(Package/ngircd/install)
  86. $(eval $(call BuildPackage,ngircd))
  87. $(eval $(call BuildPackage,ngircd-nossl))