Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / net / ngircd / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ngircd
11 PKG_VERSION:=26
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=https://ngircd.barton.de/pub/ngircd
16 PKG_HASH:=56dcc6483058699fcdd8e54f5010eecee09824b93bad7ed5f18818e550d855c6
17
18 PKG_MAINTAINER:=
19 PKG_LICENSE:=GPL-2.0
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:ngircd:ngircd
22
23 PKG_BUILD_PARALLEL:=1
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/ngircd/Default
29 SECTION:=net
30 CATEGORY:=Network
31 SUBMENU:=Instant Messaging
32 DEPENDS:=+zlib
33 TITLE:=Next Generation IRC Server
34 URL:=https://ngircd.barton.de
35 endef
36
37 define Package/ngircd/Default/description
38 ngIRCd is an Open Source server for the Internet Relay Chat (IRC), which
39 is developed and published under the terms of the GNU General Public Licence.
40 ngIRCd means "next generation IRC daemon", it's written from scratch and
41 not deduced from the "grandfather of IRC daemons", the daemon of the IRCNet.
42 endef
43
44 define Package/ngircd
45 $(call Package/ngircd/Default)
46 TITLE+= (with OpenSSL support)
47 DEPENDS+= +libopenssl
48 VARIANT:=ssl
49 endef
50
51 define Package/ngircd/conffiles
52 /etc/ngircd.conf
53 endef
54
55 define Package/ngircd/description
56 $(call Package/ngircd/Default/description)
57 This package is built with OpenSSL support.
58 endef
59
60 define Package/ngircd-nossl
61 $(call Package/ngircd/Default)
62 TITLE+= (without OpenSSL support)
63 VARIANT:=nossl
64 endef
65
66 Package/ngircd-nossl/conffiles = $(Package/ngircd/conffiles)
67
68 define Package/ngircd-nossl/description
69 $(call Package/ngircd/Default/description)
70 This package is built without OpenSSL support.
71 endef
72
73 ifeq ($(CONFIG_IPV6),y)
74 CONFIGURE_ARGS += \
75 --enable-ipv6
76 endif
77
78 ifeq ($(BUILD_VARIANT),ssl)
79 CONFIGURE_ARGS += \
80 --with-openssl="$(STAGING_DIR)/usr"
81 endif
82
83 ifeq ($(BUILD_VARIANT),nossl)
84 CONFIGURE_ARGS += \
85 --without-openssl
86 endif
87
88 # The test for HAVE_WORKING_GETADDRINFO fails
89 # when cross-compiling.
90 #
91 define Build/Configure
92 $(call Build/Configure/Default)
93 $(SED) 's/\/\* #undef HAVE_WORKING_GETADDRINFO \*\//#define HAVE_WORKING_GETADDRINFO 1/' $(PKG_BUILD_DIR)/src/config.h
94 endef
95
96 define Package/ngircd/install
97 $(INSTALL_DIR) $(1)/usr/sbin
98 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ngircd $(1)/usr/sbin/
99 $(INSTALL_DIR) $(1)/etc
100 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ngircd.conf $(1)/etc/
101 $(INSTALL_DIR) $(1)/etc/init.d
102 $(INSTALL_BIN) ./files/ngircd.init $(1)/etc/init.d/ngircd
103 endef
104
105 Package/ngircd-nossl/install = $(Package/ngircd/install)
106
107 $(eval $(call BuildPackage,ngircd))
108 $(eval $(call BuildPackage,ngircd-nossl))