updated to new upstream release (v0.4.0),
[openwrt.git] / openwrt / package / rrdcollect / Makefile
index 4bf899b..b3be69a 100644 (file)
@@ -14,17 +14,22 @@ PKG_CAT:=zcat
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
+ifneq ($(BR2_PACKAGE_LIBRRD),)
+RRDTOOL_LIBS:=-lart_lgpl_2 -lfreetype -lpng
+endif
+
 include $(TOPDIR)/package/rules.mk
 
 $(eval $(call PKG_template,RRDCOLLECT,rrdcollect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,RRDCOLLECT_EXAMPLE,rrdcollect-example,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 
 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
-               CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
-               LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
-               LIBS="-lart_lgpl_2 -lfreetype -lpng -lz" \
+               CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
+               LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
+               LIBS="$(RRDTOOL_LIBS) -lz" \
                PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
                ac_cv_func_malloc_0_nonnull=yes \
                ./configure \
@@ -47,6 +52,8 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
                        $(DISABLE_LARGEFILE) \
                        --enable-shared \
                        --disable-static \
+                       --disable-rpath \
+                       --with-gnu-ld \
                        --enable-exec \
                        --without-rrdtool \
                        --with-librrd \
@@ -64,13 +71,22 @@ $(PKG_BUILD_DIR)/.built:
        touch $@
 
 $(IPKG_RRDCOLLECT):
-       install -d -m0755 $(IDIR_RRDCOLLECT)/etc
-       install -m0644 ./files/rrdcollect.conf $(IDIR_RRDCOLLECT)/etc
-       install -d -m0755 $(IDIR_RRDCOLLECT)/etc/init.d
-       install -m0755 ./files/rrdcollect.init $(IDIR_RRDCOLLECT)/etc/init.d/rrdcollect
-       ln -sf rrdcollect $(IDIR_RRDCOLLECT)/etc/init.d/S98rrdcollect
        install -d -m0755 $(IDIR_RRDCOLLECT)/usr/sbin
        cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(IDIR_RRDCOLLECT)/usr/sbin/
        $(RSTRIP) $(IDIR_RRDCOLLECT)
        $(IPKG_BUILD) $(IDIR_RRDCOLLECT) $(PACKAGE_DIR)
 
+$(IPKG_RRDCOLLECT_EXAMPLE):
+       install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/etc
+       install -m0644 ./files/rrd.conf $(IDIR_RRDCOLLECT_EXAMPLE)/etc/
+       install -m0644 ./files/rrdcollect.conf $(IDIR_RRDCOLLECT_EXAMPLE)/etc/
+       install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/etc/init.d
+       install -m0755 ./files/rrdcollect.init $(IDIR_RRDCOLLECT_EXAMPLE)/etc/init.d/S98rrdcollect
+       install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/usr/bin
+       install -m0755 ./files/rrd.sh $(IDIR_RRDCOLLECT_EXAMPLE)/usr/bin/
+       install -d -m0755 $(IDIR_RRDCOLLECT_EXAMPLE)/www/cgi-bin
+       ln -sf /var/lib/rrdcollect/rrd.cgi $(IDIR_RRDCOLLECT_EXAMPLE)/www/cgi-bin/rrd.cgi
+       ln -sf /var/lib/rrdcollect/img $(IDIR_RRDCOLLECT_EXAMPLE)/www/img
+       $(RSTRIP) $(IDIR_RRDCOLLECT_EXAMPLE)
+       $(IPKG_BUILD) $(IDIR_RRDCOLLECT_EXAMPLE) $(PACKAGE_DIR)
+
This page took 0.02143 seconds and 4 git commands to generate.