############################################################################### # # # IPFire.org - A linux based firewall # # Copyright (C) 2007 Michael Tremer & Christian Schmidt # # # # 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 # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### ############################################################################### # Definitions ############################################################################### include Config PKG_NAME = gzip VER = 1.3.12 THISAPP = $(PKG_NAME)-$(VER) DL_FILE = $(THISAPP).tar.gz DIR_APP = $(DIR_SRC)/$(THISAPP) OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) ############################################################################### # Top-level Rules ############################################################################### objects = $(DL_FILE) \ $(THISAPP)-openbsd-owl-tmp.patch \ $(THISAPP)-cve-2006-4337_len.patch \ $(THISAPP)-cve-2006-4338.patch install : $(OBJECT) download : $(objects) $(objects) : @$(LOAD) ############################################################################### # Installation Details ############################################################################### $(OBJECT) : @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) ifeq "$(STAGE)" "toolchain" cd $(DIR_APP) && \ for file in gzip.c lib/utimens.{c,h}; do \ cp -v $$file{,.orig}; \ sed 's/futimens/gl_&/' $$file.orig > $$file; \ done # This patch modifies 'znew' so we don't use temporary files: cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-openbsd-owl-tmp.patch # Fix CVE 2006-4337 # (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4337) and # CVE 2006-4338 (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4338), # against malformed gzip files: cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-cve-2006-4337_len.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-cve-2006-4338.patch # NO_ASM is for textrels. cd $(DIR_APP) && \ DEFS=NO_ASM \ ./configure \ $(CONFIGURE_ARCH) \ --prefix=$(TOOLS_DIR) cd $(DIR_APP) && make $(PARALLELISMFLAGS) cd $(DIR_APP) && make install endif ifeq "$(STAGE)" "base" cd $(DIR_APP) && sed -i 's/futimens/gl_&/' gzip.c lib/utimens.{c,h} cd $(DIR_APP) && \ ./configure \ $(CONFIGURE_ARCH) \ --prefix=/usr \ --bindir=/bin cd $(DIR_APP) && make $(PARALLELISMFLAGS) cd $(DIR_APP) && make install mv -v /bin/{gzexe,uncompress,zcmp,zdiff,zegrep} /usr/bin mv -v /bin/{zfgrep,zforce,zgrep,zless,zmore,znew} /usr/bin endif @rm -rf $(DIR_APP) @$(POSTBUILD)