summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ef46da14c4d5bd5125d0cf0859e367026d7c4d8a (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
# Maintainer: Samuel Walladge <samuel at swalladge dot id dot au>

pkgname=imdb-rename-git
_pkgname=imdb-rename
pkgver=r26.92a7801
pkgrel=1
makedepends=('rust' 'cargo' 'git')
depends=('openssl')
conflicts=('imdb-rename')
provides=('imdb-rename')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
pkgdesc='A command line utility for searching IMDb and renaming your media files.'
url='https://github.com/BurntSushi/imdb-rename'
license=('Unlicense/MIT')
source=("${pkgname}::git+https://github.com/BurntSushi/${_pkgname}")
sha512sums=('SKIP')

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

build() {
    cd "${srcdir}/${pkgname}/"

    # make sure both binaries are built
    cargo build --release --all
}


package() {
    cd "${srcdir}/${pkgname}/"

    # install the binaries
    install -Dm755 "target/release/imdb-rename" "${pkgdir}/usr/bin/imdb-rename"
    install -Dm755 "target/release/imdb-eval" "${pkgdir}/usr/bin/imdb-eval"

    # licenses and documentation
    install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
    install -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${_pkgname}/COPYING"
    install -Dm644 "LICENSE-MIT" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE-MIT"
    install -Dm644 "UNLICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/UNLICENSE"
}