| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= rrdtool
|
|---|
| 10 | PKG_VERSION:= 1.2.11
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= d61c5755cb77207f9ad3584b26e8bf08
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub
|
|---|
| 15 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 16 |
|
|---|
| 17 | include $(TOPDIR)/mk/package.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 | $(WRKBUILD)/.configured:
|
|---|
| 24 | (cd $(WRKBUILD); 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 | LIBS="-lnotimpl" \
|
|---|
| 30 | PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
|
|---|
| 31 | rd_cv_ieee_works=yes \
|
|---|
| 32 | ./configure \
|
|---|
| 33 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 34 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 35 | --build=$(GNU_HOST_NAME) \
|
|---|
| 36 | --program-prefix="" \
|
|---|
| 37 | --program-suffix="" \
|
|---|
| 38 | --prefix=/usr \
|
|---|
| 39 | --exec-prefix=/usr \
|
|---|
| 40 | --bindir=/usr/bin \
|
|---|
| 41 | --sbindir=/usr/sbin \
|
|---|
| 42 | --libexecdir=/usr/lib \
|
|---|
| 43 | --sysconfdir=/etc \
|
|---|
| 44 | --datadir=/usr/share \
|
|---|
| 45 | --localstatedir=/var \
|
|---|
| 46 | --mandir=/usr/man \
|
|---|
| 47 | --infodir=/usr/info \
|
|---|
| 48 | --disable-nls \
|
|---|
| 49 | --enable-largefile \
|
|---|
| 50 | --enable-shared=yes \
|
|---|
| 51 | --enable-static=yes \
|
|---|
| 52 | --disable-rpath \
|
|---|
| 53 | --with-gnu-ld \
|
|---|
| 54 | --enable-rrdcgi \
|
|---|
| 55 | --disable-mmap \
|
|---|
| 56 | --disable-perl \
|
|---|
| 57 | --disable-tcl \
|
|---|
| 58 | --disable-python \
|
|---|
| 59 | --without-x \
|
|---|
| 60 | --with-rrd-default-font=/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \
|
|---|
| 61 | );
|
|---|
| 62 | touch $@
|
|---|
| 63 |
|
|---|
| 64 | $(WRKBUILD)/.built:
|
|---|
| 65 | rm -rf $(WRKINST)
|
|---|
| 66 | mkdir -p $(WRKINST)
|
|---|
| 67 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 68 | DESTDIR="$(WRKINST)" \
|
|---|
| 69 | all install
|
|---|
| 70 | touch $@
|
|---|
| 71 |
|
|---|
| 72 | $(IPKG_RRDTOOL):
|
|---|
| 73 | install -d -m0755 $(IDIR_RRDTOOL)/usr/bin
|
|---|
| 74 | $(CP) $(WRKINST)/usr/bin/rrdtool $(IDIR_RRDTOOL)/usr/bin/
|
|---|
| 75 | $(CP) $(WRKINST)/usr/bin/rrdupdate $(IDIR_RRDTOOL)/usr/bin/
|
|---|
| 76 | $(RSTRIP) $(IDIR_RRDTOOL)
|
|---|
| 77 | $(IPKG_BUILD) $(IDIR_RRDTOOL) $(PACKAGE_DIR)
|
|---|
| 78 |
|
|---|
| 79 | $(IPKG_RRDCGI):
|
|---|
| 80 | install -d -m0755 $(IDIR_RRDCGI)/usr/bin
|
|---|
| 81 | $(CP) $(WRKINST)/usr/bin/rrdcgi $(IDIR_RRDCGI)/usr/bin/
|
|---|
| 82 | $(RSTRIP) $(IDIR_RRDCGI)
|
|---|
| 83 | $(IPKG_BUILD) $(IDIR_RRDCGI) $(PACKAGE_DIR)
|
|---|
| 84 |
|
|---|
| 85 | $(IPKG_LIBRRD):
|
|---|
| 86 | install -d -m0755 $(IDIR_LIBRRD)/usr/lib
|
|---|
| 87 | $(CP) $(WRKINST)/usr/lib/librrd.so.* $(IDIR_LIBRRD)/usr/lib/
|
|---|
| 88 | install -d -m0755 $(IDIR_LIBRRD)/usr/share/rrdtool/fonts
|
|---|
| 89 | $(CP) $(WRKBUILD)/src/DejaVuSansMono-Roman.ttf \
|
|---|
| 90 | $(IDIR_LIBRRD)/usr/share/rrdtool/fonts/
|
|---|
| 91 | $(RSTRIP) $(IDIR_LIBRRD)
|
|---|
| 92 | $(IPKG_BUILD) $(IDIR_LIBRRD) $(PACKAGE_DIR)
|
|---|
| 93 |
|
|---|
| 94 | $(STAGING_DIR)/usr/lib/librrd.so: $(WRKBUILD)/.built
|
|---|
| 95 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 96 | $(CP) $(WRKINST)/usr/include/rrd.h $(STAGING_DIR)/usr/include/
|
|---|
| 97 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 98 | $(CP) $(WRKINST)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/
|
|---|
| 99 | $(CP) $(WRKINST)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/
|
|---|
| 100 | touch $@
|
|---|
| 101 |
|
|---|
| 102 | install-dev: $(STAGING_DIR)/usr/lib/librrd.so
|
|---|
| 103 |
|
|---|
| 104 | uninstall-dev:
|
|---|
| 105 | rm -rf \
|
|---|
| 106 | $(STAGING_DIR)/usr/include/rrd.h \
|
|---|
| 107 | $(STAGING_DIR)/usr/lib/librrd.a \
|
|---|
| 108 | $(STAGING_DIR)/usr/lib/librrd.so* \
|
|---|
| 109 |
|
|---|
| 110 | compile-targets: install-dev
|
|---|
| 111 | clean-targets: uninstall-dev
|
|---|