check if /proc/sys/reset exist, from sven-ola
[openwrt.git] / openwrt / package / rrdtool / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=rrdtool
6 PKG_VERSION:=1.2.11
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=d61c5755cb77207f9ad3584b26e8bf08
9
10 PKG_SOURCE_URL:=http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub
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,LIBRRD,librrd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20 $(eval $(call PKG_template,RRDCGI,rrdcgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21 $(eval $(call PKG_template,RRDTOOL,rrdtool,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22
23 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
24 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
25 $(TARGET_CONFIGURE_OPTS) \
26 CFLAGS="$(TARGET_CFLAGS)" \
27 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/freetype2 -I$(STAGING_DIR)/usr/include/libart-2.0" \
28 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib " \
29 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
30 rd_cv_ieee_works=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=yes \
50 --enable-static=yes \
51 --disable-rpath \
52 --with-gnu-ld \
53 --enable-rrdcgi \
54 --disable-mmap \
55 --disable-perl \
56 --disable-tcl \
57 --disable-python \
58 --without-x \
59 --with-rrd-default-font=/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \
60 );
61 touch $@
62
63 $(PKG_BUILD_DIR)/.built:
64 rm -rf $(PKG_INSTALL_DIR)
65 mkdir -p $(PKG_INSTALL_DIR)
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 all install
69 touch $@
70
71 $(IPKG_RRDTOOL):
72 install -d -m0755 $(IDIR_RRDTOOL)/usr/bin
73 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(IDIR_RRDTOOL)/usr/bin/
74 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(IDIR_RRDTOOL)/usr/bin/
75 $(RSTRIP) $(IDIR_RRDTOOL)
76 $(IPKG_BUILD) $(IDIR_RRDTOOL) $(PACKAGE_DIR)
77
78 $(IPKG_RRDCGI):
79 install -d -m0755 $(IDIR_RRDCGI)/usr/bin
80 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(IDIR_RRDCGI)/usr/bin/
81 $(RSTRIP) $(IDIR_RRDCGI)
82 $(IPKG_BUILD) $(IDIR_RRDCGI) $(PACKAGE_DIR)
83
84 $(IPKG_LIBRRD):
85 install -d -m0755 $(IDIR_LIBRRD)/usr/lib
86 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(IDIR_LIBRRD)/usr/lib/
87 install -d -m0755 $(IDIR_LIBRRD)/usr/share/rrdtool/fonts
88 cp -fpR $(PKG_BUILD_DIR)/src/DejaVuSansMono-Roman.ttf \
89 $(IDIR_LIBRRD)/usr/share/rrdtool/fonts/
90 $(RSTRIP) $(IDIR_LIBRRD)
91 $(IPKG_BUILD) $(IDIR_LIBRRD) $(PACKAGE_DIR)
92
93 $(STAGING_DIR)/usr/lib/librrd.so: $(PKG_BUILD_DIR)/.built
94 mkdir -p $(STAGING_DIR)/usr/include
95 cp -fpR $(PKG_INSTALL_DIR)/usr/include/rrd.h $(STAGING_DIR)/usr/include/
96 mkdir -p $(STAGING_DIR)/usr/lib
97 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/
98 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/
99 touch $@
100
101 install-dev: $(STAGING_DIR)/usr/lib/librrd.so
102
103 uninstall-dev:
104 rm -rf \
105 $(STAGING_DIR)/usr/include/rrd.h \
106 $(STAGING_DIR)/usr/lib/librrd.a \
107 $(STAGING_DIR)/usr/lib/librrd.so* \
108
109 compile: install-dev
110 clean: uninstall-dev
This page took 0.043555 seconds and 5 git commands to generate.