summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 419f50016a9d514eeffb803c48d45a9ddedff8bc (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
# 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=3.10
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=('dac1e3e0079eb475066d6be738b8372596fa382b074792db5ecab31bce6cfa6d'
            '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}
}