PKGBUILDs/extra/libjpeg-turbo/PKGBUILD

64 lines
1.9 KiB
Bash
Raw Normal View History

2013-10-22 06:34:38 +00:00
# $Id$
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
2012-02-12 17:44:45 +00:00
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2016-06-12 19:43:02 +00:00
# - removed makedepends on nasm and java
2017-07-13 12:54:21 +00:00
# - added --without-simd to configure for !AArch64
pkgname=libjpeg-turbo
2017-07-13 12:54:21 +00:00
pkgver=1.5.2
2017-11-24 21:36:31 +00:00
pkgrel=2
2013-10-22 06:34:38 +00:00
pkgdesc='JPEG image codec with accelerated baseline compression and decompression'
2017-11-24 21:36:31 +00:00
url='https://libjpeg-turbo.org/'
arch=('x86_64')
2015-10-08 13:34:30 +00:00
license=('custom')
2017-07-13 12:54:21 +00:00
#makedepends=('nasm' 'jdk8-openjdk')
validpgpkeys=('7D6293CC6378786E1B5C496885C7044E033FDE16')
2017-11-24 21:36:31 +00:00
source=("https://downloads.sourceforge.net/project/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.sig})
2017-07-13 12:54:21 +00:00
sha256sums=('9098943b270388727ae61de82adec73cf9f0dbb240b3bc8b172595ebf405b528'
'SKIP')
2016-06-12 19:32:50 +00:00
provides=('libjpeg=8.1.2' 'turbojpeg')
2013-05-26 22:33:55 +00:00
conflicts=('libjpeg' 'turbojpeg')
replaces=('libjpeg' 'turbojpeg')
2013-12-11 05:58:24 +00:00
2016-06-12 19:32:50 +00:00
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
sed 's/Szathmáry/Szathmary/g' -i java/org/libjpegturbo/turbojpeg/*.java
}
build() {
2013-10-22 06:34:38 +00:00
cd "${srcdir}/${pkgname}-${pkgver}"
2015-12-06 00:55:38 +00:00
export JNI_CFLAGS='-I/usr/lib/jvm/default/include -I/usr/lib/jvm/default/include/linux'
2017-07-13 12:54:21 +00:00
[[ $CARCH != "aarch64" ]] && CONFIG="--without-simd"
2015-12-06 00:55:38 +00:00
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--with-jpeg8 \
2017-11-24 21:36:31 +00:00
--with-build-date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d)" \
2017-07-13 12:54:21 +00:00
$CONFIG
2015-12-06 00:55:38 +00:00
2013-10-22 06:34:38 +00:00
make
2012-02-12 17:44:45 +00:00
}
check() {
2013-10-22 06:34:38 +00:00
cd "${srcdir}/${pkgname}-${pkgver}"
make test
}
package() {
2013-10-22 06:34:38 +00:00
cd "${srcdir}/${pkgname}-${pkgver}"
make \
DESTDIR="${pkgdir}" \
docdir="/usr/share/doc/${pkgname}" \
exampledir="/usr/share/doc/${pkgname}" \
install
2017-07-13 12:54:21 +00:00
2017-11-24 21:36:31 +00:00
install -Dm 644 jpegint.h "${pkgdir}/usr/include" # required by other software
2017-07-13 12:54:21 +00:00
install -d "${pkgdir}/usr/share/licenses/libjpeg-turbo"
2017-11-24 21:36:31 +00:00
ln -s ../../doc/libjpeg-turbo/LICENSE.md "${pkgdir}"/usr/share/licenses/libjpeg-turbo
install -Dm 644 ChangeLog.md -t"${pkgdir}/usr/share/doc/${pkgname}"
}