2 # Copyright (C) 2009-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://znc.in
/releases \
16 https
://znc.in
/releases
/archive
17 PKG_HASH
:=8b99c9dbb21c1309705073460be9bfacb6f7b0e83a15fe5d4b7140201b39d2a1
19 PKG_MAINTAINER
:=Jonas Gorski
<jonas.gorski@gmail.com
>
20 PKG_LICENSE
:=Apache-2.0
21 PKG_LICENSE_FILES
:=LICENSE
22 PKG_CPE_ID
:=cpe
:/a
:znc
:znc
24 PKG_BUILD_FLAGS
:=no-mips16
26 PKG_CONFIG_DEPENDS
:= CONFIG_ZNC_ICU
28 define Package
/znc
/default
29 SUBMENU
:=Instant Messaging
38 $(Package
/znc
/default
)
39 DEPENDS
:=+libopenssl
+libstdcpp
+ZNC_ICU
:icu
+zlib
43 define Package
/znc
/description
44 ZNC is an IRC bouncer with many advanced features like detaching
,
45 multiple users
, per channel playback buffer
, SSL
, IPv6
, transparent DCC
46 bouncing
, and c
++ module support to name a few.
49 define Package
/znc
/config
50 source
"$(SOURCE)/Config.in"
53 define Package
/znc
/conffiles
58 define Package
/znc
/install
59 $(INSTALL_DIR
) $(1)/usr
/bin
60 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/znc
$(1)/usr
/bin
/
61 $(INSTALL_DIR
) $(1)/usr
/lib
/znc
62 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/znc
/corecaps.so
$(1)/usr
/lib
/znc
/
63 $(INSTALL_DIR
) $(1)/etc
/init.d
64 $(INSTALL_BIN
) .
/files
/znc.init
$(1)/etc
/init.d
/znc
65 $(INSTALL_DIR
) $(1)/etc
/config
66 $(INSTALL_DATA
) .
/files
/znc.conf
$(1)/etc
/config
/znc
67 $(INSTALL_DIR
) $(1)/usr
/lib
/znc
/
75 define Package
/znc-mod-
$(strip $(1))
76 $(Package
/znc
/default
)
77 TITLE
+= ($(strip $(1)) plugin
)
81 define Package
/znc-mod-
$(strip $(1))/description
85 define Package
/znc-mod-
$(strip $(1))/install
86 $(INSTALL_DIR
) $$(1)/usr
/lib
/znc
/
87 $(INSTALL_BIN
) $$(PKG_INSTALL_DIR
)/usr
/lib
/znc
/$(subst -,_
,$(strip $(1))).so
$$(1)/usr
/lib
/znc
/
88 # include webadmin page templates if existing
89 if
[ -d
$$(PKG_INSTALL_DIR
)/usr
/share
/znc
/modules
/$(subst -,_
,$(strip $(1))) ]; then \
90 $(INSTALL_DIR
) $$(1)/usr
/share
/znc
/modules
;\
91 $(CP
) $$(PKG_INSTALL_DIR
)/usr
/share
/znc
/modules
/$(subst -,_
,$(strip $(1))) $$(1)/usr
/share
/znc
/modules
;\
95 ZNC_MODULES
+= znc-mod-
$(strip $(1))
96 $(if
$(CONFIG_PACKAGE_znc-mod-
$(strip $(1))),ZNC_MODULE_TARGETS
+= $(subst -,_
,$(strip $(1))).so
)
100 define Package
/znc-mod-webadmin
101 $(Package
/znc
/default
)
102 TITLE
+= (webadmin plugin
)
106 define Package
/znc-mod-webadmin
/description
107 Allows you to add
/remove
/edit users and settings on the fly via a web browser.
110 define Package
/znc-mod-webadmin
/install
111 $(INSTALL_DIR
) $$(1)/usr
/lib
/znc
/
112 $(INSTALL_BIN
) $$(PKG_INSTALL_DIR
)/usr
/lib
/znc
/webadmin.so
$$(1)/usr
/lib
/znc
/
113 $(INSTALL_DIR
) $$(1)/usr
/share
/znc
/modules
114 $(CP
) $$(PKG_INSTALL_DIR
)/usr
/share
/znc
/modules
/webadmin
$$(1)/usr
/share
/znc
/modules
115 $(INSTALL_DIR
) $$(1)/usr
/share
/znc
/webskins
/
116 $(CP
) $$(PKG_INSTALL_DIR
)/usr
/share
/znc
/webskins
/_default_
$$(1)/usr
/share
/znc
/webskins
/
119 ZNC_MODULES
+= znc-mod-webadmin
120 $(if
$(CONFIG_PACKAGE_znc-mod-webadmin
),ZNC_MODULE_TARGETS
+= webadmin.so
)
124 define Package
/znc-webskin-
$(strip $(1))
125 $(Package
/znc
/default
)
126 TITLE
+= ($(strip $(1)) webskin
)
127 DEPENDS
:=znc-mod-webadmin
130 define Package
/znc-webskin-
$(strip $(1))/description
131 $(strip $(1)) webskin for webadmin
134 define Package
/znc-webskin-
$(strip $(1))/install
135 $(INSTALL_DIR
) $$(1)/usr
/share
/znc
/webskins
/
136 $(CP
) $$(PKG_INSTALL_DIR
)/usr
/share
/znc
/webskins
/$(strip $(1)) $$(1)/usr
/share
/znc
/webskins
/
138 ZNC_MODULES
+= znc-webskin-
$(strip $(1))
142 define Package
/znc-mod-playback
143 $(Package
/znc
/default
)
144 TITLE
+= (playback plugin
)
148 define Package
/znc-mod-playback
/description
149 Avoid repetitive playback buffers on re-connect with supported clients
(e.g. mutter
, colluquy
)
152 define Package
/znc-mod-playback
/install
153 $(INSTALL_DIR
) $$(1)/usr
/lib
/znc
/
154 $(INSTALL_BIN
) $$(PKG_INSTALL_DIR
)/usr
/lib
/znc
/playback.so
$$(1)/usr
/lib
/znc
/
157 ZNC_MODULES
+= znc-mod-playback
158 $(if
$(CONFIG_PACKAGE_znc-mod-playback
),ZNC_MODULE_TARGETS
+= playback.so
)
161 define Download
/znc-playback
162 VERSION
:=8dd128bfe2b24b2cc6a9ea2e2d28bfaa28d2a833
163 SUBDIR
:=znc-mod-playback
164 FILE
:=znc-playback-
$$(VERSION
).
tar.xz
165 URL
:=https
://github.com
/jpnurmi
/znc-playback.git
166 MIRROR_HASH
:=ac89d69048d62c5b15f39cc0d357a111ce4053816062e7bc1e553392b36fbd71
170 define Prepare
/znc-playback
171 $(eval
$(Download
/znc-playback
))
172 xzcat
$(DL_DIR
)/$(FILE
) |
tar -C
$(PKG_BUILD_DIR
) $(TAR_OPTIONS
)
173 $(LN
) $(PKG_BUILD_DIR
)/znc-mod-playback
/playback.
cpp $(PKG_BUILD_DIR
)/modules
/playback.
cpp
177 define Package
/znc-mod-push
178 $(Package
/znc
/default
)
179 TITLE
+= (push plugin
)
183 define Package
/znc-mod-push
/description
184 Send push notification to connected and configured devices. Refer to project Documentation
188 define Package
/znc-mod-push
/install
189 $(INSTALL_DIR
) $$(1)/usr
/lib
/znc
/
190 $(INSTALL_BIN
) $$(PKG_INSTALL_DIR
)/usr
/lib
/znc
/push.so
$$(1)/usr
/lib
/znc
/
193 ZNC_MODULES
+= znc-mod-push
194 $(if
$(CONFIG_PACKAGE_znc-mod-push
),ZNC_MODULE_TARGETS
+= push.so
)
197 define Download
/znc-push
198 VERSION
:=23d84678de2696e0b1f51aa5074764d29a98d37b
200 FILE
:=znc-push-
$$(VERSION
).
tar.xz
201 URL
:=https
://github.com
/amyreese
/znc-push.git
202 MIRROR_HASH
:=b1ec076ee8a37b8ff8cb530852d7639fbfce3df4a963cae29375056382020394
206 define Prepare
/znc-push
207 $(eval
$(Download
/znc-push
))
208 xzcat
$(DL_DIR
)/$(FILE
) |
tar -C
$(PKG_BUILD_DIR
) $(TAR_OPTIONS
)
209 $(LN
) $(PKG_BUILD_DIR
)/znc-mod-push
/push.
cpp $(PKG_BUILD_DIR
)/modules
/push.
cpp
214 $(eval
$(call module
,adminlog
,Log user connects and disconnects and failed \
215 logins to file or syslog.
))
217 $(eval
$(call module
,alias
,Provides bouncer-side command alias support.
))
219 $(eval
$(call module
,autoattach
,Reattaches you to channels on activity.
))
221 $(eval
$(call module
,autocycle
,Cycles a channel when you are the only one in \
222 there and you don
't have op.))
224 $(eval $(call module,autoop,Auto op the good guys.))
226 $(eval $(call module,autoreply,Gives a automatic reply if someone messages you \
229 $(eval $(call module,autovoice,Autovoices everyone who joins some channel.))
231 $(eval $(call module,awaynick,Change your nick while you are away.))
233 $(eval $(call module,awaystore,Stores messages while away$(,) also auto away.))
235 $(eval $(call module,block-motd,This module blocks the server's Message of the \
238 $(eval
$(call module
,blockuser
,Blocks certain users from using ZNC saying \
239 their account was disabled.
))
241 $(eval
$(call module
,bouncedcc
,Bounces dcc transfers through the znc server \
242 instead of sending them directly to the user.
))
244 $(eval
$(call module
,buffextras
,Add nick changes
$(,) joins
$(,) parts
$(,) topic \
245 changes etc. to your playback buffer.
))
247 $(eval
$(call module
,cert
,Use a SSL certificate for connecting to a server.
))
249 $(eval
$(call module
,certauth
,This module allows users to log in to ZNC via \
252 $(eval
$(call module
,chansaver
,Keeping config up to date when user joins and \
255 $(eval
$(call module
,clearbufferonmsg
,This module keeps the buffer until the \
256 next message from the client.
))
258 $(eval
$(call module
,clientnotify
,Notify about new incoming connections to \
261 $(eval
$(call module
,controlpanel
,Allows you to add
/remove
/edit users and \
262 settings on the fly via IRC messages.
))
264 $(eval
$(call module
,crypt
,Encryption for channel
/private messages.
))
266 $(eval
$(call module
,ctcpflood
,This module tries to block ctcp floods.
))
268 $(eval
$(call module
,dcc
,Allows you to transfer files to and from ZNC.
))
270 $(eval
$(call module
,disconkick
,This module will kick your client from
all \
271 channels where you are
$(,) in case if ZNC disconnects from server.
))
273 $(eval
$(call module
,fail2ban
,Block IPs for some time after a failed login.
))
275 $(eval
$(call module
,flooddetach
,This module detaches you from channels which \
278 $(eval
$(call module
,identfile
,Places the ident of a user to a file when they \
279 are trying to connect.
))
281 $(eval
$(call module
,imapauth
,Allow users to authenticate via IMAP.
))
283 $(eval
$(call module
,keepnick
,Tries to
get you your primary nick.
))
285 $(eval
$(call module
,kickrejoin
,Implements auto-rejoin-on-kick.
))
287 $(eval
$(call module
,lastseen
,Logs when a user last logged in to ZNC.
))
289 $(eval
$(call module
,listsockets
,This module displays a list of
all open \
292 $(eval
$(call module
,log
,Log conversations to file.
))
294 $(eval
$(call module
,missingmotd
,Sends
422 to clients when they login.
))
296 $(eval
$(call module
,modules_online
,This module fakes the online status of \
299 $(eval
$(call module
,nickserv
,Auths you with NickServ.
))
301 $(eval
$(call module
,notes
,This modules stores and displays short notes using \
302 a key
/note pairs and shows them to you on connect.
))
304 $(eval
$(call module
,notify-connect
,Sends a notice to
all admins when a user \
307 $(eval
$(call module
,perform
,Performs commands on connect.
))
309 $(eval
$(call module
,raw
,View
all of the raw traffic.
))
311 $(eval
$(call module
,route-replies
,Routes back answers to the right client \
312 when connected with multiple clients.
))
314 $(eval
$(call module
,sasl
,The SASL module allows you to authenticate to an \
315 IRC network via SASL.
))
317 $(eval
$(call module
,savebuff
,Saves your channel buffers into an encrypted \
318 file so they can survive restarts and reboots.
))
320 $(eval
$(call module
,schat
,SSL
(encrypted
) DCC chats.
))
322 $(eval
$(call module
,send-raw
,Allows you to send raw traffic to IRC from \
325 $(eval
$(call module
,simple-away
,This module will automatically set you away \
326 on IRC while you are disconnected from the bouncer.
))
328 $(eval
$(call module
,shell,Have your unix
shell in a query window right inside \
329 of your IRC client.
))
331 $(eval
$(call module
,stickychan
,Keeps you sticked to specific channels.
))
333 $(eval
$(call module
,watch
,Monitor activity for specific text patterns from \
334 specific users and have the text sent to a special query window.
))
336 $(eval
$(call playback
))
339 $(eval
$(call webadmin
))
341 $(eval
$(call webskin
,dark-clouds
))
342 $(eval
$(call webskin
,forest
))
343 $(eval
$(call webskin
,ice
))
345 PKG_CONFIG_DEPENDS
+= $(patsubst %,CONFIG_PACKAGE_
%,$(ZNC_MODULES
))
347 include $(INCLUDE_DIR
)/package.mk
348 include $(INCLUDE_DIR
)/cmake.mk
353 -DWANT_ICU
=O
$(if
$(CONFIG_ZNC_ICU
),N
,FF
) \
364 $(call Build
/Prepare
/Default
)
366 ifneq ($(CONFIG_PACKAGE_znc-mod-playback
),)
367 $(eval
$(call Download
,znc-playback
))
368 $(Prepare
/znc-playback
)
371 ifneq ($(CONFIG_PACKAGE_znc-mod-push
),)
372 $(eval
$(call Download
,znc-push
))
377 $(eval
$(call BuildPackage
,znc
))
378 $(foreach m
,$(ZNC_MODULES
),$(eval
$(call BuildPackage
,$(m
))))