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.

290 lines
8.7 KiB

  1. #
  2. # Copyright (C) 2009-2010 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:=znc
  9. PKG_VERSION:=1.8.2
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://znc.in/releases \
  13. https://znc.in/releases/archive
  14. PKG_HASH:=ff238aae3f2ae0e44e683c4aee17dc8e4fdd261ca9379d83b48a7d422488de0d
  15. PKG_MAINTAINER:=Jonas Gorski <jonas.gorski@gmail.com>
  16. PKG_LICENSE:=Apache-2.0
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_CPE_ID:=cpe:/a:znc:znc
  19. PKG_USE_MIPS16:=0
  20. PKG_CONFIG_DEPENDS:= CONFIG_ZNC_ICU
  21. define Package/znc/default
  22. SUBMENU:=Instant Messaging
  23. SECTION:=net
  24. CATEGORY:=Network
  25. TITLE:=ZNC
  26. URL:=https://znc.in/
  27. USERID:=znc:znc
  28. endef
  29. define Package/znc
  30. $(Package/znc/default)
  31. DEPENDS:=+libopenssl +libstdcpp +ZNC_ICU:icu +zlib
  32. MENU:=1
  33. endef
  34. define Package/znc/description
  35. ZNC is an IRC bouncer with many advanced features like detaching,
  36. multiple users, per channel playback buffer, SSL, IPv6, transparent DCC
  37. bouncing, and c++ module support to name a few.
  38. endef
  39. define Package/znc/config
  40. source "$(SOURCE)/Config.in"
  41. endef
  42. define Package/znc/conffiles
  43. /etc/config/znc
  44. endef
  45. define Package/znc/install
  46. $(INSTALL_DIR) $(1)/usr/bin
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/znc $(1)/usr/bin/
  48. $(INSTALL_DIR) $(1)/etc/init.d
  49. $(INSTALL_BIN) ./files/znc.init $(1)/etc/init.d/znc
  50. $(INSTALL_DIR) $(1)/etc/config
  51. $(INSTALL_DATA) ./files/znc.conf $(1)/etc/config/znc
  52. $(INSTALL_DIR) $(1)/usr/lib/znc/
  53. endef
  54. ZNC_MODULES :=
  55. ZNC_MODULE_TARGETS :=
  56. define module
  57. define Package/znc-mod-$(strip $(1))
  58. $(Package/znc/default)
  59. TITLE+= ($(strip $(1)) plugin)
  60. DEPENDS:=znc
  61. endef
  62. define Package/znc-mod-$(strip $(1))/description
  63. $(strip $(2))
  64. endef
  65. define Package/znc-mod-$(strip $(1))/install
  66. $(INSTALL_DIR) $$(1)/usr/lib/znc/
  67. $(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/lib/znc/$(subst -,_,$(strip $(1))).so $$(1)/usr/lib/znc/
  68. # include webadmin page templates if existing
  69. if [ -d $$(PKG_INSTALL_DIR)/usr/share/znc/modules/$(subst -,_,$(strip $(1))) ]; then \
  70. $(INSTALL_DIR) $$(1)/usr/share/znc/modules ;\
  71. $(CP) $$(PKG_INSTALL_DIR)/usr/share/znc/modules/$(subst -,_,$(strip $(1))) $$(1)/usr/share/znc/modules ;\
  72. fi
  73. endef
  74. ZNC_MODULES += znc-mod-$(strip $(1))
  75. $(if $(CONFIG_PACKAGE_znc-mod-$(strip $(1))),ZNC_MODULE_TARGETS += $(subst -,_,$(strip $(1))).so)
  76. endef
  77. define webadmin
  78. define Package/znc-mod-webadmin
  79. $(Package/znc/default)
  80. TITLE+= (webadmin plugin)
  81. DEPENDS:=znc
  82. endef
  83. define Package/znc-mod-webadmin/description
  84. Allows you to add/remove/edit users and settings on the fly via a web browser.
  85. endef
  86. define Package/znc-mod-webadmin/install
  87. $(INSTALL_DIR) $$(1)/usr/lib/znc/
  88. $(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/lib/znc/webadmin.so $$(1)/usr/lib/znc/
  89. $(INSTALL_DIR) $$(1)/usr/share/znc/modules
  90. $(CP) $$(PKG_INSTALL_DIR)/usr/share/znc/modules/webadmin $$(1)/usr/share/znc/modules
  91. $(INSTALL_DIR) $$(1)/usr/share/znc/webskins/
  92. $(CP) $$(PKG_INSTALL_DIR)/usr/share/znc/webskins/_default_ $$(1)/usr/share/znc/webskins/
  93. endef
  94. ZNC_MODULES += znc-mod-webadmin
  95. $(if $(CONFIG_PACKAGE_znc-mod-webadmin),ZNC_MODULE_TARGETS += webadmin.so)
  96. endef
  97. define webskin
  98. define Package/znc-webskin-$(strip $(1))
  99. $(Package/znc/default)
  100. TITLE+= ($(strip $(1)) webskin)
  101. DEPENDS:=znc-mod-webadmin
  102. endef
  103. define Package/znc-webskin-$(strip $(1))/description
  104. $(strip $(1)) webskin for webadmin
  105. endef
  106. define Package/znc-webskin-$(strip $(1))/install
  107. $(INSTALL_DIR) $$(1)/usr/share/znc/webskins/
  108. $(CP) $$(PKG_INSTALL_DIR)/usr/share/znc/webskins/$(strip $(1)) $$(1)/usr/share/znc/webskins/
  109. endef
  110. ZNC_MODULES += znc-webskin-$(strip $(1))
  111. endef
  112. , := ,
  113. $(eval $(call module,adminlog,Log user connects and disconnects and failed \
  114. logins to file or syslog.))
  115. $(eval $(call module,alias,Provides bouncer-side command alias support.))
  116. $(eval $(call module,autoattach,Reattaches you to channels on activity.))
  117. $(eval $(call module,autocycle,Cycles a channel when you are the only one in \
  118. there and you don't have op.))
  119. $(eval $(call module,autoop,Auto op the good guys.))
  120. $(eval $(call module,autoreply,Gives a automatic reply if someone messages you \
  121. if you are away.))
  122. $(eval $(call module,autovoice,Autovoices everyone who joins some channel.))
  123. $(eval $(call module,awaynick,Change your nick while you are away.))
  124. $(eval $(call module,awaystore,Stores messages while away$(,) also auto away.))
  125. $(eval $(call module,block-motd,This module blocks the server's Message of the \
  126. Day.))
  127. $(eval $(call module,blockuser,Blocks certain users from using ZNC saying \
  128. their account was disabled.))
  129. $(eval $(call module,bouncedcc,Bounces dcc transfers through the znc server \
  130. instead of sending them directly to the user.))
  131. $(eval $(call module,buffextras,Add nick changes$(,) joins$(,) parts$(,) topic \
  132. changes etc. to your playback buffer.))
  133. $(eval $(call module,cert,Use a SSL certificate for connecting to a server.))
  134. $(eval $(call module,certauth,This module allows users to log in to ZNC via \
  135. SSL client keys.))
  136. $(eval $(call module,chansaver,Keeping config up to date when user joins and \
  137. parts.))
  138. $(eval $(call module,clearbufferonmsg,This module keeps the buffer until the \
  139. next message from the client.))
  140. $(eval $(call module,clientnotify,Notify about new incoming connections to \
  141. your user.))
  142. $(eval $(call module,controlpanel,Allows you to add/remove/edit users and \
  143. settings on the fly via IRC messages.))
  144. $(eval $(call module,crypt,Encryption for channel/private messages.))
  145. $(eval $(call module,ctcpflood,This module tries to block ctcp floods.))
  146. $(eval $(call module,dcc,Allows you to transfer files to and from ZNC.))
  147. $(eval $(call module,disconkick,This module will kick your client from all \
  148. channels where you are$(,) in case if ZNC disconnects from server.))
  149. $(eval $(call module,fail2ban,Block IPs for some time after a failed login.))
  150. $(eval $(call module,flooddetach,This module detaches you from channels which \
  151. are flooded.))
  152. $(eval $(call module,identfile,Places the ident of a user to a file when they \
  153. are trying to connect.))
  154. $(eval $(call module,imapauth,Allow users to authenticate via IMAP.))
  155. $(eval $(call module,keepnick,Tries to get you your primary nick.))
  156. $(eval $(call module,kickrejoin,Implements auto-rejoin-on-kick.))
  157. $(eval $(call module,lastseen,Logs when a user last logged in to ZNC.))
  158. $(eval $(call module,listsockets,This module displays a list of all open \
  159. sockets in ZNC.))
  160. $(eval $(call module,log,Log conversations to file.))
  161. $(eval $(call module,missingmotd,Sends 422 to clients when they login.))
  162. $(eval $(call module,modules_online,This module fakes the online status of \
  163. ZNC-*users.))
  164. $(eval $(call module,nickserv,Auths you with NickServ.))
  165. $(eval $(call module,notes,This modules stores and displays short notes using \
  166. a key/note pairs and shows them to you on connect.))
  167. $(eval $(call module,notify-connect,Sends a notice to all admins when a user \
  168. logs in or out.))
  169. $(eval $(call module,perform,Performs commands on connect.))
  170. $(eval $(call module,playback,Avoid repetitive playback buffers on re-connect \
  171. with supported clients (e.g. mutter, colluquy)))
  172. $(eval $(call module,raw,View all of the raw traffic.))
  173. $(eval $(call module,route-replies,Routes back answers to the right client \
  174. when connected with multiple clients.))
  175. $(eval $(call module,sasl,The SASL module allows you to authenticate to an \
  176. IRC network via SASL.))
  177. $(eval $(call module,savebuff,Saves your channel buffers into an encrypted \
  178. file so they can survive restarts and reboots.))
  179. $(eval $(call module,schat,SSL (encrypted) DCC chats.))
  180. $(eval $(call module,send-raw,Allows you to send raw traffic to IRC from \
  181. other users.))
  182. $(eval $(call module,simple-away,This module will automatically set you away \
  183. on IRC while you are disconnected from the bouncer.))
  184. $(eval $(call module,shell,Have your unix shell in a query window right inside \
  185. of your IRC client.))
  186. $(eval $(call module,stickychan,Keeps you sticked to specific channels.))
  187. $(eval $(call module,watch,Monitor activity for specific text patterns from \
  188. specific users and have the text sent to a special query window.))
  189. $(eval $(call webadmin))
  190. $(eval $(call webskin,dark-clouds))
  191. $(eval $(call webskin,forest))
  192. $(eval $(call webskin,ice))
  193. PKG_CONFIG_DEPENDS += $(patsubst %,CONFIG_PACKAGE_%,$(ZNC_MODULES))
  194. include $(INCLUDE_DIR)/package.mk
  195. include $(INCLUDE_DIR)/cmake.mk
  196. CMAKE_OPTIONS += \
  197. -DWANT_ICU=O$(if $(CONFIG_ZNC_ICU),N,FF) \
  198. -DWANT_I18N=OFF \
  199. -DWANT_CYRUS=OFF \
  200. -DWANT_PERL=OFF \
  201. -DWANT_SYSTEMD=OFF \
  202. -DWANT_PYTHON=OFF \
  203. -DWANT_OPENSSL=ON \
  204. -DWANT_SWIG=OFF \
  205. -DWANT_TCL=OFF \
  206. -DWANT_ZLIB=ON
  207. $(eval $(call BuildPackage,znc))
  208. $(foreach m,$(ZNC_MODULES),$(eval $(call BuildPackage,$(m))))