ZNC: Update to 0.098 and minor fixes
authorjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 13 Apr 2011 18:25:52 +0000 (18:25 +0000)
committerjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 13 Apr 2011 18:25:52 +0000 (18:25 +0000)
 * Update ZNC to latest stable

 * Update download URI to new location

 * Add a fix for building webadmin with uClibc++ and enable it

 * Reduce build time slightly skipping the man target

 * Add myself as maintainer

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@26651 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/znc/Makefile
net/znc/patches/001-move_rootcheck_after_config.patch
net/znc/patches/002-Uclibcpp_build_fix.patch [new file with mode: 0644]

index d139947..5022f03 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
-PKG_VERSION:=0.096
+PKG_VERSION:=0.098
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/znc
-PKG_MD5SUM:=38eec4f1911a68b4d2fc704170e7cbf6
+PKG_SOURCE_URL:=http://znc.in/releases
+PKG_MD5SUM:=5667b4acb1f01309d6eded77abac700c
 
 PKG_BUILD_PARALLEL:=1
 
@@ -25,6 +25,7 @@ define Package/znc/default
   CATEGORY:=Network
   TITLE:=ZNC
   URL:=http://en.znc.in/
+  MAINTAINER:=Jonas Gorski <jonas.gorski+openwrt@gmail.com>
 endef
 
 define Package/znc
@@ -60,12 +61,14 @@ MAKE_FLAGS += \
        CXX="$(STAGING_DIR)/host/bin/g++-uc"
 
 define Build/Configure
-       # webadmin doesn't compile
-       $(RM) $(PKG_BUILD_DIR)/modules/webadmin.cpp
        $(call Build/Configure/Default,)
        $(call libtool_disable_rpath)
 endef
 
+define Build/Compile
+       $(call Build/Compile/Default,znc modules)
+endef
+
 define Package/znc/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/znc $(1)/usr/bin/
@@ -184,6 +187,9 @@ $(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 module,webadmin,Allows you to add/remove/edit users and settings \
+       on the fly via a web browser.))
+
 $(eval $(call module,antiidle,Hides your idle time.,extra/))
 
 $(eval $(call module,autovoice,Autovoices everyone who joins some channel., \
index 6e401ac..b64f247 100644 (file)
@@ -1,6 +1,15 @@
---- znc-0.094/main.cpp.orig    2010-10-25 02:30:18.000000000 +0200
-+++ znc-0.094/main.cpp 2010-10-25 02:52:03.000000000 +0200
-@@ -194,19 +194,6 @@
+From 5f655f9a25a377c01cb15517859eb514628a43d4 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
+Date: Wed, 6 Apr 2011 04:10:23 +0200
+Subject: [PATCH] Move the root check to after config parsing
+
+---
+ main.cpp |   27 ++++++++++++++-------------
+ 1 files changed, 14 insertions(+), 13 deletions(-)
+
+--- a/main.cpp
++++ b/main.cpp
+@@ -194,19 +194,6 @@ int main(int argc, char** argv) {
        }
  #endif
  
@@ -20,7 +29,7 @@
        if (bMakeConf) {
                if (!pZNC->WriteNewConfig(sConfig)) {
                        delete pZNC;
-@@ -227,6 +214,20 @@
+@@ -227,6 +214,20 @@ int main(int argc, char** argv) {
                return 1;
        }
  
diff --git a/net/znc/patches/002-Uclibcpp_build_fix.patch b/net/znc/patches/002-Uclibcpp_build_fix.patch
new file mode 100644 (file)
index 0000000..505f03d
--- /dev/null
@@ -0,0 +1,34 @@
+From fa14938321eda39f16bee6068296e6abc9df7b85 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
+Date: Wed, 6 Apr 2011 04:11:48 +0200
+Subject: [PATCH] Add a uClibc++ build workaround
+
+---
+ modules/webadmin.cpp |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+--- a/modules/webadmin.cpp
++++ b/modules/webadmin.cpp
+@@ -15,11 +15,13 @@
+ #include "WebModules.h"
+ #include "ZNCString.h"
+ #include "Listener.h"
++#include <string>
+ #include <sstream>
+ #include <utility>
+ using std::stringstream;
+ using std::make_pair;
++using std::string;
+ /* Stuff to be able to write this:
+    // i will be name of local variable, see below
+@@ -58,7 +60,7 @@ class CWebAdminMod : public CGlobalModul
+ public:
+       GLOBALMODCONSTRUCTOR(CWebAdminMod) {
+               VPair vParams;
+-              vParams.push_back(make_pair("user", ""));
++              vParams.push_back(make_pair((string)"user", (string)""));
+               AddSubPage(new CWebSubPage("settings", "Global Settings", CWebSubPage::F_ADMIN));
+               AddSubPage(new CWebSubPage("edituser", "Your Settings", vParams));
+               AddSubPage(new CWebSubPage("traffic", "Traffic Info", CWebSubPage::F_ADMIN));