#!/bin/sh
#
# Copyright (c) 2019 David Demelier <markand@malikania.fr>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

PKGNAME=zip
PKGVERSION=3.0
PKGREVISION=1
PKGLICENSE="CUSTOM"
PKGSUMMARY="utility to compress and archive zip files"
PKGDOWNLOAD="https://downloads.sourceforge.net/infozip/${PKGNAME}30.tar.gz"
PKGDEPENDS="bzip2"

: ${CC:=clang}

rm -rf ${PKGNAME}30
tar xvf ${PKGNAME}30.tar.gz
cd ${PKGNAME}30

# does not support DESTDIR, fake it with prefix.
make -f unix/Makefile CC="$CC" generic
make -f unix/Makefile \
	prefix=$DESTDIR/ \
	MANDIR=$DESTDIR/share/man/man1 \
	install

cd ..
rm -rf ${PKGNAME}30
