summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 03edd37958f9380d1338992d6f8475e554e1a907 (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
51
52
53
54
55
56
57
# Maintainer: Christoph Korn <christoph.korn at posteo dot de>
pkgname=chatty
pkgver=0.8.7
pkgrel=2
pkgdesc="Twitch Chat Client for Desktop"
arch=('any')
url="https://chatty.github.io/"
license=('MIT')
depends=('java-environment' 'sh')
optdepends=('livestreamer: for watching streams in a custom video player.')
makedepends=('apache-ant' 'java-environment>=8')

source=("https://github.com/chatty/chatty/archive/v${pkgver}.tar.gz"
        "${pkgname}.png"
        "${pkgname}.desktop"
        "${pkgname}_script"
        "config_dir.patch"
        "manifest.patch"
        "disable_version_check.patch"
        "build.patch")
md5sums=('b06abd9b677acc028be4bb324846271e'
         '2bdf69cd81d941dba97d55694f9da26d'
         '9d8950b786e1af5614bc705ad478b019'
         'e79577c8044fbee51426aaeb7613501f'
         'b94cff3408dc359815283663610ab866'
         '6279e2e121741453561409ffed33a98d'
         '4e3d8490acd2f8ba700d03809a8ca8cf'
         'c6416522e0585c7ad3b3ff476dd4d0e8')

prepare() {
  cd chatty-${pkgver}
  patch -p1 -i $srcdir/build.patch
  patch -p1 -i $srcdir/config_dir.patch
  patch -p1 -i $srcdir/disable_version_check.patch
  patch -p1 -i $srcdir/manifest.patch
}

build() {
  cd chatty-${pkgver}
  JAVA_HOME=/usr/lib/jvm/java-8-openjdk ant
}

package(){
  install -Dm644 "${srcdir}/chatty-${pkgver}/dist/${pkgname}.jar" "${pkgdir}/usr/share/${pkgname}/${pkgname}.jar"
  mkdir -p "${pkgdir}/usr/share/${pkgname}"
  cp -a "${srcdir}/chatty-${pkgver}/assets" "${pkgdir}/usr/share/${pkgname}/"

  install -Dm755 "${srcdir}/${pkgname}_script" "${pkgdir}/usr/bin/${pkgname}"

  install -Dm644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
  install -Dm755 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"

  install -Dm644 "${srcdir}/chatty-${pkgver}/APACHE_LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/APACHE_LICENSE"
  install -Dm644 "${srcdir}/chatty-${pkgver}/LGPL" "${pkgdir}/usr/share/licenses/${pkgname}/LGPL"
  install -Dm644 "${srcdir}/chatty-${pkgver}/README.md" "${pkgdir}/usr/share/licenses/${pkgname}/MIT"
}