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.

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