summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9fceb1b661b12dbcbc0eb15bccf4da93db4ac9ac (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer: Konstantin Shalygin <k0ste@k0ste.ru>
# Contributor: Konstantin Shalygin <k0ste@k0ste.ru>
# Contributor : Dobroslaw Kijowski <dobo90_at_gmail.com>
# Contributor: Paul N. Maxwell <msg.maxwel@gmail.com>

pkgbase='transgui'
pkgname=("${pkgbase}-qt" "${pkgbase}-gtk")
pkgver='5.18.0'
pkgrel='1'
pkgdesc='A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.'
arch=('i686' 'x86_64')
url="https://github.com/transmission-remote-gui/${pkgbase}"
license=("GPL")
makedepends=('lazarus' 'qt5pas' 'gtk2')
source=("${url}/archive/v${pkgver}.tar.gz"
        "${pkgbase}.desktop")
sha256sums=('d1cbb16eb35d41e76f4a171a3887053899e8dc6a1124afc21615b5038ea60d78'
            '6c1723e084bd4afc908957e005dea60f919b42426d82cbcdee89239c64c6093d')

prepare() {
  cd "${srcdir}/${pkgbase}-${pkgver}"
  mkdir "${srcdir}/build-qt" "${srcdir}/build-gtk"
}

package_transgui-qt() {
  depends=('qt5pas')
  conflicts=('transgui-gtk2-git' 'transgui-qt4-git' 'transmission-remote-gui-qt4'
	    'transmission-remote-gui-gtk2' 'transmission-remote-gui-bin' 'transgui-gtk')

  cd "${srcdir}/${pkgbase}-${pkgver}"
  make clean

  lazbuild "${pkgbase}.lpi" \
  --lazarusdir="/usr/lib/lazarus" \
  --widgetset="qt5" \
  --primary-config-path=../build-qt

  install -Dm755 "units/${pkgbase}" "${pkgdir}/usr/bin/${pkgbase}"
  install -dm755 "${pkgdir}/usr/share/${pkgbase}/lang"
  install -Dm644 "lang"/transgui.* "${pkgdir}/usr/share/${pkgbase}/lang" 
  install -dm755 "${pkgdir}/usr/share/doc/${pkgbase}"
  install -Dm644 README.md history.txt LICENSE "${pkgdir}/usr/share/doc/${pkgbase}"
  install -Dm644 "${pkgbase}.png" "${pkgdir}/usr/share/pixmaps/${pkgbase}.png"
  install -Dm644 "${srcdir}/${pkgbase}.desktop" "${pkgdir}/usr/share/applications/${pkgbase}.desktop"

  rm "${pkgdir}/usr/share/${pkgbase}/lang/transgui.template"
}

package_transgui-gtk() {
  depends=('gtk2')
  conflicts=('transgui-gtk2-git' 'transgui-qt4-git' 'transmission-remote-gui-qt4'
	    'transmission-remote-gui-gtk2' 'transmission-remote-gui-bin' 'transgui-qt')

  cd "${srcdir}/${pkgbase}-${pkgver}"
  make clean

  lazbuild "${pkgbase}.lpi" \
  --lazarusdir="/usr/lib/lazarus" \
  --widgetset="gtk2" \
  --primary-config-path=../build-gtk

  install -Dm755 "units/${pkgbase}" "${pkgdir}/usr/bin/${pkgbase}"
  install -dm755 "${pkgdir}/usr/share/${pkgbase}/lang"
  install -Dm644 "lang"/transgui.* "${pkgdir}/usr/share/${pkgbase}/lang" 
  install -dm755 "${pkgdir}/usr/share/doc/${pkgbase}"
  install -Dm644 README.md history.txt LICENSE "${pkgdir}/usr/share/doc/${pkgbase}"
  install -Dm644 "${pkgbase}.png" "${pkgdir}/usr/share/pixmaps/${pkgbase}.png"
  install -Dm644 "${srcdir}/${pkgbase}.desktop" "${pkgdir}/usr/share/applications/${pkgbase}.desktop"

  rm "${pkgdir}/usr/share/${pkgbase}/lang/transgui.template"
}