APP=unzip
VERSION=60
BUILD=1sml
HOMEPAGE="http://infozip.sourceforge.net/UnZip.html"
DESC="decompression and extraction utility for archives compressed in .zip format"
REQUIRES="musl"

build() {
  mkandenterbuilddir
  rm -rf "$APP$VERSION"

  tar xf $SRCDIR/$APP$VERSION.tar.?z
  cd "$APP$VERSION"
  fixbuilddirpermissions

  make -f unix/Makefile flags \
  CFLAGS_BZ="$CFLAGS" \
  CC="$CC" STRIP=true LF2= 

  sed -i 's@-DNO_LCHMOD@@' flags
  sed -i 's@-O3@''@' flags

  make -f unix/Makefile generic 

  make prefix="$PKG" -f unix/Makefile install
  mkdir -p $PKG/share/man
  mv $PKG/man/man* $PKG/share/man/
  rmdir $PKG/man

  cp LICENSE $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
7fa0c4db56062b6615969263f23ac18b1eada893e03e76752862e450dc5bfbcf8d99fa7f9cc31ffe8b8bdb014bb5b7033759eb719fca62d52ce98e9dcb9327a0  unzip60.tar.lz
"
