lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (9571B)


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