vis: Extract vis package from batmand
authorSven Eckelmann <sven@narfation.org>
Wed, 18 Jan 2017 12:05:51 +0000 (13:05 +0100)
committerSven Eckelmann <sven@narfation.org>
Mon, 23 Jan 2017 18:47:52 +0000 (19:47 +0100)
The batmand and vis sources are actually stored in two different
repositories. It therefore makes more sense to have these two packages also
split in two different OpenWrt packages. This also allows to get the vis
sources directly from the git repository.

The SVN version of vis r1439 was actually r1346. The git export of revision
r1346 is referenced by this commit.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
batmand/Makefile
batmand/files/etc/config/vis [deleted file]
batmand/files/etc/init.d/vis [deleted file]
vis/Makefile [new file with mode: 0644]
vis/files/etc/config/vis [new file with mode: 0644]
vis/files/etc/init.d/vis [new file with mode: 0644]

index 12bbd2ee17c8319ebb1f927997c21b2e2ec62189..3822ddecbe3ee7240e2c5fb82ecba731de69bbc7 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=batmand
 PKG_REV:=1439
 PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE
 
 PKG_HASH:=3c72ce2aae889944acfc898434c6e9573b20815862db1938f3132cc50b669667
@@ -42,19 +42,6 @@ define Package/batmand/description
 B.A.T.M.A.N. layer 3 routing daemon
 endef
 
-define Package/vis
-$(call Package/batmand/Default)
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Routing and Redirection
-  DEPENDS:=+libpthread
-  TITLE:=visualization server for B.A.T.M.A.N. layer 3
-endef
-        
-define Package/vis/description
-visualization server for B.A.T.M.A.N. layer 3
-endef
-
 define KernelPackage/batgat
 $(call Package/batmand/Default)
   SUBMENU:=Network Support
@@ -80,18 +67,6 @@ MAKE_BATMAND_ARGS += \
        INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
        STRIP="/bin/true" \
        batmand install
-       
-MAKE_VIS_ARGS += \
-       EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
-       CCFLAGS="$(TARGET_CFLAGS)" \
-       OFLAGS="$(TARGET_CFLAGS)" \
-       REVISION="$(PKG_REV)" \
-       CC="$(TARGET_CC)" \
-       NODEBUG=1 \
-       UNAME="Linux" \
-       INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
-       STRIP="/bin/true" \
-       vis install
 
 MAKE_BATGAT_ARGS += \
        CROSS_COMPILE="$(TARGET_CROSS)" \
@@ -108,10 +83,6 @@ endef
 ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_batmand),)
        BUILD_BATMAND := $(MAKE) -C $(PKG_BUILD_DIR)/batman $(MAKE_BATMAND_ARGS)
 endif
-
-ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_vis),)
-       BUILD_VIS := $(MAKE) -C $(PKG_BUILD_DIR)/vis $(MAKE_VIS_ARGS)
-endif
        
 ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_kmod-batgat),)
        BUILD_BATGAT := $(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATGAT_ARGS)
@@ -119,7 +90,6 @@ endif
                
 define Build/Compile
        $(BUILD_BATMAND)
-       $(BUILD_VIS)
        cp $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile
        $(BUILD_BATGAT)
 endef
@@ -135,17 +105,5 @@ define Package/batmand/conffiles
 /etc/config/batmand
 endef
 
-define Package/vis/install
-       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vis $(1)/usr/sbin/
-       $(INSTALL_BIN) ./files/etc/init.d/vis $(1)/etc/init.d
-       $(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config
-endef
-
-define Package/vis/conffiles
-/etc/config/vis
-endef
-
 $(eval $(call BuildPackage,batmand))
-$(eval $(call BuildPackage,vis))
 $(eval $(call KernelPackage,batgat))
diff --git a/batmand/files/etc/config/vis b/batmand/files/etc/config/vis
deleted file mode 100644 (file)
index 6d30023..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-config vis general
-       option interface                ath0
-       
diff --git a/batmand/files/etc/init.d/vis b/batmand/files/etc/init.d/vis
deleted file mode 100644 (file)
index ef18eb7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh /etc/rc.common
-START=90
-
-start () {
-       interface=$(uci get vis.general.interface)
-       if [ "$interface" = "" ]; then
-               echo $1 Error, you must specify at least a network interface
-               exit
-       fi
-       vis_args=$interface
-
-       vis $vis_args >/dev/null 2>&1
-}
-
-stop () {
-        killall vis
-}
-
-        
diff --git a/vis/Makefile b/vis/Makefile
new file mode 100644 (file)
index 0000000..889b410
--- /dev/null
@@ -0,0 +1,73 @@
+#
+# Copyright (C) 2008-2011 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:=vis
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://git.open-mesh.org/vis.git
+PKG_REV:=e141311c6a4fc824efbad536c137ed279905d825
+PKG_VERSION:=1440
+PKG_RELEASE:=0
+PKG_LICENSE:=GPL-2.0
+
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+
+PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/vis
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Routing and Redirection
+  DEPENDS:=+libpthread
+  TITLE:=visualization server for B.A.T.M.A.N. layer 3
+  URL:=https://www.open-mesh.org/
+  MAINTAINER:=Corinna "Elektra" Aichele <onelektra@gmx.net>
+endef
+
+define Package/vis/description
+visualization server for B.A.T.M.A.N. layer 3
+endef
+
+MAKE_VIS_ARGS += \
+       EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
+       CCFLAGS="$(TARGET_CFLAGS)" \
+       OFLAGS="$(TARGET_CFLAGS)" \
+       REVISION="$(PKG_REV)" \
+       CC="$(TARGET_CC)" \
+       NODEBUG=1 \
+       UNAME="Linux" \
+       INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
+       STRIP="/bin/true" \
+       vis install
+
+
+define Build/Configure
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_VIS_ARGS)
+endef
+
+define Package/vis/install
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vis $(1)/usr/sbin/
+       $(INSTALL_BIN) ./files/etc/init.d/vis $(1)/etc/init.d
+       $(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config
+endef
+
+define Package/vis/conffiles
+/etc/config/vis
+endef
+
+$(eval $(call BuildPackage,vis))
diff --git a/vis/files/etc/config/vis b/vis/files/etc/config/vis
new file mode 100644 (file)
index 0000000..6d30023
--- /dev/null
@@ -0,0 +1,3 @@
+config vis general
+       option interface                ath0
+       
diff --git a/vis/files/etc/init.d/vis b/vis/files/etc/init.d/vis
new file mode 100644 (file)
index 0000000..ef18eb7
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh /etc/rc.common
+START=90
+
+start () {
+       interface=$(uci get vis.general.interface)
+       if [ "$interface" = "" ]; then
+               echo $1 Error, you must specify at least a network interface
+               exit
+       fi
+       vis_args=$interface
+
+       vis $vis_args >/dev/null 2>&1
+}
+
+stop () {
+        killall vis
+}
+
+