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 PKG_MD5SUM
:=5667b4acb1f01309d6eded77abac700c
21 define Package
/znc
/default
22 SUBMENU
:=Instant Messaging
26 URL
:=http
://en.znc.in
/
27 MAINTAINER
:=Jonas Gorski
<jonas.gorski
+openwrt@gmail.com
>
31 $(Package
/znc
/default
)
32 DEPENDS
:=+libopenssl
+uclibcxx
36 define Package
/znc
/description
37 ZNC is an IRC bouncer with many advanced features like detaching
,
38 multiple users
, per channel playback buffer
, SSL
, IPv6
, transparent DCC
39 bouncing
, and c
++ module support to name a few.
42 define Package
/znc
/conffiles
47 define Package
/znc
/install
48 $(INSTALL_DIR
) $(1)/usr
/bin
49 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/znc
$(1)/usr
/bin
/
50 $(INSTALL_DIR
) $(1)/etc
/init.d
51 $(INSTALL_BIN
) .
/files
/znc.init
$(1)/etc
/init.d
/znc
52 $(INSTALL_DIR
) $(1)/etc
/config
53 $(INSTALL_DATA
) .
/files
/znc.conf
$(1)/etc
/config
/znc
54 $(INSTALL_DIR
) $(1)/usr
/lib
/znc
/
55 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/modules
/extra
/droproot.so
$(1)/usr
/lib
/znc
/
60 ZNC_MODULE_TARGETS
:= extra
/droproot.so
63 define Package
/znc-mod-
$(strip $(1))
64 $(Package
/znc
/default
)
65 TITLE
+= ($(strip $(1)) plugin
)
69 define Package
/znc-mod-
$(strip $(1))/description
73 define Package
/znc-mod-
$(strip $(1))/install
74 $(INSTALL_DIR
) $$(1)/usr
/lib
/znc
/
75 $(INSTALL_BIN
) $$(PKG_BUILD_DIR
)/modules
/$(strip $(3))$(subst -,_
,$(strip $(1))).so
$$(1)/usr
/lib
/znc
/
76 # include webadmin page templates if existing
77 if
[ -d
$$(PKG_BUILD_DIR
)/modules
/$(strip $(3))$(subst -,_
,$(strip $(1))) ]; then \
78 $(INSTALL_DIR
) $$(1)/usr
/share
/znc
/ ;\
79 $(CP
) -r
$$(PKG_BUILD_DIR
)/modules
/$(strip $(3))$(subst -,_
,$(strip $(1))) $$(1)/usr
/share
/znc
/ ;\
83 ZNC_MODULES
+= znc-mod-
$(strip $(1))
84 $(if
$(CONFIG_PACKAGE_znc-mod-
$(strip $(1))),ZNC_MODULE_TARGETS
+= $(strip $(3))$(subst -,_
,$(strip $(1))).so
)
88 define Package
/znc-mod-webadmin
89 $(Package
/znc
/default
)
90 TITLE
+= (webadmin plugin
)
94 define Package
/znc-mod-webadmin
/description
95 Allows you to add
/remove
/edit users and settings on the fly via a web browser.
98 define Package
/znc-mod-webadmin
/install
99 $(INSTALL_DIR
) $$(1)/usr
/lib
/znc
/
100 $(INSTALL_BIN
) $$(PKG_BUILD_DIR
)/modules
/webadmin.so
$$(1)/usr
/lib
/znc
/
101 $(INSTALL_DIR
) $$(1)/usr
/share
/znc
/
102 $(CP
) -r
$$(PKG_BUILD_DIR
)/modules
/webadmin
$$(1)/usr
/share
/znc
/
103 $(INSTALL_DIR
) $$(1)/usr
/share
/znc
/webskins
/
104 $(CP
) -r
$$(PKG_BUILD_DIR
)/webskins
/_default_
$$(1)/usr
/share
/znc
/webskins
/
107 ZNC_MODULES
+= znc-mod-webadmin
108 $(if
$(CONFIG_PACKAGE_znc-mod-webadmin
),ZNC_MODULE_TARGETS
+= webadmin.so
)
112 define Package
/znc-webskin-
$(strip $(1))
113 $(Package
/znc
/default
)
114 TITLE
+= ($(strip $(1)) webskin
)
115 DEPENDS
:=znc-mod-webadmin
118 define Package
/znc-webskin-
$(strip $(1))/description
119 $(strip $(1)) webskin for webadmin
122 define Package
/znc-webskin-
$(strip $(1))/install
123 $(INSTALL_DIR
) $$(1)/usr
/share
/znc
/webskins
/
124 $(CP
) -r
$$(PKG_BUILD_DIR
)/webskins
/$(strip $(1)) $$(1)/usr
/share
/znc
/webskins
/
126 ZNC_MODULES
+= znc-webskin-
$(strip $(1))
131 $(eval
$(call module
,admin
,Allows you to add
/remove
/edit users and settings on \
132 the fly via IRC messages.
))
134 $(eval
$(call module
,adminlog
,Log user connects and disconnects and failed \
135 logins to file or syslog.
))
137 $(eval
$(call module
,autoattach
,Reattaches you to channels on activity.
))
139 $(eval
$(call module
,autocycle
,Cycles a channel when you are the only one in \
140 there and you don
't have op.))
142 $(eval $(call module,autoop,Auto op the good guys.))
144 $(eval $(call module,autoreply,Gives a automatic reply if someone messages you \
147 $(eval $(call module,away,Stores messages while away$(,) also auto away.))
149 $(eval $(call module,awaynick,Change your nick while you are away.))
151 $(eval $(call module,blockuser,Blocks certain users from using ZNC saying \
152 their account was disabled.))
154 $(eval $(call module,buffextras,Add nick changes$(,) joins$(,) parts$(,) topic \
155 changes etc. to your playback buffer.))
157 $(eval $(call module,certauth,This module allows users to log in via SSL \
160 $(eval $(call module,chansaver,Keeping config up to date when user joins and \
163 $(eval $(call module,clientnotify,Notify about new incoming connections to \
166 $(eval $(call module,crypt,Encryption for channel/private messages.))
168 $(eval $(call module,disconkick,This module will kick your client from all \
169 channels where you are$(,) in case if ZNC disconnects from server.))
171 $(eval $(call module,fail2ban,Block IPs for some time after a failed login.))
173 $(eval $(call module,keepnick,Tries to get you your primary nick.))
175 $(eval $(call module,kickrejoin,Implements auto-rejoin-on-kick.))
177 $(eval $(call module,lastseen,Logs when a user last logged in to ZNC.))
179 $(eval $(call module,nickserv,Auths you with NickServ.))
181 $(eval $(call module,notes,This modules stores and displays short notes using \
182 a key/note pairs and shows them to you on connect.))
184 $(eval $(call module,partyline,Allows ZNC users to join internal channels and \
185 query other ZNC users on the same ZNC.))
187 $(eval $(call module,perform,Performs commands on connect.))
189 $(eval $(call module,q,Auths you with Q (and a little more).))
191 $(eval $(call module,raw,View all of the raw traffic.))
193 $(eval $(call module,route-replies,Routes back answers to the right client \
194 when connected with multiple clients.))
196 $(eval $(call module,savebuff,Saves your channel buffers into an encrypted \
197 file so they can survive restarts and reboots.))
199 $(eval $(call module,schat,SSL (encrypted) DCC chats.))
201 $(eval $(call module,simple-away,This module will automatically set you away \
202 on IRC while you are disconnected from the bouncer.))
204 $(eval $(call module,stickychan,Keeps you sticked to specific channels.))
206 $(eval $(call module,watch,Monitor activity for specific text patterns from \
207 specific users and have the text sent to a special query window.))
209 $(eval $(call module,antiidle,Hides your idle time.,extra/))
211 $(eval $(call module,autovoice,Autovoices everyone who joins some channel., \
214 $(eval $(call module,block-motd,This module blocks the server's Message of the \
217 $(eval
$(call module
,clearbufferonmsg
,This module keeps the buffer until the \
218 next message from the client.
,extra
/))
220 $(eval
$(call module
,ctcpflood
,This module tries to block ctcp floods.
,extra
/))
222 $(eval
$(call module
,fakeonline
,This module fakes the online status of \
225 $(eval
$(call module
,flooddetach
,This module detaches you from channels which \
226 are flooded.
,extra
/))
228 $(eval
$(call module
,listsockets
,This module displays a list of
all open \
229 sockets in ZNC.
,extra
/))
231 $(eval
$(call module
,log
,Log conversations to file.
,extra
/))
233 $(eval
$(call module
,motdfile
,Reads a MOTD from a file and displays it to \
234 users when they login.
,extra
/))
236 $(eval
$(call module
,notify-connect
,Sends a notice to
all admins when a user \
237 logs in or out.
,extra
/))
239 $(eval
$(call module
,send-raw
,Allows you to send raw traffic to IRC from \
240 other users.
,extra
/))
242 $(eval
$(call module
,shell,Have your unix
shell in a query window right inside \
243 of your IRC client.
,extra
/))
245 $(eval
$(call webadmin
))
247 $(eval
$(call webskin
,dark-clouds
))
248 $(eval
$(call webskin
,forest
))
249 $(eval
$(call webskin
,ice
))
251 PKG_CONFIG_DEPENDS
:= $(patsubst %,CONFIG_PACKAGE_
%,$(ZNC_MODULES
))
253 include $(INCLUDE_DIR
)/package.mk
256 CXX
="$(STAGING_DIR)/host/bin/g++-uc" \
257 CXXFLAGS
="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
258 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
259 LDFLAGS
="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
260 LIBS
="-luClibc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
268 CXX
="$(STAGING_DIR)/host/bin/g++-uc"
270 define Build
/Configure
271 $(call Build
/Configure
/Default
,)
272 $(call libtool_disable_rpath
)
276 $(call Build
/Compile
/Default
,znc
)
277 $(MAKE_VARS
) $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/modules \
278 $(MAKE_FLAGS
) $(ZNC_MODULE_TARGETS
)
281 $(eval
$(call BuildPackage
,znc
))
282 $(foreach m
,$(ZNC_MODULES
),$(eval
$(call BuildPackage
,$(m
))))