APP=p7zip
VERSION=16.02
BUILD=1sml
HOMEPAGE='https://sourceforge.net/projects/p7zip/'
DOWNLOAD=''
DESC="file archiver and a port of the 7z windows archive utility"
REQUIRES="gcc-libs"

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

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

  sed -i 's/-pipe -s//' makefile.machine
  sed -i -e 's/strip /#strip /' \
   -e 's/chmod 555/chmod 755/' \
   -e 's/chmod 444/chmod 644/' install.sh && make all3 || true

  make install DEST_HOME="" DEST_DIR="$PKG" \
   DEST_MAN="/share/man" || true

  cp DOC/License.txt $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
72beac97a0d298d5416a25db6863d7f5033408e979555d1dae61a847e0d9062a4b5eca7e31f47bfeb26eda95b567fea081a13e1a20098a6e57a6de0ab39715ee  p7zip-16.02.tar.lz
"
