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
:=http
://znc.in
/releases \
16 http
://znc.in
/releases
/archive
17 PKG_MD5SUM
:=89f6696ed366661f7432ece343fd19d0
19 PKG_MAINTAINER
:=Jonas Gorski
<jogo@openwrt.org
>
20 PKG_LICENSE
:=Apache-2.0
21 PKG_LICENSE_FILES
:=LICENSE
27 define Package
/znc
/default
28 SUBMENU
:=Instant Messaging
32 URL
:=http
://en.znc.in
/
36 $(Package
/znc
/default
)
37 DEPENDS
:=+libopenssl
+libpthread
+libstdcpp
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.
47 define Package
/znc
/conffiles
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
/
65 ZNC_MODULE_TARGETS
:= droproot.so
68 define Package
/znc-mod-
$(strip $(1))
69 $(Package
/znc
/default
)
70 TITLE
+= ($(strip $(1)) plugin
)
74 define Package
/znc-mod-
$(strip $(1))/description
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
;\
88 ZNC_MODULES
+= znc-mod-
$(strip $(1))
89 $(if
$(CONFIG_PACKAGE_znc-mod-
$(strip $(1))),ZNC_MODULE_TARGETS
+= $(subst -,_
,$(strip $(1))).so
)
93 define Package
/znc-mod-webadmin
94 $(Package
/znc
/default
)
95 TITLE
+= (webadmin plugin
)
99 define Package
/znc-mod-webadmin
/description
100 Allows you to add
/remove
/edit users and settings on the fly via a web browser.
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
/
112 ZNC_MODULES
+= znc-mod-webadmin
113 $(if
$(CONFIG_PACKAGE_znc-mod-webadmin
),ZNC_MODULE_TARGETS
+= webadmin.so
)
117 define Package
/znc-webskin-
$(strip $(1))
118 $(Package
/znc
/default
)
119 TITLE
+= ($(strip $(1)) webskin
)
120 DEPENDS
:=znc-mod-webadmin
123 define Package
/znc-webskin-
$(strip $(1))/description
124 $(strip $(1)) webskin for webadmin
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
/
131 ZNC_MODULES
+= znc-webskin-
$(strip $(1))
136 $(eval
$(call module
,adminlog
,Log user connects and disconnects and failed \
137 logins to file or syslog.
))
139 $(eval
$(call module
,alias
,Provides bouncer-side command alias support.
))
141 $(eval
$(call module
,autoattach
,Reattaches you to channels on activity.
))
143 $(eval
$(call module
,autocycle
,Cycles a channel when you are the only one in \
144 there and you don
't have op.))
146 $(eval $(call module,autoop,Auto op the good guys.))
148 $(eval $(call module,autoreply,Gives a automatic reply if someone messages you \
151 $(eval $(call module,autovoice,Autovoices everyone who joins some channel.))
153 $(eval $(call module,awaynick,Change your nick while you are away.))
155 $(eval $(call module,awaystore,Stores messages while away$(,) also auto away.))
157 $(eval $(call module,block-motd,This module blocks the server's Message of the \
160 $(eval
$(call module
,blockuser
,Blocks certain users from using ZNC saying \
161 their account was disabled.
))
163 $(eval
$(call module
,bouncedcc
,Bounces dcc transfers through the znc server \
164 instead of sending them directly to the user.
))
166 $(eval
$(call module
,buffextras
,Add nick changes
$(,) joins
$(,) parts
$(,) topic \
167 changes etc. to your playback buffer.
))
169 $(eval
$(call module
,cert
,Use a SSL certificate for connecting to a server.
))
171 $(eval
$(call module
,certauth
,This module allows users to log in to ZNC via \
174 $(eval
$(call module
,chansaver
,Keeping config up to date when user joins and \
177 $(eval
$(call module
,clearbufferonmsg
,This module keeps the buffer until the \
178 next message from the client.
))
180 $(eval
$(call module
,clientnotify
,Notify about new incoming connections to \
183 $(eval
$(call module
,controlpanel
,Allows you to add
/remove
/edit users and \
184 settings on the fly via IRC messages.
))
186 $(eval
$(call module
,crypt
,Encryption for channel
/private messages.
))
188 $(eval
$(call module
,ctcpflood
,This module tries to block ctcp floods.
))
190 $(eval
$(call module
,dcc
,Allows you to transfer files to and from ZNC.
))
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.
))
195 $(eval
$(call module
,fail2ban
,Block IPs for some time after a failed login.
))
197 $(eval
$(call module
,flooddetach
,This module detaches you from channels which \
200 $(eval
$(call module
,identfile
,Places the ident of a user to a file when they \
201 are trying to connect.
))
203 $(eval
$(call module
,imapauth
,Allow users to authenticate via IMAP.
))
205 $(eval
$(call module
,keepnick
,Tries to
get you your primary nick.
))
207 $(eval
$(call module
,kickrejoin
,Implements auto-rejoin-on-kick.
))
209 $(eval
$(call module
,lastseen
,Logs when a user last logged in to ZNC.
))
211 $(eval
$(call module
,listsockets
,This module displays a list of
all open \
214 $(eval
$(call module
,log
,Log conversations to file.
))
216 $(eval
$(call module
,missingmotd
,Sends
422 to clients when they login.
))
218 $(eval
$(call module
,modules_online
,This module fakes the online status of \
221 $(eval
$(call module
,nickserv
,Auths you with NickServ.
))
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.
))
226 $(eval
$(call module
,notify-connect
,Sends a notice to
all admins when a user \
229 $(eval
$(call module
,partyline
,Allows ZNC users to
join internal channels and \
230 query other ZNC users on the same ZNC.
))
232 $(eval
$(call module
,perform
,Performs commands on connect.
))
234 $(eval
$(call module
,q
,Auths you with Q
(and a little more
).
))
236 $(eval
$(call module
,raw
,View
all of the raw traffic.
))
238 $(eval
$(call module
,route-replies
,Routes back answers to the right client \
239 when connected with multiple clients.
))
241 $(eval
$(call module
,sasl
,The SASL module allows you to authenticate to an \
242 IRC network via SASL.
))
244 $(eval
$(call module
,savebuff
,Saves your channel buffers into an encrypted \
245 file so they can survive restarts and reboots.
))
247 $(eval
$(call module
,schat
,SSL
(encrypted
) DCC chats.
))
249 $(eval
$(call module
,send-raw
,Allows you to send raw traffic to IRC from \
252 $(eval
$(call module
,simple-away
,This module will automatically set you away \
253 on IRC while you are disconnected from the bouncer.
))
255 $(eval
$(call module
,shell,Have your unix
shell in a query window right inside \
256 of your IRC client.
))
258 $(eval
$(call module
,stickychan
,Keeps you sticked to specific channels.
))
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.
))
263 $(eval
$(call webadmin
))
265 $(eval
$(call webskin
,dark-clouds
))
266 $(eval
$(call webskin
,forest
))
267 $(eval
$(call webskin
,ice
))
269 PKG_CONFIG_DEPENDS
:= $(patsubst %,CONFIG_PACKAGE_
%,$(ZNC_MODULES
))
271 include $(INCLUDE_DIR
)/package.mk
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"
293 define Build
/Configure
294 $(call Build
/Configure
/Default
,)
295 $(call libtool_disable_rpath
)
299 $(call Build
/Compile
/Default
,znc
)
300 +$(MAKE_VARS
) $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/modules \
301 $(MAKE_FLAGS
) $(ZNC_MODULE_TARGETS
)
304 $(eval
$(call BuildPackage
,znc
))
305 $(foreach m
,$(ZNC_MODULES
),$(eval
$(call BuildPackage
,$(m
))))