Merge pull request #2514 from jefferyto/tor-remove-tor-fw-helper
[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.6.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://znc.in/releases \
16 http://znc.in/releases/archive
17 PKG_MD5SUM:=89f6696ed366661f7432ece343fd19d0
18
19 PKG_MAINTAINER:=Jonas Gorski <jogo@openwrt.org>
20 PKG_LICENSE:=Apache-2.0
21 PKG_LICENSE_FILES:=LICENSE
22
23 PKG_USE_MIPS16:=0
24 PKG_BUILD_PARALLEL:=1
25
26
27 define Package/znc/default
28 SUBMENU:=Instant Messaging
29 SECTION:=net
30 CATEGORY:=Network
31 TITLE:=ZNC
32 URL:=http://en.znc.in/
33 endef
34
35 define Package/znc
36 $(Package/znc/default)
37 DEPENDS:=+libopenssl +libpthread +libstdcpp
38 MENU:=1
39 endef
40
41 define Package/znc/description
42 ZNC is an IRC bouncer with many advanced features like detaching,
43 multiple users, per channel playback buffer, SSL, IPv6, transparent DCC
44 bouncing, and c++ module support to name a few.
45 endef
46
47 define Package/znc/conffiles
48 /etc/config/znc
49 endef
50
51
52 define Package/znc/install
53 $(INSTALL_DIR) $(1)/usr/bin
54 $(INSTALL_BIN) $(PKG_BUILD_DIR)/znc $(1)/usr/bin/
55 $(INSTALL_DIR) $(1)/etc/init.d
56 $(INSTALL_BIN) ./files/znc.init $(1)/etc/init.d/znc
57 $(INSTALL_DIR) $(1)/etc/config
58 $(INSTALL_DATA) ./files/znc.conf $(1)/etc/config/znc
59 $(INSTALL_DIR) $(1)/usr/lib/znc/
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/droproot.so $(1)/usr/lib/znc/
61 endef
62
63
64 ZNC_MODULES :=
65 ZNC_MODULE_TARGETS := droproot.so
66
67 define module
68 define Package/znc-mod-$(strip $(1))
69 $(Package/znc/default)
70 TITLE+= ($(strip $(1)) plugin)
71 DEPENDS:=znc
72 endef
73
74 define Package/znc-mod-$(strip $(1))/description
75 $(strip $(2))
76 endef
77
78 define Package/znc-mod-$(strip $(1))/install
79 $(INSTALL_DIR) $$(1)/usr/lib/znc/
80 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/modules/$(subst -,_,$(strip $(1))).so $$(1)/usr/lib/znc/
81 # include webadmin page templates if existing
82 if [ -d $$(PKG_BUILD_DIR)/modules/data/$(subst -,_,$(strip $(1))) ]; then \
83 $(INSTALL_DIR) $$(1)/usr/share/znc/modules ;\
84 $(CP) $$(PKG_BUILD_DIR)/modules/data/$(subst -,_,$(strip $(1))) $$(1)/usr/share/znc/modules ;\
85 fi
86 endef
87
88 ZNC_MODULES += znc-mod-$(strip $(1))
89 $(if $(CONFIG_PACKAGE_znc-mod-$(strip $(1))),ZNC_MODULE_TARGETS += $(subst -,_,$(strip $(1))).so)
90 endef
91
92 define webadmin
93 define Package/znc-mod-webadmin
94 $(Package/znc/default)
95 TITLE+= (webadmin plugin)
96 DEPENDS:=znc
97 endef
98
99 define Package/znc-mod-webadmin/description
100 Allows you to add/remove/edit users and settings on the fly via a web browser.
101 endef
102
103 define Package/znc-mod-webadmin/install
104 $(INSTALL_DIR) $$(1)/usr/lib/znc/
105 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/modules/webadmin.so $$(1)/usr/lib/znc/
106 $(INSTALL_DIR) $$(1)/usr/share/znc/modules
107 $(CP) $$(PKG_BUILD_DIR)/modules/data/webadmin $$(1)/usr/share/znc/modules
108 $(INSTALL_DIR) $$(1)/usr/share/znc/webskins/
109 $(CP) $$(PKG_BUILD_DIR)/webskins/_default_ $$(1)/usr/share/znc/webskins/
110 endef
111
112 ZNC_MODULES += znc-mod-webadmin
113 $(if $(CONFIG_PACKAGE_znc-mod-webadmin),ZNC_MODULE_TARGETS += webadmin.so)
114 endef
115
116 define webskin
117 define Package/znc-webskin-$(strip $(1))
118 $(Package/znc/default)
119 TITLE+= ($(strip $(1)) webskin)
120 DEPENDS:=znc-mod-webadmin
121 endef
122
123 define Package/znc-webskin-$(strip $(1))/description
124 $(strip $(1)) webskin for webadmin
125 endef
126
127 define Package/znc-webskin-$(strip $(1))/install
128 $(INSTALL_DIR) $$(1)/usr/share/znc/webskins/
129 $(CP) $$(PKG_BUILD_DIR)/webskins/$(strip $(1)) $$(1)/usr/share/znc/webskins/
130 endef
131 ZNC_MODULES += znc-webskin-$(strip $(1))
132 endef
133
134 , := ,
135
136 $(eval $(call module,adminlog,Log user connects and disconnects and failed \
137 logins to file or syslog.))
138
139 $(eval $(call module,alias,Provides bouncer-side command alias support.))
140
141 $(eval $(call module,autoattach,Reattaches you to channels on activity.))
142
143 $(eval $(call module,autocycle,Cycles a channel when you are the only one in \
144 there and you don't have op.))
145
146 $(eval $(call module,autoop,Auto op the good guys.))
147
148 $(eval $(call module,autoreply,Gives a automatic reply if someone messages you \
149 if you are away.))
150
151 $(eval $(call module,autovoice,Autovoices everyone who joins some channel.))
152
153 $(eval $(call module,awaynick,Change your nick while you are away.))
154
155 $(eval $(call module,awaystore,Stores messages while away$(,) also auto away.))
156
157 $(eval $(call module,block-motd,This module blocks the server's Message of the \
158 Day.))
159
160 $(eval $(call module,blockuser,Blocks certain users from using ZNC saying \
161 their account was disabled.))
162
163 $(eval $(call module,bouncedcc,Bounces dcc transfers through the znc server \
164 instead of sending them directly to the user.))
165
166 $(eval $(call module,buffextras,Add nick changes$(,) joins$(,) parts$(,) topic \
167 changes etc. to your playback buffer.))
168
169 $(eval $(call module,cert,Use a SSL certificate for connecting to a server.))
170
171 $(eval $(call module,certauth,This module allows users to log in to ZNC via \
172 SSL client keys.))
173
174 $(eval $(call module,chansaver,Keeping config up to date when user joins and \
175 parts.))
176
177 $(eval $(call module,clearbufferonmsg,This module keeps the buffer until the \
178 next message from the client.))
179
180 $(eval $(call module,clientnotify,Notify about new incoming connections to \
181 your user.))
182
183 $(eval $(call module,controlpanel,Allows you to add/remove/edit users and \
184 settings on the fly via IRC messages.))
185
186 $(eval $(call module,crypt,Encryption for channel/private messages.))
187
188 $(eval $(call module,ctcpflood,This module tries to block ctcp floods.))
189
190 $(eval $(call module,dcc,Allows you to transfer files to and from ZNC.))
191
192 $(eval $(call module,disconkick,This module will kick your client from all \
193 channels where you are$(,) in case if ZNC disconnects from server.))
194
195 $(eval $(call module,fail2ban,Block IPs for some time after a failed login.))
196
197 $(eval $(call module,flooddetach,This module detaches you from channels which \
198 are flooded.))
199
200 $(eval $(call module,identfile,Places the ident of a user to a file when they \
201 are trying to connect.))
202
203 $(eval $(call module,imapauth,Allow users to authenticate via IMAP.))
204
205 $(eval $(call module,keepnick,Tries to get you your primary nick.))
206
207 $(eval $(call module,kickrejoin,Implements auto-rejoin-on-kick.))
208
209 $(eval $(call module,lastseen,Logs when a user last logged in to ZNC.))
210
211 $(eval $(call module,listsockets,This module displays a list of all open \
212 sockets in ZNC.))
213
214 $(eval $(call module,log,Log conversations to file.))
215
216 $(eval $(call module,missingmotd,Sends 422 to clients when they login.))
217
218 $(eval $(call module,modules_online,This module fakes the online status of \
219 ZNC-*users.))
220
221 $(eval $(call module,nickserv,Auths you with NickServ.))
222
223 $(eval $(call module,notes,This modules stores and displays short notes using \
224 a key/note pairs and shows them to you on connect.))
225
226 $(eval $(call module,notify-connect,Sends a notice to all admins when a user \
227 logs in or out.))
228
229 $(eval $(call module,partyline,Allows ZNC users to join internal channels and \
230 query other ZNC users on the same ZNC.))
231
232 $(eval $(call module,perform,Performs commands on connect.))
233
234 $(eval $(call module,q,Auths you with Q (and a little more).))
235
236 $(eval $(call module,raw,View all of the raw traffic.))
237
238 $(eval $(call module,route-replies,Routes back answers to the right client \
239 when connected with multiple clients.))
240
241 $(eval $(call module,sasl,The SASL module allows you to authenticate to an \
242 IRC network via SASL.))
243
244 $(eval $(call module,savebuff,Saves your channel buffers into an encrypted \
245 file so they can survive restarts and reboots.))
246
247 $(eval $(call module,schat,SSL (encrypted) DCC chats.))
248
249 $(eval $(call module,send-raw,Allows you to send raw traffic to IRC from \
250 other users.))
251
252 $(eval $(call module,simple-away,This module will automatically set you away \
253 on IRC while you are disconnected from the bouncer.))
254
255 $(eval $(call module,shell,Have your unix shell in a query window right inside \
256 of your IRC client.))
257
258 $(eval $(call module,stickychan,Keeps you sticked to specific channels.))
259
260 $(eval $(call module,watch,Monitor activity for specific text patterns from \
261 specific users and have the text sent to a special query window.))
262
263 $(eval $(call webadmin))
264
265 $(eval $(call webskin,dark-clouds))
266 $(eval $(call webskin,forest))
267 $(eval $(call webskin,ice))
268
269 PKG_CONFIG_DEPENDS := $(patsubst %,CONFIG_PACKAGE_%,$(ZNC_MODULES))
270
271 include $(INCLUDE_DIR)/package.mk
272
273 CONFIGURE_VARS += \
274 CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \
275 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
276 LDFLAGS="-nodefaultlibs -lc -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
277 LIBS="-lstdc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
278
279 CONFIGURE_ARGS += \
280 --disable-charset \
281 --disable-cyrus \
282 --disable-debug \
283 --enable-largefile \
284 --disable-perl \
285 --enable-poll \
286 --disable-python \
287 --enable-ssl \
288 --disable-swig \
289 --disable-tcl \
290 --enable-tdns \
291 --enable-zlib
292
293 define Build/Configure
294 $(call Build/Configure/Default,)
295 $(call libtool_disable_rpath)
296 endef
297
298 define Build/Compile
299 $(call Build/Compile/Default,znc)
300 +$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/modules \
301 $(MAKE_FLAGS) $(ZNC_MODULE_TARGETS)
302 endef
303
304 $(eval $(call BuildPackage,znc))
305 $(foreach m,$(ZNC_MODULES),$(eval $(call BuildPackage,$(m))))