889b410f90e674754565e4231cefccc5ba6923ac
[lede-routing/.git] / vis / Makefile
1 #
2 # Copyright (C) 2008-2011 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:=vis
11
12 PKG_SOURCE_PROTO:=git
13 PKG_SOURCE_URL:=git://git.open-mesh.org/vis.git
14 PKG_REV:=e141311c6a4fc824efbad536c137ed279905d825
15 PKG_VERSION:=1440
16 PKG_RELEASE:=0
17 PKG_LICENSE:=GPL-2.0
18
19 PKG_SOURCE_VERSION:=$(PKG_REV)
20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
23
24 PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/vis
29   SECTION:=net
30   CATEGORY:=Network
31   SUBMENU:=Routing and Redirection
32   DEPENDS:=+libpthread
33   TITLE:=visualization server for B.A.T.M.A.N. layer 3
34   URL:=https://www.open-mesh.org/
35   MAINTAINER:=Corinna "Elektra" Aichele <onelektra@gmx.net>
36 endef
37
38 define Package/vis/description
39 visualization server for B.A.T.M.A.N. layer 3
40 endef
41
42 MAKE_VIS_ARGS += \
43         EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
44         CCFLAGS="$(TARGET_CFLAGS)" \
45         OFLAGS="$(TARGET_CFLAGS)" \
46         REVISION="$(PKG_REV)" \
47         CC="$(TARGET_CC)" \
48         NODEBUG=1 \
49         UNAME="Linux" \
50         INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
51         STRIP="/bin/true" \
52         vis install
53
54
55 define Build/Configure
56 endef
57
58 define Build/Compile
59         $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_VIS_ARGS)
60 endef
61
62 define Package/vis/install
63         $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
64         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vis $(1)/usr/sbin/
65         $(INSTALL_BIN) ./files/etc/init.d/vis $(1)/etc/init.d
66         $(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config
67 endef
68
69 define Package/vis/conffiles
70 /etc/config/vis
71 endef
72
73 $(eval $(call BuildPackage,vis))