###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2009 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
include Config
-VER = 0.8.7g
+VER = 0.8.8b
THISAPP = cacti-$(VER)
DL_FILE = $(THISAPP).tar.gz
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = cacti
-PAK_VER = 3
+PAK_VER = 5
DEPS = "netsnmpd mysql"
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 268421cb1a58d3444f7ecbddb4c4b016
-
+$(DL_FILE)_MD5 = acb40deae073ca22e5c01a8e3ba389fb
install : $(TARGET)
md5 : $(subst %,%_MD5,$(objects))
-
dist:
@$(PAK)
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+
+ cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8a-legal.patch
+ cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8a-replace_treeview_by_jquery.jstree.patch
+ cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-html-injection.patch
+ cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-remote-command-execution.patch
+ cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-rra-comments.patch
+ cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-sanitize-variables.patch
+ cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-sql-injection-shell-escaping.patch
+ cp -vf \
+ $(DIR_SRC)/config/cacti/d.gif \
+ $(DIR_SRC)/config/cacti/d.png \
+ $(DIR_SRC)/config/cacti/throbber.gif \
+ $(DIR_APP)/include/js/jquery/themes/default/
+ cd $(DIR_APP) && rm -rf include/treeview
+
@rm -rf /var/cacti /usr/share/cacti
mkdir -pv /var/cacti /usr/share/cacti
ln -s /var/cacti/log /usr/share/cacti/log
ln -s /var/cacti/rra /usr/share/cacti/rra
+ -mkdir -pv /etc/logrotate.d
+ install -v -m 644 $(DIR_SRC)/config/cacti/cacti.logrotate /etc/logrotate.d/cacti
+
chown -R nobody:nobody /var/cacti/rra /var/cacti/log
@rm -rf $(DIR_APP)
@$(POSTBUILD)