add a package providing a default working (i hope) setup
[openwrt.git] / openwrt / package / rrdcollect / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=rrdcollect
6 PKG_VERSION:=0.2.3
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=5e4305c612bc3cccbaf802c275c81a11
9
10 PKG_SOURCE_URL:=@SF/rrdcollect
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,RRDCOLLECT,rrdcollect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20 $(eval $(call PKG_template,RRDCOLLECT_EXAMPLE,rrdcollect-example,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21
22 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
23 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
24 $(TARGET_CONFIGURE_OPTS) \
25 CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
26 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
27 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
28 LIBS="-lart_lgpl_2 -lfreetype -lpng -lz" \
29 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
30 ac_cv_func_malloc_0_nonnull=yes \
31 ./configure \
32 --target=$(GNU_TARGET_NAME) \
33 --host=$(GNU_TARGET_NAME) \
34 --build=$(GNU_HOST_NAME) \
35 --program-prefix="" \
36 --program-suffix="" \
37 --prefix=/usr \
38 --exec-prefix=/usr \
39 --bindir=/usr/bin \
40 --sbindir=/usr/sbin \
41 --libexecdir=/usr/lib \
42 --sysconfdir=/etc \
43 --datadir=/usr/share \
44 --localstatedir=/var \
45 --mandir=/usr/man \
46 --infodir=/usr/info \
47 $(DISABLE_NLS) \
48 $(DISABLE_LARGEFILE) \
49 --enable-shared \
50 --disable-static \
51 --enable-exec \
52 --without-rrdtool \
53 --with-librrd \
54 --without-libpcre \
55 --without-libpcap \
56 );
57 touch $@
58
59 $(PKG_BUILD_DIR)/.built:
60 rm -rf $(PKG_INSTALL_DIR)
61 mkdir -p $(PKG_INSTALL_DIR)
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 DESTDIR="$(PKG_INSTALL_DIR)" \
64 all install
65 touch $@
66
67 $(IPKG_RRDCOLLECT):
68 install -d -m0755 $(IDIR_RRDCOLLECT)/usr/sbin
69 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(IDIR_RRDCOLLECT)/usr/sbin/
70 $(RSTRIP) $(IDIR_RRDCOLLECT)
71 $(IPKG_BUILD) $(IDIR_RRDCOLLECT) $(PACKAGE_DIR)
72
73 $(IPKG_RRDCOLLECT_EXAMPLE):
74 install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/etc
75 install -m0644 ./files/rrd.conf $(IDIR_RRDCOLLECT_EXAMPLE)/etc/
76 install -m0644 ./files/rrdcollect.conf $(IDIR_RRDCOLLECT_EXAMPLE)/etc/
77 install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/etc/init.d
78 install -m0755 ./files/rrdcollect.init $(IDIR_RRDCOLLECT_EXAMPLE)/etc/init.d/S98rrdcollect
79 install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/usr/bin
80 install -m0755 ./files/rrd.sh $(IDIR_RRDCOLLECT_EXAMPLE)/usr/bin/
81 install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/www/cgi-bin
82 ln -sf /var/lib/rrdcollect/rrd.cgi $(IDIR_RRDCOLLECT_EXAMPLE)/www/cgi-bin/rrd.cgi
83 ln -sf /var/lib/rrdcollect/img $(IDIR_RRDCOLLECT_EXAMPLE)/www/img
84 $(RSTRIP) $(IDIR_RRDCOLLECT_EXAMPLE)
85 $(IPKG_BUILD) $(IDIR_RRDCOLLECT_EXAMPLE) $(PACKAGE_DIR)
86
This page took 0.044373 seconds and 5 git commands to generate.