summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 51a9038719fe0e1c42d7a561082334b7df517951 (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
# Maintainer: Dries007 <admin@dries007.net>
pkgname=libphash-git
_pkgname=pHash
pkgver=r540.887d07b
pkgrel=1
pkgdesc="Perceptual hashing library, with audio & video support."
arch=(i686 x86_64)
url="http://phash.org/"
license=('GPL3')
depends=('mpg123' 'cimg' 'ffmpeg')
source=("$_pkgname::git+https://github.com/aetilius/pHash#branch=master")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/$_pkgname"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    mkdir -p "$srcdir/build"
    cd "$srcdir/build"
    cmake "$srcdir/$_pkgname" \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DWITH_VIDEO_HASH=1 \
        -DWITH_AUDIO_HASH=1
    make
}

package() {
    cd "$srcdir/build"
    make DESTDIR="$pkgdir" install
}