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.

109 lines
2.7 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:=22.1
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Claudio Leite <leitec@staticky.com>
  12. PKG_LICENSE:=GPL-2.0
  13. PKG_LICENSE_FILES:=COPYING
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:= \
  16. http://ngircd.barton.de/pub/ngircd/ \
  17. ftp://ftp.berlios.de/pub/ngircd/
  18. PKG_MD5SUM:=586c4fef1fbb77dcbe723e9136ec08eb
  19. PKG_INSTALL:=1
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/ngircd/Default
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=Instant Messaging
  26. DEPENDS:=+zlib
  27. TITLE:=Next Generation IRC Server
  28. URL:=http://ngircd.barton.de
  29. endef
  30. define Package/ngircd/Default/description
  31. ngIRCd is an Open Source server for the Internet Relay Chat (IRC), which
  32. is developed and published under the terms of the GNU General Public Licence.
  33. ngIRCd means "next generation IRC daemon", it's written from scratch and
  34. not deduced from the "grandfather of IRC daemons", the daemon of the IRCNet.
  35. endef
  36. define Package/ngircd
  37. $(call Package/ngircd/Default)
  38. TITLE+= (with OpenSSL support)
  39. DEPENDS+= +libopenssl
  40. VARIANT:=ssl
  41. endef
  42. define Package/ngircd/conffiles
  43. /etc/ngircd.conf
  44. endef
  45. define Package/ngircd/description
  46. $(call Package/ngircd/Default/description)
  47. This package is built with OpenSSL support.
  48. endef
  49. define Package/ngircd-nossl
  50. $(call Package/ngircd/Default)
  51. TITLE+= (without OpenSSL support)
  52. VARIANT:=nossl
  53. endef
  54. Package/ngircd-nossl/conffiles = $(Package/ngircd/conffiles)
  55. define Package/ngircd-nossl/description
  56. $(call Package/ngircd/Default/description)
  57. This package is built without OpenSSL support.
  58. endef
  59. ifeq ($(CONFIG_IPV6),y)
  60. CONFIGURE_ARGS += \
  61. --enable-ipv6
  62. endif
  63. ifeq ($(BUILD_VARIANT),ssl)
  64. CONFIGURE_ARGS += \
  65. --with-openssl="$(STAGING_DIR)/usr"
  66. endif
  67. ifeq ($(BUILD_VARIANT),nossl)
  68. CONFIGURE_ARGS += \
  69. --without-openssl
  70. endif
  71. # The test for HAVE_WORKING_GETADDRINFO fails
  72. # when cross-compiling.
  73. #
  74. define Build/Configure
  75. $(call Build/Configure/Default)
  76. $(SED) 's/\/\* #undef HAVE_WORKING_GETADDRINFO \*\//#define HAVE_WORKING_GETADDRINFO 1/' $(PKG_BUILD_DIR)/src/config.h
  77. endef
  78. define Package/ngircd/install
  79. $(INSTALL_DIR) $(1)/usr/sbin
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ngircd $(1)/usr/sbin/
  81. $(INSTALL_DIR) $(1)/etc
  82. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ngircd.conf $(1)/etc/
  83. $(INSTALL_DIR) $(1)/etc/init.d
  84. $(INSTALL_BIN) ./files/ngircd.init $(1)/etc/init.d/ngircd
  85. endef
  86. Package/ngircd-nossl/install = $(Package/ngircd/install)
  87. $(eval $(call BuildPackage,ngircd))
  88. $(eval $(call BuildPackage,ngircd-nossl))