New package for muninlite (http://sourceforge.net/projects/muninlite/), thx to Benoit
[openwrt.org/packages.git] / admin / muninlite / Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
 
include $(TOPDIR)/rules.mk
 
PKG_NAME:=muninlite
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
 
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
PKG_MD5SUM:=d8824bd98300fa6b1bf4aa6af08b7e39
 
include $(INCLUDE_DIR)/package.mk
 
define Package/muninlite
  SECTION:=admin
  CATEGORY:=Administration
  DEPENDS:=
  TITLE:=Munin node implemented in shell
  URL:=http://sourceforge.net/projects/muninlite/
endef
 
define Package/muninlite/Default/description
        Munin node implemented in shell.
        Munin is a monitoring system for Unix networks.
endef
 
define Package/muninlite/postinst
#!/bin/sh
grep -q '^munin[[:space:]]*stream' $${IPKG_INSTROOT}/etc/inetd.conf 2>/dev/null
[ $$? -ne 0 ] && echo "munin   stream  tcp     nowait  root    /usr/sbin/munin-node" >> $${IPKG_INSTROOT}/etc/inetd.conf
grep -q '^munin[[:space:]]*4949/tcp' $${IPKG_INSTROOT}/etc/services 2>/dev/null
[ $$? -ne 0 ] && echo "munin     4949/tcp" >> $${IPKG_INSTROOT}/etc/services
exit 0
endef
 
define Package/muninlite/install
        $(INSTALL_DIR) $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/munin-node $(1)/usr/sbin/
endef
 
define Build/Configure
endef
 
define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)
endef
 
$(eval $(call BuildPackage,muninlite))
 
comments