cleanup
[packages.git] / net / slurm / Makefile
1 #
2 # Copyright (C) 2006 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:=slurm
12 PKG_VERSION:=0.3.3
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=e68d09202b835c644f7f6b7f070f29a2
15
16 PKG_SOURCE_URL:=http://www.wormulon.net/files/code/slurm/
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/slurm
25   SECTION:=net
26   CATEGORY:=Network
27   DEPENDS:=+libncurses
28   TITLE:=A realtime network interface monitor
29   DESCRIPTION:=A realtime network interface monitor with the following features:\\\
30                 * realtime traffic statistics divided into incoming and outgoing\\\
31                 * optional combined view\\\
32                 * can monitor any kind of network interface\\\
33                 * shows detailed statistics about the interface.\\\
34                 * it's themeable\\\
35   URL:=http://www.wormulon.net/projects/slurm
36 endef
37
38 define Build/Configure  
39         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
40                 touch configure.in; \
41                 touch aclocal.m4; \
42                 touch Makefile.in; \
43                 touch config.h.in; \
44                 touch configure; \
45                 $(TARGET_CONFIGURE_OPTS) \
46                 CFLAGS="$(TARGET_CFLAGS)" \
47                 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
48                 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
49                 LIBS="-lncurses" \
50                 ac_cv_lib_ncurses_use_default_colors=yes \
51                 ./configure \
52                         --target=$(GNU_TARGET_NAME) \
53                         --host=$(GNU_TARGET_NAME) \
54                         --build=$(GNU_HOST_NAME) \
55                         --program-prefix="" \
56                         --program-suffix="" \
57                         --prefix=/usr \
58                         --exec-prefix=/usr \
59                         --bindir=/usr/bin \
60                         --datadir=/usr/share \
61                         --includedir=/usr/include \
62                         --infodir=/usr/share/info \
63                         --libdir=/usr/lib \
64                         --libexecdir=/usr/lib \
65                         --localstatedir=/var \
66                         --mandir=/usr/share/man \
67                         --sbindir=/usr/sbin \
68                         --sysconfdir=/etc \
69                         $(DISABLE_LARGEFILE) \
70                         $(DISABLE_NLS) \
71         );
72 endef
73
74 define Build/Compile    
75         rm -rf $(PKG_INSTALL_DIR)
76         mkdir -p $(PKG_INSTALL_DIR)
77         $(MAKE) -C $(PKG_BUILD_DIR) \
78                 DESTDIR="$(PKG_INSTALL_DIR)" \
79                 all install
80 endef
81
82 define Package/slurm/install    
83         install -d -m0755 $(1)/usr/bin
84         $(CP) $(PKG_INSTALL_DIR)/usr/bin/slurm $(1)/usr/bin/
85 endef
86
87 $(eval $(call BuildPackage,slurm))