# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=advancecomp
pkgver=2.6
pkgrel=0
pkgdesc="A collection of recompression utilities for your .ZIP archives, .PNG snapshots, .MNG video clips and .GZ files"
url="https://www.advancemame.it/"
arch="all"
license="GPL-3.0-or-later"
makedepends="automake autoconf libtool zlib-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/amadvance/advancecomp/archive/v$pkgver.tar.gz"

# secfixes:
#   2.4-r0:
#     - CVE-2022-35014
#     - CVE-2022-35015
#     - CVE-2022-35016
#     - CVE-2022-35017
#     - CVE-2022-35018
#     - CVE-2022-35019
#     - CVE-2022-35020
#   2.1-r2:
#     - CVE-2019-9210

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
63cbb0578f96fd3f55ccb49e31bfe945649d36a11558aa482332440943d6d347f161de797b8d4469562b1d551b274c22fe08818179926d56aa4746581d3926dd  advancecomp-2.6.tar.gz
"
