| 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:= rrdtool1
|
|---|
| 10 | PKG_VERSION:= 1.0.50
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= c466e2e7df95fa8e318e46437da87686
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.x
|
|---|
| 15 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 16 |
|
|---|
| 17 | WRKSRC= ${WRKDIR}/rrdtool-$(PKG_VERSION)
|
|---|
| 18 |
|
|---|
| 19 | include $(TOPDIR)/mk/package.mk
|
|---|
| 20 |
|
|---|
| 21 | $(eval $(call PKG_template,LIBRRD1,librrd1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 22 | $(eval $(call PKG_template,RRDCGI1,rrdcgi1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 23 | $(eval $(call PKG_template,RRDTOOL1,rrdtool1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 24 |
|
|---|
| 25 | $(WRKBUILD)/.configured:
|
|---|
| 26 | (cd $(WRKBUILD); rm -rf config.{status,cache} ; \
|
|---|
| 27 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 28 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 29 | CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|---|
| 30 | LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
|---|
| 31 | ac_cv_path_PERL=no \
|
|---|
| 32 | rd_cv_ieee_works=yes \
|
|---|
| 33 | shrext_cmds=".so" \
|
|---|
| 34 | ./configure \
|
|---|
| 35 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 36 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 37 | --build=$(GNU_HOST_NAME) \
|
|---|
| 38 | --program-prefix="" \
|
|---|
| 39 | --program-suffix="" \
|
|---|
| 40 | --prefix=/usr \
|
|---|
| 41 | --exec-prefix=/usr \
|
|---|
| 42 | --bindir=/usr/bin \
|
|---|
| 43 | --datadir=/usr/share \
|
|---|
| 44 | --includedir=/usr/include \
|
|---|
| 45 | --infodir=/usr/share/info \
|
|---|
| 46 | --libdir=/usr/lib \
|
|---|
| 47 | --libexecdir=/usr/lib \
|
|---|
| 48 | --localstatedir=/var \
|
|---|
| 49 | --mandir=/usr/share/man \
|
|---|
| 50 | --sbindir=/usr/sbin \
|
|---|
| 51 | --sysconfdir=/etc \
|
|---|
| 52 | --enable-largefile \
|
|---|
| 53 | --disable-nls \
|
|---|
| 54 | --enable-shared=yes \
|
|---|
| 55 | --enable-static=yes \
|
|---|
| 56 | --disable-rpath \
|
|---|
| 57 | --with-gnu-ld \
|
|---|
| 58 | --enable-local-zlib \
|
|---|
| 59 | );
|
|---|
| 60 | touch $@
|
|---|
| 61 |
|
|---|
| 62 | $(WRKBUILD)/.built:
|
|---|
| 63 | rm -rf $(WRKINST)
|
|---|
| 64 | mkdir -p $(WRKINST)
|
|---|
| 65 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 66 | DESTDIR="$(WRKINST)" \
|
|---|
| 67 | shrext_cmds=".so" \
|
|---|
| 68 | all install
|
|---|
| 69 | touch $@
|
|---|
| 70 |
|
|---|
| 71 | $(IPKG_RRDTOOL1):
|
|---|
| 72 | install -d -m0755 $(IDIR_RRDTOOL1)/usr/bin
|
|---|
| 73 | $(CP) $(WRKINST)/usr/bin/rrdtool $(IDIR_RRDTOOL1)/usr/bin/
|
|---|
| 74 | $(CP) $(WRKINST)/usr/bin/rrdupdate $(IDIR_RRDTOOL1)/usr/bin/
|
|---|
| 75 | $(RSTRIP) $(IDIR_RRDTOOL1)
|
|---|
| 76 | $(IPKG_BUILD) $(IDIR_RRDTOOL1) $(PACKAGE_DIR)
|
|---|
| 77 |
|
|---|
| 78 | $(IPKG_RRDCGI1):
|
|---|
| 79 | install -d -m0755 $(IDIR_RRDCGI1)/usr/bin
|
|---|
| 80 | $(CP) $(WRKINST)/usr/bin/rrdcgi $(IDIR_RRDCGI1)/usr/bin/
|
|---|
| 81 | $(RSTRIP) $(IDIR_RRDCGI1)
|
|---|
| 82 | $(IPKG_BUILD) $(IDIR_RRDCGI1) $(PACKAGE_DIR)
|
|---|
| 83 |
|
|---|
| 84 | $(IPKG_LIBRRD1):
|
|---|
| 85 | install -d -m0755 $(IDIR_LIBRRD1)/usr/lib
|
|---|
| 86 | $(CP) $(WRKINST)/usr/lib/librrd.so.* $(IDIR_LIBRRD1)/usr/lib/
|
|---|
| 87 | $(RSTRIP) $(IDIR_LIBRRD1)
|
|---|
| 88 | $(IPKG_BUILD) $(IDIR_LIBRRD1) $(PACKAGE_DIR)
|
|---|
| 89 |
|
|---|
| 90 | $(STAGING_DIR)/usr/lib/librrd.so: $(WRKBUILD)/.built
|
|---|
| 91 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 92 | $(CP) $(WRKINST)/usr/include/rrd.h $(STAGING_DIR)/usr/include/
|
|---|
| 93 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 94 | $(CP) $(WRKINST)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/
|
|---|
| 95 | $(CP) $(WRKINST)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/
|
|---|
| 96 | touch $@
|
|---|
| 97 |
|
|---|
| 98 | install-dev: $(STAGING_DIR)/usr/lib/librrd.so
|
|---|
| 99 |
|
|---|
| 100 | uninstall-dev:
|
|---|
| 101 | rm -rf \
|
|---|
| 102 | $(STAGING_DIR)/usr/include/rrd.h \
|
|---|
| 103 | $(STAGING_DIR)/usr/lib/librrd.a \
|
|---|
| 104 | $(STAGING_DIR)/usr/lib/librrd.so* \
|
|---|
| 105 |
|
|---|
| 106 | compile-targets: install-dev
|
|---|
| 107 | clean-targets: uninstall-dev
|
|---|