5022f037eac004a75c28c9456f00f4b6f197a708
[openwrt/svn-archive/archive.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:=0.098
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://znc.in/releases
16 PKG_MD5SUM:=5667b4acb1f01309d6eded77abac700c
17
18 PKG_BUILD_PARALLEL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/znc/default
23 SUBMENU:=Instant Messaging
24 SECTION:=net
25 CATEGORY:=Network
26 TITLE:=ZNC
27 URL:=http://en.znc.in/
28 MAINTAINER:=Jonas Gorski <jonas.gorski+openwrt@gmail.com>
29 endef
30
31 define Package/znc
32 $(Package/znc/default)
33 DEPENDS:=+libopenssl +uclibcxx
34 MENU:=1
35 endef
36
37 define Package/znc/description
38 ZNC is an IRC bouncer with many advanced features like detaching,
39 multiple users, per channel playback buffer, SSL, IPv6, transparent DCC
40 bouncing, and c++ module support to name a few.
41 endef
42
43 define Package/znc/conffiles
44 /etc/config/znc
45 endef
46
47
48 CONFIGURE_VARS += \
49 CXX="$(STAGING_DIR)/host/bin/g++-uc" \
50 CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
51 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
52 LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
53 LIBS="-luClibc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
54
55 CONFIGURE_ARGS += \
56 --disable-c-ares \
57 --enable-extra \
58 --disable-perl
59
60 MAKE_FLAGS += \
61 CXX="$(STAGING_DIR)/host/bin/g++-uc"
62
63 define Build/Configure
64 $(call Build/Configure/Default,)
65 $(call libtool_disable_rpath)
66 endef
67
68 define Build/Compile
69 $(call Build/Compile/Default,znc modules)
70 endef
71
72 define Package/znc/install
73 $(INSTALL_DIR) $(1)/usr/bin
74 $(INSTALL_BIN) $(PKG_BUILD_DIR)/znc $(1)/usr/bin/
75 $(INSTALL_DIR) $(1)/etc/init.d
76 $(INSTALL_BIN) ./files/znc.init $(1)/etc/init.d/znc
77 $(INSTALL_DIR) $(1)/etc/config
78 $(INSTALL_DATA) ./files/znc.conf $(1)/etc/config/znc
79 $(INSTALL_DIR) $(1)/usr/lib/znc/
80 $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/extra/droproot.so $(1)/usr/lib/znc/
81 endef
82
83
84 ZNC_MODULES :=
85
86 define module
87 define Package/znc-mod-$(strip $(1))
88 $(Package/znc/default)
89 TITLE+= ($(strip $(1)) plugin)
90 DEPENDS:=znc
91 endef
92
93 define Package/znc-mod-$(strip $(1))/description
94 $(strip $(2))
95 endef
96
97 define Package/znc-mod-$(strip $(1))/install
98 $(INSTALL_DIR) $$(1)/usr/lib/znc/
99 $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(strip $(3))$(subst -,_,$(strip $(1))).so $$(1)/usr/lib/znc/
100 endef
101
102 ZNC_MODULES += znc-mod-$(strip $(1))
103 endef
104
105
106 , := ,
107
108 $(eval $(call module,admin,Allows you to add/remove/edit users and settings on \
109 the fly via IRC messages.))
110
111 $(eval $(call module,adminlog,Log user connects and disconnects and failed \
112 logins to file or syslog.))
113
114 $(eval $(call module,autoattach,Reattaches you to channels on activity.))
115
116 $(eval $(call module,autocycle,Cycles a channel when you are the only one in \
117 there and you don't have op.))
118
119 $(eval $(call module,autoop,Auto op the good guys.))
120
121 $(eval $(call module,autoreply,Gives a automatic reply if someone messages you \
122 if you are away.))
123
124 $(eval $(call module,away,Stores messages while away$(,) also auto away.))
125
126 $(eval $(call module,awaynick,Change your nick while you are away.))
127
128 $(eval $(call module,blockuser,Blocks certain users from using ZNC saying \
129 their account was disabled.))
130
131 $(eval $(call module,buffextras,Add nick changes$(,) joins$(,) parts$(,) topic \
132 changes etc. to your playback buffer.))
133
134 $(eval $(call module,certauth,This module allows users to log in via SSL \
135 client keys.))
136
137 $(eval $(call module,chansaver,Keeping config up to date when user joins and \
138 parts.))
139
140 $(eval $(call module,clientnotify,Notify about new incoming connections to \
141 your user.))
142
143 $(eval $(call module,crypt,Encryption for channel/private messages.))
144
145 $(eval $(call module,disconkick,This module will kick your client from all \
146 channels where you are$(,) in case if ZNC disconnects from server.))
147
148 $(eval $(call module,fail2ban,Block IPs for some time after a failed login.))
149
150 $(eval $(call module,fixfreenode,This module blocks some freenode-specific \
151 feature which results in plus (+) and minus (-) signs being displayed in \
152 front of every message from a client.))
153
154 $(eval $(call module,keepnick,Tries to get you your primary nick.))
155
156 $(eval $(call module,kickrejoin,Implements auto-rejoin-on-kick.))
157
158 $(eval $(call module,lastseen,Logs when a user last logged in to ZNC.))
159
160 $(eval $(call module,nickserv,Auths you with NickServ.))
161
162 $(eval $(call module,notes,This modules stores and displays short notes using \
163 a key/note pairs and shows them to you on connect.))
164
165 $(eval $(call module,partyline,Allows ZNC users to join internal channels and \
166 query other ZNC users on the same ZNC.))
167
168 $(eval $(call module,perform,Performs commands on connect.))
169
170 $(eval $(call module,q,Auths you with Q (and a little more).))
171
172 $(eval $(call module,raw,View all of the raw traffic.))
173
174 $(eval $(call module,route-replies,Routes back answers to the right client \
175 when connected with multiple clients.))
176
177 $(eval $(call module,savebuff,Saves your channel buffers into an encrypted \
178 file so they can survive restarts and reboots.))
179
180 $(eval $(call module,schat,SSL (encrypted) DCC chats.))
181
182 $(eval $(call module,simple-away,This module will automatically set you away \
183 on IRC while you are disconnected from the bouncer.))
184
185 $(eval $(call module,stickychan,Keeps you sticked to specific channels.))
186
187 $(eval $(call module,watch,Monitor activity for specific text patterns from \
188 specific users and have the text sent to a special query window.))
189
190 $(eval $(call module,webadmin,Allows you to add/remove/edit users and settings \
191 on the fly via a web browser.))
192
193 $(eval $(call module,antiidle,Hides your idle time.,extra/))
194
195 $(eval $(call module,autovoice,Autovoices everyone who joins some channel., \
196 extra/))
197
198 $(eval $(call module,block-motd,This module blocks the server's Message of the \
199 Day.,extra/))
200
201 $(eval $(call module,clearbufferonmsg,This module keeps the buffer until the \
202 next message from the client.,extra/))
203
204 $(eval $(call module,ctcpflood,This module tries to block ctcp floods.,extra/))
205
206 $(eval $(call module,fakeonline,This module fakes the online status of \
207 ZNC-*users.,extra/))
208
209 $(eval $(call module,flooddetach,This module detaches you from channels which \
210 are flooded.,extra/))
211
212 $(eval $(call module,listsockets,This module displays a list of all open \
213 sockets in ZNC.,extra/))
214
215 $(eval $(call module,log,Log conversations to file.,extra/))
216
217 $(eval $(call module,motdfile,Reads a MOTD from a file and displays it to \
218 users when they login.,extra/))
219
220 $(eval $(call module,notify-connect,Sends a notice to all admins when a user \
221 logs in or out.,extra/))
222
223 $(eval $(call module,send-raw,Allows you to send raw traffic to IRC from \
224 other users.,extra/))
225
226 $(eval $(call module,shell,Have your unix shell in a query window right inside \
227 of your IRC client.,extra/))
228
229 $(eval $(call BuildPackage,znc))
230
231 PKG_CONFIG_DEPENDS := $(patsubst %,CONFIG_PACKAGE_%,$(ZNC_MODULES))
232 $(foreach m,$(ZNC_MODULES),$(eval $(call BuildPackage,$(m))))