From 1fc6e499e3b1fcbb2931bdb9fc60b00942873e00 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 25 Oct 2010 20:20:49 +0000 Subject: [PATCH] [packages] znc: simplify makefile SVN-Revision: 23634 --- net/znc/Makefile | 561 +++++++---------------------------------------- 1 file changed, 78 insertions(+), 483 deletions(-) diff --git a/net/znc/Makefile b/net/znc/Makefile index 1eaf7953d2..0e15010fed 100644 --- a/net/znc/Makefile +++ b/net/znc/Makefile @@ -43,330 +43,6 @@ define Package/znc/conffiles /etc/config/znc endef -define Package/znc-mod-admin - $(Package/znc/default) - TITLE+= (admin plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-admin/description - Allows you to add/remove/edit users and settings on the fly via IRC messages. -endef - -define Package/znc-mod-adminlog - $(Package/znc/default) - TITLE+= (adminlog plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-adminlog/description - Log user connects and disconnects and failed logins to file or syslog. -endef - -define Package/znc-mod-autoattach - $(Package/znc/default) - TITLE+= (autoattach plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-autoattach/description - Reattaches you to channels on activity. -endef - - -define Package/znc-mod-autocycle - $(Package/znc/default) - TITLE+= (autocycle plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-autocycle/description - Cycles a channel when you are the only one in there and you don't have op. -endef - -define Package/znc-mod-autoop - $(Package/znc/default) - TITLE+= (autoop plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-autoop/description - Auto op the good guys. -endef - -define Package/znc-mod-autoreply - $(Package/znc/default) - TITLE+= (autoreply plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-autoreply/description - Gives a automatic reply if someone messages you if you are away. -endef - -define Package/znc-mod-away - $(Package/znc/default) - TITLE+= (away plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-away/description - Stores messages while away, also auto away. -endef - -define Package/znc-mod-awaynick - $(Package/znc/default) - TITLE+= (awaynick plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-awaynick/description - Change your nick while you are away. -endef - -define Package/znc-mod-blockuser - $(Package/znc/default) - TITLE+= (blockuser plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-blockuser/description - Blocks certain users from using ZNC saying their account was disabled. -endef - -define Package/znc-mod-buffextras - $(Package/znc/default) - TITLE+= (buffextras plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-buffextras/description - Add nick changes, joins, parts, topic changes etc. to your playback buffer. -endef - -define Package/znc-mod-certauth - $(Package/znc/default) - TITLE+= (certauth plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-certauth/description - This module allows users to log in via SSL client keys. -endef - -define Package/znc-mod-chansaver - $(Package/znc/default) - TITLE+= (chansaver plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-chansaver/description - Keeping config up to date when user joins and parts. -endef - -define Package/znc-mod-clientnotify - $(Package/znc/default) - TITLE+= (clientnotify plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-clientnotify/description - Notify about new incoming connections to your user. -endef - -define Package/znc-mod-crypt - $(Package/znc/default) - TITLE+= (crypt plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-crypt/description - Encryption for channel/private messages. -endef - -define Package/znc-mod-disconkick - $(Package/znc/default) - TITLE+= (disconkick plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-disconkick/description - This module will kick your client from all channels where you are, in case if ZNC disconnects from server. -endef - -define Package/znc-mod-fail2ban - $(Package/znc/default) - TITLE+= (fail2ban plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-fail2ban/description - Block IPs for some time after a failed login. -endef - -define Package/znc-mod-fixfreenode - $(Package/znc/default) - TITLE+= (fixfreenode plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-fixfreenode/description - This module blocks some freenode-specific feature which results in plus (+) - and minus (-) signs being displayed in front of every message from a client. -endef - -define Package/znc-mod-keepnick - $(Package/znc/default) - TITLE+= (keepnick plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-keepnick/description - Tries to get you your primary nick. -endef - -define Package/znc-mod-kickrejoin - $(Package/znc/default) - TITLE+= (kickrejoin plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-kickrejoin/description - Implements auto-rejoin-on-kick. -endef - -define Package/znc-mod-lastseen - $(Package/znc/default) - TITLE+= (lastseen plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-lastseen/description - Logs when a user last logged in to ZNC. -endef - -define Package/znc-mod-nickserv - $(Package/znc/default) - TITLE+= (nickserv plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-nickserv/description - Auths you with NickServ. -endef - -define Package/znc-mod-notes - $(Package/znc/default) - TITLE+= (notes plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-notes/description - This modules stores and displays short notes using a key/note pairs and shows them to you on connect. -endef - -define Package/znc-mod-partyline - $(Package/znc/default) - TITLE+= (partyline plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-partyline/description - Allows ZNC users to join internal channels and query other ZNC users - on the same ZNC. -endef - -define Package/znc-mod-perform - $(Package/znc/default) - TITLE+= (perform plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-perform/description - Performs commands on connect. -endef - -define Package/znc-mod-q - $(Package/znc/default) - TITLE+= (q plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-q/description - Auths you with Q (and a little more). -endef - -define Package/znc-mod-raw - $(Package/znc/default) - TITLE+= (raw plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-raw/description - View all of the raw traffic. -endef - -define Package/znc-mod-route-replies - $(Package/znc/default) - TITLE+= (route replies plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-route-replies/description - Routes back answers to the right client when connected with multiple clients. -endef - -define Package/znc-mod-savebuff - $(Package/znc/default) - TITLE+= (savebuff plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-savebuff/description - Saves your channel buffers into an encrypted file so they can survive - restarts and reboots. -endef - -define Package/znc-mod-schat - $(Package/znc/default) - TITLE+= (schat plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-schat/description - SSL (encrypted) DCC chats. -endef - -define Package/znc-mod-simple-away - $(Package/znc/default) - TITLE+= (simple away plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-simple-away/description - This module will automatically set you away on IRC while you are disconnected from the bouncer. -endef - -define Package/znc-mod-stickychan - $(Package/znc/default) - TITLE+= (stickychan plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-stickychan/description - Keeps you sticked to specific channels. -endef - -define Package/znc-mod-watch - $(Package/znc/default) - TITLE+= (watch plugin) - DEPENDS:=znc -endef - -define Package/znc-mod-watch/description - Monitor activity for specific text patterns from specific users and have - the text sent to a special query window. -endef CONFIGURE_VARS += \ CXX="$(STAGING_DIR)/host/bin/g++-uc" @@ -398,196 +74,115 @@ define Package/znc/install $(INSTALL_DATA) ./files/znc.conf $(1)/etc/config/znc endef -define Package/znc-mod-admin/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/admin.so $(1)/usr/lib/znc/ -endef -define Package/znc-mod-adminlog/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/adminlog.so $(1)/usr/lib/znc/ -endef +ZNC_MODULES := -define Package/znc-mod-autoattach/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/autoattach.so $(1)/usr/lib/znc/ -endef +define module + define Package/znc-mod-$(1) + $(Package/znc/default) + TITLE+= ($(1) plugin) + DEPENDS:=znc + endef -define Package/znc-mod-autocycle/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/autocycle.so $(1)/usr/lib/znc/ -endef + define Package/znc-mod-$(1)/description + $(strip $(2)) + endef -define Package/znc-mod-autoop/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/autoop.so $(1)/usr/lib/znc/ -endef + define Package/znc-mod-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/znc/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/znc/ + endef -define Package/znc-mod-autoreply/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/autoreply.so $(1)/usr/lib/znc/ + ZNC_MODULES += znc-mod-$(1) endef -define Package/znc-mod-away/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/away.so $(1)/usr/lib/znc/ -endef -define Package/znc-mod-awaynick/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/awaynick.so $(1)/usr/lib/znc/ -endef +, := , -define Package/znc-mod-blockuser/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/blockuser.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,admin,Allows you to add/remove/edit users and settings on \ + the fly via IRC messages.)) -define Package/znc-mod-buffextras/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/buffextras.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,adminlog,Log user connects and disconnects and failed \ + logins to file or syslog.)) -define Package/znc-mod-certauth/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/certauth.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,autoattach,Reattaches you to channels on activity.)) -define Package/znc-mod-chansaver/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/chansaver.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,autocycle,Cycles a channel when you are the only one in \ + there and you don't have op.)) -define Package/znc-mod-clientnotify/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/clientnotify.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,autoop,Auto op the good guys.)) -define Package/znc-mod-crypt/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/crypt.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,autoreply,Gives a automatic reply if someone messages you \ + if you are away.)) -define Package/znc-mod-disconkick/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/disconkick.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,away,Stores messages while away$(,) also auto away.)) -define Package/znc-mod-fail2ban/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/fail2ban.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,awaynick,Change your nick while you are away.)) -define Package/znc-mod-fixfreenode/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/fixfreenode.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,blockuser,Blocks certain users from using ZNC saying \ + their account was disabled.)) -define Package/znc-mod-keepnick/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/keepnick.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,buffextras,Add nick changes$(,) joins$(,) parts$(,) topic \ + changes etc. to your playback buffer.)) -define Package/znc-mod-kickrejoin/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/kickrejoin.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,certauth,This module allows users to log in via SSL \ + client keys.)) -define Package/znc-mod-lastseen/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/lastseen.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,chansaver,Keeping config up to date when user joins and \ + parts.)) -define Package/znc-mod-nickserv/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/nickserv.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,clientnotify,Notify about new incoming connections to \ + your user.)) -define Package/znc-mod-notes/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/notes.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,crypt,Encryption for channel/private messages.)) -define Package/znc-mod-partyline/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/partyline.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,disconkick,This module will kick your client from all \ + channels where you are$(,) in case if ZNC disconnects from server.)) -define Package/znc-mod-perform/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/perform.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,fail2ban,Block IPs for some time after a failed login.)) -define Package/znc-mod-q/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/q.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,fixfreenode,This module blocks some freenode-specific \ + feature which results in plus (+) and minus (-) signs being displayed in \ + front of every message from a client.)) -define Package/znc-mod-raw/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/raw.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,keepnick,Tries to get you your primary nick.)) -define Package/znc-mod-route-replies/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/route_replies.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,kickrejoin,Implements auto-rejoin-on-kick.)) -define Package/znc-mod-savebuff/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/savebuff.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,lastseen,Logs when a user last logged in to ZNC.)) -define Package/znc-mod-schat/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/schat.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,nickserv,Auths you with NickServ.)) -define Package/znc-mod-simple-away/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/simple_away.so $(1)/usr/lib/znc/ -endef +$(eval $(call module,notes,This modules stores and displays short notes using \ + a key/note pairs and shows them to you on connect.)) -define Package/znc-mod-stickychan/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/stickychan.so $(1)/usr/lib/znc/ -endef +$(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,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,simple-away,This module will automatically set you away \ + on IRC while you are disconnected from the bouncer.)) + +$(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.)) -define Package/znc-mod-watch/install - $(INSTALL_DIR) $(1)/usr/lib/znc/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/watch.so $(1)/usr/lib/znc/ -endef $(eval $(call BuildPackage,znc)) -$(eval $(call BuildPackage,znc-mod-admin)) -$(eval $(call BuildPackage,znc-mod-adminlog)) -$(eval $(call BuildPackage,znc-mod-autoattach)) -$(eval $(call BuildPackage,znc-mod-autocycle)) -$(eval $(call BuildPackage,znc-mod-autoop)) -$(eval $(call BuildPackage,znc-mod-autoreply)) -$(eval $(call BuildPackage,znc-mod-away)) -$(eval $(call BuildPackage,znc-mod-awaynick)) -$(eval $(call BuildPackage,znc-mod-blockuser)) -$(eval $(call BuildPackage,znc-mod-buffextras)) -$(eval $(call BuildPackage,znc-mod-certauth)) -$(eval $(call BuildPackage,znc-mod-chansaver)) -$(eval $(call BuildPackage,znc-mod-clientnotify)) -$(eval $(call BuildPackage,znc-mod-crypt)) -$(eval $(call BuildPackage,znc-mod-disconkick)) -$(eval $(call BuildPackage,znc-mod-fail2ban)) -$(eval $(call BuildPackage,znc-mod-fixfreenode)) -$(eval $(call BuildPackage,znc-mod-keepnick)) -$(eval $(call BuildPackage,znc-mod-kickrejoin)) -$(eval $(call BuildPackage,znc-mod-lastseen)) -$(eval $(call BuildPackage,znc-mod-nickserv)) -$(eval $(call BuildPackage,znc-mod-notes)) -$(eval $(call BuildPackage,znc-mod-partyline)) -$(eval $(call BuildPackage,znc-mod-perform)) -$(eval $(call BuildPackage,znc-mod-q)) -$(eval $(call BuildPackage,znc-mod-raw)) -$(eval $(call BuildPackage,znc-mod-route-replies)) -$(eval $(call BuildPackage,znc-mod-savebuff)) -$(eval $(call BuildPackage,znc-mod-schat)) -$(eval $(call BuildPackage,znc-mod-simple-away)) -$(eval $(call BuildPackage,znc-mod-stickychan)) -$(eval $(call BuildPackage,znc-mod-watch)) + +PKG_CONFIG_DEPENDS := $(patsubst %,CONFIG_PACKAGE_%,$(ZNC_MODULES)) +$(foreach m,$(ZNC_MODULES),$(eval $(call BuildPackage,$(m)))) -- 2.30.2