summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1eef3dd734682207bf5f4c73b40aa8507f35c34f (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
# Maintainer: Kyle Keen <keenerd@gmail.com>
pkgname=mozjpeg-git
pkgver=20190328
pkgrel=1
pkgdesc="A fork of libjpeg-turbo with jpgcrush built in."
url="https://github.com/mozilla/mozjpeg/"
license=("GPL")
arch=('i686' 'x86_64')
makedepends=('git' 'nasm' 'cmake')
depends=()
source=('git+https://github.com/mozilla/mozjpeg.git')
md5sums=('SKIP')
_gitname=mozjpeg

provides=('libjpeg=8.0.2' 'turbojpeg' 'libjpeg-turbo')
conflicts=('libjpeg-turbo')

pkgver() {
    cd "$_gitname"
    git show -s --format="%ci" HEAD | sed -e 's/-//g' -e 's/ .*//'
}

build()
{
    cd "$_gitname"
    #autoreconf -fiv
    mkdir -p build
    cd build
    cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/ \
        -DCMAKE_INSTALL_MANDIR=/usr/share/man \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DWITH_JPEG8=1
    make
}

# takes forever
#check()
#{
#    cd "$_gitname"
#    make test
#}

package() {
    cd "$_gitname/build"
    make DESTDIR="$pkgdir" docdir="/usr/share/doc/$pkgname" install
    # license?
    cd ..
    install -m644 jpegint.h "$pkgdir/usr/include"
}