summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f20e15a82ac4bd45d2aea57cc2f21607c588ebb0 (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
# Maintainer: Dimitris Kiziridis <ragouel at outlook dot com>

pkgname=electorrent
pkgver=2.7.2
pkgrel=1
pkgdesc="A remote control client for ĀµTorrent, qBittorrent, rTorrent, Transmission, Synology & Deluge"
arch=('x86_64')
url='https://github.com/Tympanix/Electorrent'
license=('GPL3')
depends=('gtk3'
         'nss'
         'libxss')
makedepends=('gendesk' 'npm' 'libicns' 'graphicsmagick' 'gulp')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/tympanix/Electorrent/archive/v${pkgver}.tar.gz")
sha256sums=('efe72a668636197a43e59db067e22ebbf931760490baeb058ea96d38302fdaa4')

build() {
  cd "Electorrent-${pkgver}"
  rm -rf "${srcdir}/npm-cache"
  mkdir ${srcdir}/npm-cache
  npm install --cache "${srcdir}/npm-cache"
  npm run dist
}

package() {
  cd "Electorrent-${pkgver}"
  install -Dm644 build/png/512x512.png "${pkgdir}/usr/share/pixmaps/electorrent.png"
  gendesk -f -n --pkgname "${pkgname}" \
          --pkgdesc "$pkgdesc" \
          --name "Electorrent" \
          --comment "$pkgdesc" \
          --exec "${pkgname}" \
          --categories 'Utility;Network;Application' \
          --icon "${pkgname}"
  install -Dm644 "${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
  install -d "${pkgdir}/usr/bin"
  install -d "${pkgdir}/opt"
  cp -avR dist/linux-unpacked "${pkgdir}/opt/${pkgname}"
  ln -s /opt/${pkgname}/electorrent "${pkgdir}/usr/bin/electorrent"
  for i in 16 32 64 128 256 512; do
    install -Dm644 build/png/${i}x${i}.png \
    "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/electorrent.png"
  done
  # find "${pkgdir}/opt/${pkgname}" -type d -exec chmod 755 {} +
}