lots of small package changes and dependency cleanups for the V= stuff
[openwrt.git] / 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 ifneq ($(BR2_PACKAGE_LIBRRD),)
18 RRDTOOL_LIBS:=-lart_lgpl_2 -lfreetype -lpng
19 endif
20
21 include $(TOPDIR)/package/rules.mk
22
23 $(eval $(call PKG_template,RRDCOLLECT,rrdcollect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24 $(eval $(call PKG_template,RRDCOLLECT_EXAMPLE,rrdcollect-example,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
25
26 $(PKG_BUILD_DIR)/.configured:
27 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
28 $(TARGET_CONFIGURE_OPTS) \
29 CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
30 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
31 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
32 LIBS="$(RRDTOOL_LIBS) -lz" \
33 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
34 ac_cv_func_malloc_0_nonnull=yes \
35 ./configure \
36 --target=$(GNU_TARGET_NAME) \
37 --host=$(GNU_TARGET_NAME) \
38 --build=$(GNU_HOST_NAME) \
39 --program-prefix="" \
40 --program-suffix="" \
41 --prefix=/usr \
42 --exec-prefix=/usr \
43 --bindir=/usr/bin \
44 --sbindir=/usr/sbin \
45 --libexecdir=/usr/lib \
46 --sysconfdir=/etc \
47 --datadir=/usr/share \
48 --localstatedir=/var \
49 --mandir=/usr/man \
50 --infodir=/usr/info \
51 $(DISABLE_NLS) \
52 $(DISABLE_LARGEFILE) \
53 --enable-shared \
54 --disable-static \
55 --disable-rpath \
56 --with-gnu-ld \
57 --enable-exec \
58 --without-rrdtool \
59 --with-librrd \
60 --without-libpcre \
61 --without-libpcap \
62 );
63 touch $@
64
65 $(PKG_BUILD_DIR)/.built:
66 rm -rf $(PKG_INSTALL_DIR)
67 mkdir -p $(PKG_INSTALL_DIR)
68 $(MAKE) -C $(PKG_BUILD_DIR) \
69 DESTDIR="$(PKG_INSTALL_DIR)" \
70 all install
71 touch $@
72
73 $(IPKG_RRDCOLLECT):
74 install -d -m0755 $(IDIR_RRDCOLLECT)/usr/sbin
75 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(IDIR_RRDCOLLECT)/usr/sbin/
76 $(RSTRIP) $(IDIR_RRDCOLLECT)
77 $(IPKG_BUILD) $(IDIR_RRDCOLLECT) $(PACKAGE_DIR)
78
79 $(IPKG_RRDCOLLECT_EXAMPLE):
80 install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/etc
81 install -m0644 ./files/rrd.conf $(IDIR_RRDCOLLECT_EXAMPLE)/etc/
82 install -m0644 ./files/rrdcollect.conf $(IDIR_RRDCOLLECT_EXAMPLE)/etc/
83 install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/etc/init.d
84 install -m0755 ./files/rrdcollect.init $(IDIR_RRDCOLLECT_EXAMPLE)/etc/init.d/S98rrdcollect
85 install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/usr/bin
86 install -m0755 ./files/rrd.sh $(IDIR_RRDCOLLECT_EXAMPLE)/usr/bin/
87 install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/www/cgi-bin
88 ln -sf /var/lib/rrdcollect/rrd.cgi $(IDIR_RRDCOLLECT_EXAMPLE)/www/cgi-bin/rrd.cgi
89 ln -sf /var/lib/rrdcollect/img $(IDIR_RRDCOLLECT_EXAMPLE)/www/img
90 $(RSTRIP) $(IDIR_RRDCOLLECT_EXAMPLE)
91 $(IPKG_BUILD) $(IDIR_RRDCOLLECT_EXAMPLE) $(PACKAGE_DIR)
92
This page took 0.043103 seconds and 5 git commands to generate.