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