###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2010 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
+VER = 0.9.23
-THISAPP = pakfire3-deps
+THISAPP = pakfire-$(VER)
+DL_FILE = $(THISAPP).tar.gz
+DL_FROM = http://source.ipfire.org/releases/pakfire/
+DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
-PROG = pakfire3-deps
-PAK_VER = 2
-DEPS = "intltool git make libsatsolver pycurl python-satsolver python-distutils python-distutils-extra python-lzma python-progressbar python-xattr sqlite urlgrabber"
+PROG = pakfire3
+PAK_VER = 1
+DEPS = \
+ libsatsolver \
+ pycurl \
+ python-progressbar \
+ python-xattr \
+ sqlite \
+ urlgrabber
###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 10e6dd51c917faa8bd2e7435495de211
install : $(TARGET)
-check :
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
-download :
+md5 : $(subst %,%_MD5,$(objects))
-md5 :
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+ @$(CHECK)
-dist:
- @$(PAK)
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+ @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+ @$(MD5)
###############################################################################
# Installation Details
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
- #Create a file for the package. Because empty rootfile will break.
- echo "# Pakfire 3 deps is installed" > /var/ipfire/pakfire3-deps
+ @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pakfire3-changes-for-ipfire2.diff
+ cd $(DIR_APP) && make $(MAKETUNING)
+ cd $(DIR_APP) && make install
+ rm -vf /usr/bin/pakfire3
+
+ install -v -m 644 $(DIR_SRC)/config/backup/includes/pakfire3 \
+ /var/ipfire/backup/addons/includes/pakfire3
+ @rm -rf $(DIR_APP)
@$(POSTBUILD)