summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9f6cfbb1ad205ed32b3f9c77ae51ff2833fff9c6 (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
# Maintainer: Martin Kröning <m dot kroening at hotmail dot de>
pkgname=make-fmv-patch-git
pkgver=r15.a73d316
pkgrel=1
pkgdesc='Make FMV patch generator'
arch=('any')
url="https://github.com/clearlinux/${pkgname%-git}"
license=('MIT')
depends=('perl' 'ctags' 'gcc>=6.0.0')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/clearlinux/${pkgname%-git}.git"
        "${pkgname%-git}-log-format.patch")
sha256sums=('SKIP'
            '396f194ba9a8a9f3680adfab742120506ee13263de89cb86e1570755e1551a25')

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

prepare() {
        cd "$srcdir/${pkgname%-git}"
        patch -p1 -i "$srcdir/${pkgname%-git}-log-format.patch"
}

check() {
        cd "$srcdir/${pkgname%-git}/tests"
        make distclean all

        cd "$srcdir/${pkgname%-git}"
        [[ -n "$(perl make-fmv-patch.pl tests/loop-build.log tests)" ]]
        [[ -n "$(perl make-fmv-patch.pl tests/max-build.log tests)" ]]
}

package() {
        cd "$srcdir/${pkgname%-git}"
        install -Dm755 make-fmv-patch.pl "$pkgdir/usr/bin/make-fmv-patch"
        install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}