[Packages] Add softflowd package (#2748)
[openwrt/svn-archive/archive.git] / net / softflowd / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=softflowd
12 PKG_VERSION:=0.9.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.mindrot.org/files/softflowd/
17 PKG_MD5SUM:=0054d1c80494396cc15edb0a1c7748b1
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/softflowd
22 SECTION:=net
23 CATEGORY:=Network
24 DEPENDS:=+libpcap
25 TITLE:=softflowd
26 URL:=http://www.mindrot.org/projects/softflowd/
27 endef
28
29 define Package/softflowd/description
30 Software netflow exporter
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default)
35 $(call libtool_disable_rpath)
36 endef
37
38 define Build/Compile
39 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
40 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" softflowd softflowctl
41 endef
42
43 define Package/softflowd/install
44 $(INSTALL_DIR) $(1)/usr/sbin
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/softflowd $(1)/usr/sbin/
46 $(INSTALL_BIN) $(PKG_BUILD_DIR)/softflowctl $(1)/usr/sbin/
47 $(INSTALL_DIR) $(1)/etc/config
48 $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
49 $(INSTALL_DIR) $(1)/etc/init.d
50 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
51 endef
52
53 $(eval $(call BuildPackage,softflowd))