Standardize makefile and init script
[openwrt/svn-archive/archive.git] / admin / gkrellmd / 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:=gkrellmd
12 PKG_VERSION:=2.2.10
13 PKG_RELEASE:=1
14
15 PKG_SOURCE_URL:=http://members.dslextreme.com/users/billw/gkrellm/
16 PKG_SOURCE:=gkrellm-$(PKG_VERSION).tar.bz2
17 PKG_MD5SUM:=57ef0525c0997ac2e7720712811f5a84
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/gkrellm-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/gkrellmd
26 SECTION:=admin
27 CATEGORY:=Administration
28 DEPENDS:=+glib1
29 TITLE:=System monitoring daemon
30 URL:=http://gkrellm.net/
31 endef
32
33 define Build/Configure
34 endef
35
36 define Build/Compile
37 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS) "
38 LDFLAGS="$(EXTRA_LDFLAGS) "
39 $(MAKE) -C $(PKG_BUILD_DIR)/server \
40 CC=$(TARGET_CC) \
41 glib12=yes \
42 GLIB12_LIB="-L$(STAGING_DIR)/usr/lib -lglib -lgmodule" \
43 GLIB12_INCLUDE="-I$(STAGING_DIR)/usr/include/glib-1.2 -I$(STAGING_DIR)/usr/lib/glib/include"
44 endef
45
46 define Package/gkrellmd/install
47 $(INSTALL_DIR) $(1)/usr/bin
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/$(PKG_NAME) $(1)/usr/bin/
49 $(INSTALL_DIR) $(1)/etc
50 $(INSTALL_CONF) $(PKG_BUILD_DIR)/server/$(PKG_NAME).conf $(1)/etc/
51 $(INSTALL_DIR) $(1)/etc/init.d
52 $(INSTALL_BIN) ./files/gkrellmd.init $(1)/etc/init.d/gkrellmd
53 endef
54
55 $(eval $(call BuildPackage,gkrellmd))