exfatprogs: update to 1.2.5
[feed/packages.git] / net / znc / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=znc
11 PKG_VERSION:=1.9.1
12 PKG_RELEASE:=1
13
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:=e8a7cf80e19aad510b4e282eaf61b56bc30df88ea2e0f64fadcdd303c4894f3c
18
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
23
24 PKG_BUILD_FLAGS:=no-mips16
25
26 PKG_CONFIG_DEPENDS:= CONFIG_ZNC_ICU
27
28 define Package/znc/default
29 SUBMENU:=Instant Messaging
30 SECTION:=net
31 CATEGORY:=Network
32 TITLE:=ZNC
33 URL:=https://znc.in/
34 USERID:=znc:znc
35 endef
36
37 define Package/znc
38 $(Package/znc/default)
39 DEPENDS:=+libopenssl +libstdcpp +ZNC_ICU:icu +zlib
40 MENU:=1
41 endef
42
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.
47 endef
48
49 define Package/znc/config
50 source "$(SOURCE)/Config.in"
51 endef
52
53 define Package/znc/conffiles
54 /etc/config/znc
55 endef
56
57
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/
68 endef
69
70
71 ZNC_MODULES :=
72 ZNC_MODULE_TARGETS :=
73
74 define module
75 define Package/znc-mod-$(strip $(1))
76 $(Package/znc/default)
77 TITLE+= ($(strip $(1)) plugin)
78 DEPENDS:=znc
79 endef
80
81 define Package/znc-mod-$(strip $(1))/description
82 $(strip $(2))
83 endef
84
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 ;\
92 fi
93 endef
94
95 ZNC_MODULES += znc-mod-$(strip $(1))
96 $(if $(CONFIG_PACKAGE_znc-mod-$(strip $(1))),ZNC_MODULE_TARGETS += $(subst -,_,$(strip $(1))).so)
97 endef
98
99 define webadmin
100 define Package/znc-mod-webadmin
101 $(Package/znc/default)
102 TITLE+= (webadmin plugin)
103 DEPENDS:=znc
104 endef
105
106 define Package/znc-mod-webadmin/description
107 Allows you to add/remove/edit users and settings on the fly via a web browser.
108 endef
109
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/
117 endef
118
119 ZNC_MODULES += znc-mod-webadmin
120 $(if $(CONFIG_PACKAGE_znc-mod-webadmin),ZNC_MODULE_TARGETS += webadmin.so)
121 endef
122
123 define webskin
124 define Package/znc-webskin-$(strip $(1))
125 $(Package/znc/default)
126 TITLE+= ($(strip $(1)) webskin)
127 DEPENDS:=znc-mod-webadmin
128 endef
129
130 define Package/znc-webskin-$(strip $(1))/description
131 $(strip $(1)) webskin for webadmin
132 endef
133
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/
137 endef
138 ZNC_MODULES += znc-webskin-$(strip $(1))
139 endef
140
141 define playback
142 define Package/znc-mod-playback
143 $(Package/znc/default)
144 TITLE+= (playback plugin)
145 DEPENDS:=znc
146 endef
147
148 define Package/znc-mod-playback/description
149 Avoid repetitive playback buffers on re-connect with supported clients (e.g. mutter, colluquy)
150 endef
151
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/
155 endef
156
157 ZNC_MODULES += znc-mod-playback
158 $(if $(CONFIG_PACKAGE_znc-mod-playback),ZNC_MODULE_TARGETS += playback.so)
159 endef
160
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
167 PROTO:=git
168 endef
169
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
174 endef
175
176 define push
177 define Package/znc-mod-push
178 $(Package/znc/default)
179 TITLE+= (push plugin)
180 DEPENDS:=znc
181 endef
182
183 define Package/znc-mod-push/description
184 Send push notification to connected and configured devices. Refer to project Documentation
185 on how to setup.
186 endef
187
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/
191 endef
192
193 ZNC_MODULES += znc-mod-push
194 $(if $(CONFIG_PACKAGE_znc-mod-push),ZNC_MODULE_TARGETS += push.so)
195 endef
196
197 define Download/znc-push
198 VERSION:=23d84678de2696e0b1f51aa5074764d29a98d37b
199 SUBDIR:=znc-mod-push
200 FILE:=znc-push-$$(VERSION).tar.xz
201 URL:=https://github.com/amyreese/znc-push.git
202 MIRROR_HASH:=b1ec076ee8a37b8ff8cb530852d7639fbfce3df4a963cae29375056382020394
203 PROTO:=git
204 endef
205
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
210 endef
211
212 , := ,
213
214 $(eval $(call module,adminlog,Log user connects and disconnects and failed \
215 logins to file or syslog.))
216
217 $(eval $(call module,alias,Provides bouncer-side command alias support.))
218
219 $(eval $(call module,autoattach,Reattaches you to channels on activity.))
220
221 $(eval $(call module,autocycle,Cycles a channel when you are the only one in \
222 there and you don't have op.))
223
224 $(eval $(call module,autoop,Auto op the good guys.))
225
226 $(eval $(call module,autoreply,Gives a automatic reply if someone messages you \
227 if you are away.))
228
229 $(eval $(call module,autovoice,Autovoices everyone who joins some channel.))
230
231 $(eval $(call module,awaynick,Change your nick while you are away.))
232
233 $(eval $(call module,awaystore,Stores messages while away$(,) also auto away.))
234
235 $(eval $(call module,block-motd,This module blocks the server's Message of the \
236 Day.))
237
238 $(eval $(call module,blockuser,Blocks certain users from using ZNC saying \
239 their account was disabled.))
240
241 $(eval $(call module,bouncedcc,Bounces dcc transfers through the znc server \
242 instead of sending them directly to the user.))
243
244 $(eval $(call module,buffextras,Add nick changes$(,) joins$(,) parts$(,) topic \
245 changes etc. to your playback buffer.))
246
247 $(eval $(call module,cert,Use a SSL certificate for connecting to a server.))
248
249 $(eval $(call module,certauth,This module allows users to log in to ZNC via \
250 SSL client keys.))
251
252 $(eval $(call module,chansaver,Keeping config up to date when user joins and \
253 parts.))
254
255 $(eval $(call module,clearbufferonmsg,This module keeps the buffer until the \
256 next message from the client.))
257
258 $(eval $(call module,clientnotify,Notify about new incoming connections to \
259 your user.))
260
261 $(eval $(call module,controlpanel,Allows you to add/remove/edit users and \
262 settings on the fly via IRC messages.))
263
264 $(eval $(call module,crypt,Encryption for channel/private messages.))
265
266 $(eval $(call module,ctcpflood,This module tries to block ctcp floods.))
267
268 $(eval $(call module,dcc,Allows you to transfer files to and from ZNC.))
269
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.))
272
273 $(eval $(call module,fail2ban,Block IPs for some time after a failed login.))
274
275 $(eval $(call module,flooddetach,This module detaches you from channels which \
276 are flooded.))
277
278 $(eval $(call module,identfile,Places the ident of a user to a file when they \
279 are trying to connect.))
280
281 $(eval $(call module,imapauth,Allow users to authenticate via IMAP.))
282
283 $(eval $(call module,keepnick,Tries to get you your primary nick.))
284
285 $(eval $(call module,kickrejoin,Implements auto-rejoin-on-kick.))
286
287 $(eval $(call module,lastseen,Logs when a user last logged in to ZNC.))
288
289 $(eval $(call module,listsockets,This module displays a list of all open \
290 sockets in ZNC.))
291
292 $(eval $(call module,log,Log conversations to file.))
293
294 $(eval $(call module,missingmotd,Sends 422 to clients when they login.))
295
296 $(eval $(call module,modules_online,This module fakes the online status of \
297 ZNC-*users.))
298
299 $(eval $(call module,nickserv,Auths you with NickServ.))
300
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.))
303
304 $(eval $(call module,notify-connect,Sends a notice to all admins when a user \
305 logs in or out.))
306
307 $(eval $(call module,perform,Performs commands on connect.))
308
309 $(eval $(call module,raw,View all of the raw traffic.))
310
311 $(eval $(call module,route-replies,Routes back answers to the right client \
312 when connected with multiple clients.))
313
314 $(eval $(call module,sasl,The SASL module allows you to authenticate to an \
315 IRC network via SASL.))
316
317 $(eval $(call module,savebuff,Saves your channel buffers into an encrypted \
318 file so they can survive restarts and reboots.))
319
320 $(eval $(call module,schat,SSL (encrypted) DCC chats.))
321
322 $(eval $(call module,send-raw,Allows you to send raw traffic to IRC from \
323 other users.))
324
325 $(eval $(call module,simple-away,This module will automatically set you away \
326 on IRC while you are disconnected from the bouncer.))
327
328 $(eval $(call module,shell,Have your unix shell in a query window right inside \
329 of your IRC client.))
330
331 $(eval $(call module,stickychan,Keeps you sticked to specific channels.))
332
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.))
335
336 $(eval $(call playback))
337 $(eval $(call push))
338
339 $(eval $(call webadmin))
340
341 $(eval $(call webskin,dark-clouds))
342 $(eval $(call webskin,forest))
343 $(eval $(call webskin,ice))
344
345 PKG_CONFIG_DEPENDS += $(patsubst %,CONFIG_PACKAGE_%,$(ZNC_MODULES))
346
347 include $(INCLUDE_DIR)/package.mk
348 include $(INCLUDE_DIR)/cmake.mk
349
350 CMAKE_OPTIONS += \
351 -DWANT_ARGON=OFF \
352 -DWANT_I18N=OFF \
353 -DWANT_ICU=O$(if $(CONFIG_ZNC_ICU),N,FF) \
354 -DWANT_CYRUS=OFF \
355 -DWANT_OPENSSL=ON \
356 -DWANT_PERL=OFF \
357 -DWANT_PYTHON=OFF \
358 -DWANT_SWIG=OFF \
359 -DWANT_SYSTEMD=OFF \
360 -DWANT_TCL=OFF \
361 -DWANT_ZLIB=ON
362
363 define Build/Prepare
364 $(call Build/Prepare/Default)
365
366 ifneq ($(CONFIG_PACKAGE_znc-mod-playback),)
367 $(eval $(call Download,znc-playback))
368 $(Prepare/znc-playback)
369 endif
370
371 ifneq ($(CONFIG_PACKAGE_znc-mod-push),)
372 $(eval $(call Download,znc-push))
373 $(Prepare/znc-push)
374 endif
375 endef
376
377 $(eval $(call BuildPackage,znc))
378 $(foreach m,$(ZNC_MODULES),$(eval $(call BuildPackage,$(m))))