summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 261437e5f8d25ab89becfc347058e0c52ef8807b (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
# Maintainer: Felix Golatofski <contact@xdfr.de>
# Contributor: David Birks <david@tellus.space>
# Contributor: Piotr Rogoza <piotr dot r dot public at gmail dot com>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Sergei Lebedev <superbobry at gmail dot com>

pkgname=rutorrent
_pkgname=ruTorrent
pkgver=5.0.0
_pkgver=$pkgver
pkgrel=1
pkgdesc="Yet another web front-end for rTorrent"
arch=('any')
url='https://github.com/Novik/ruTorrent'
license=('GPL')
depends=(php curl gzip coreutils)
optdepends=('mod_scgi: for SCGI protocol')
conflicts=(rutorrent-plugins)
source=( 
    $pkgname-$_pkgver.tar.gz::https://github.com/Novik/ruTorrent/archive/v${_pkgver}.tar.gz
    apache.example.conf
    apache.example.site.conf
)
sha256sums=('ddfdf5ab873d50a55eca7fc7f0e0d9fa335418b57920025566729c2431f28f75'
            '79b5aab7ef928727b3ec2aa0f1b0869310adde11cd774d148c03025deb6dec0c'
            '9afe7d2a9aadb5fd6a0fcd907f7f46bdc3630c369a5a684c51bbeeb5b4d354aa')
backup=( 
    etc/webapps/rutorrent/conf/config.php
    etc/webapps/rutorrent/conf/plugins.ini
    etc/webapps/rutorrent/conf/access.ini
)
options=(emptydirs !strip)

prepare() {
    cd $srcdir/$_pkgname-$_pkgver
    rm -f .gitignore
    msg2 "Removing files with Russian letters in filenames"
    cd plugins/tracklabels/labels
    find . -print0 | perl -MFile::Path=remove_tree -n0e 'chomp; remove_tree($_, {verbose=>1}) if /[[:^ascii:][:cntrl:]]/'
}
package() {
    cd $srcdir/$_pkgname-$_pkgver
  
    install -d "$pkgdir"/usr/share/webapps
    install -d "$pkgdir"/etc/webapps/$pkgname
  
    cp -r conf "$pkgdir"/etc/webapps/$pkgname/
    cp -r . "$pkgdir"/usr/share/webapps/$pkgname/
  
    rm -rf "$pkgdir"/usr/share/webapps/$pkgname/conf
  
    install -Dm644 ../apache.example.conf "$pkgdir"/etc/webapps/rutorrent/
    install -Dm644 ../apache.example.site.conf "$pkgdir"/etc/webapps/rutorrent/
  
    cd "$pkgdir"/usr/share/webapps/$pkgname
    ln -s /etc/webapps/$pkgname/conf
  
    #fix perms
    #chown http\: $pkgdir/usr/share/webapps/$pkgname/share/{settings,torrents,users}
    chmod 0777 $pkgdir/usr/share/webapps/$pkgname/share/{settings,torrents,users}
}