summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 22ed5540e10f1217eec729c859326fc80bf97514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Rafael Dominiquini <rafaeldominiquini at gmail dor com>

_pkgauthor=ilyakurdyukov
pkgname=jpeg-quantsmooth
_pkgbin=jpegqs
pkgver=1.20240129
pkgrel=1
pkgdesc="JPEG artifacts removal based on quantization coefficients"
arch=('x86_64' 'i686')
url="https://github.com/${_pkgauthor}/${pkgname}"
license=('LGPL-2.1')

provides=("${_pkgbin}")
makedepends=('gcc' 'make' 'libjpeg-turbo')

source=("https://github.com/${_pkgauthor}/${pkgname}/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('fd29e96eede90575de12664556d30d5fd81261da23e70f555af4cb4ecaab640f')


if [[ ${CCARCH} -eq ${arch[0]} ]]; then
	_MFLAGS="-m64"
else
	_MFLAGS="-m32"
fi

build() {
	cd ${pkgname}-${pkgver} || exit 1

	gzip "${_pkgbin}.1"

	make -j SIMD=select MFLAGS="${_MFLAGS}" app
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}" || exit 1

	install -Dm755 "${_pkgbin}" "${pkgdir}/usr/bin/${_pkgbin}"

	install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"

	install -Dm644 "${_pkgbin}.1.gz" "${pkgdir}/usr/share/man/man1/${_pkgbin}.1.gz"
}