summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f8ead82e7f0efbe0792fc21582e66ad7db2d69a4 (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
# Maintainer: Gladyshev Ilya <fixfromdarkness@cock.li>

pkgname=popcorntime-ru-bin
_pkgname=popcorntime-ru
pkgver=0.4.4
pkgrel=1
pkgdesc="Stream free movies and TV shows from torrents with Russian translation"
arch=('x86_64')
url="https://popcorn-ru.tk"
license=('GPL3')
depends=('nss' 'ttf-font' 'libxss' 'gtk2' 'gtk3')
makedepends=('unzip')
provides=('popcorntime' 'popcorntime-ce')
conflicts=('popcorntime' 'popcorntime-ce')
options=('!strip')
_zipfile="Popcorn-Time-Ru-${pkgver}-linux64.zip"
source=("https://github.com/popcorn-time-ru/popcorn-desktop/releases/download/v${pkgver}/${_zipfile}"
        "${_pkgname}.desktop" )
sha256sums=('5a890d792466f50151056ccf8c681bb809434da737fd27bb6efb9ab289b9e542'
            '144dc8864d74abed5022b354ecd34b9a7bc6a0f0fdd442e0bac438c2ce6c4c5b')

package() {
  install -dm755 "${pkgdir}/usr/share/${_pkgname}"
  install -dm755 "${pkgdir}/usr/bin"

  # Link to program
  ln -s "../share/${_pkgname}/Popcorn-Time-Ru" "${pkgdir}/usr/bin/${_pkgname}"

  # Desktop file
  install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"

  # Icon
  install -Dm644 "${srcdir}/src/app/images/icon.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/${_pkgname}.png"

  # Remove makepkg-created symlinks before copying content
  rm "$_zipfile" "${_pkgname}.desktop"

  # Copy complete content of source archive to /usr/share/${_pkgname}
  cp -a "${srcdir}"/* "${pkgdir}/usr/share/${_pkgname}"

  # Fix permissions
  find "${pkgdir}/usr/share/${_pkgname}/" -perm 600 -exec chmod 644 '{}' \;
  find "${pkgdir}/usr/share/${_pkgname}/" -perm 700 -exec chmod 755 '{}' \;
}