summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dcdd83bdaa36a0702bdbdafb948359872491f161 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer:  Vincent Grande <shoober420@gmail.com>
# Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>
# Contributor: David Rungel <dvzrv@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>

_name=libjpeg-turbo
pkgname=lib32-${_name}-minimal-git
pkgver=2.0.6
pkgrel=1
pkgdesc='JPEG image codec with accelerated baseline compression and decompression'
arch=('x86_64')
url="https://libjpeg-turbo.org/"
license=('BSD')
depends=('lib32-glibc' "${_name}")
makedepends=('nasm' 'cmake')
provides=('lib32-libjpeg-turbo' 'lib32-libjpeg' 'libjpeg.so' 'libturbojpeg.so')
conflicts=(lib32-libjpeg-turbo)
source=("git+https://github.com/libjpeg-turbo/libjpeg-turbo.git")
sha512sums=('SKIP')
#validpgpkeys=('0338C8D8D9FDA62CF9C421BD7EC2DBB6F4DBF434') # The libjpeg-turbo Project (Signing key for official binaries) <information@libjpeg-turbo.org>

pkgver() {
  cd libjpeg-turbo
  git describe --tags | sed 's/-/+/g'
}

build() {
  cd "${_name}"

  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  cmake \
	-B build \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=/usr/lib32 \
        -DCMAKE_BUILD_TYPE='None' \
        -DWITH_JPEG7=OFF \
	-DWITH_JPEG8=OFF \
	-DWITH_JAVA=OFF \
	-DWITH_TURBOJPEG=ON \
        ./
  make VERBOSE=1 -C build
}

#check() {
#  cd "${_name}"
#  make test -C build
#}

package() {
  cd "${_name}"

  make VERBOSE=1 DESTDIR="${pkgdir}" \
       docdir="/usr/share/doc/${_name}" \
       exampledir="/usr/share/doc/${_name}" \
       install -C build
  # remove everything that is provided by libjpeg-turbo
  rm -rf "${pkgdir}"/usr/{include,share,bin}
  # license
  install -vDm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
}