diff options
author | skydrome | 2019-11-18 23:36:01 -0500 |
---|---|---|
committer | skydrome | 2019-11-18 23:36:01 -0500 |
commit | dbb8733213fb0ad8cec13b6666032c7420be5a17 (patch) | |
tree | f59136e38fadb423475e9e61e07e9c2672643640 | |
parent | ae9e8b1eec4f2025fa83dbece4870b2f7aae54dd (diff) | |
download | aur-dbb8733213fb0ad8cec13b6666032c7420be5a17.tar.gz |
add bootstrap script and bash completion
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rwxr-xr-x | bootstrap.sh | 24 | ||||
-rw-r--r-- | pyroscope.install | 12 | ||||
-rw-r--r-- | rtorrent.rc.sample | 3 |
5 files changed, 52 insertions, 15 deletions
@@ -15,6 +15,7 @@ pkgbase = rtorrent-pyro-git depends = curl depends = xmlrpc-c optdepends = ttf-dejavu: for utf8 glyphs + optdepends = python2: for pyroscope tools provides = rtorrent conflicts = rtorrent conflicts = rtorrent-git @@ -22,16 +23,20 @@ pkgbase = rtorrent-pyro-git backup = usr/share/doc/rtorrent/rtorrent.rc.sample source = git://github.com/rakshasa/rtorrent.git#branch=master source = https://github.com/skydrome/rtorrent/commit/c3697d3a82085194643e58e8ee06855e4d45a6dc.patch + source = https://raw.githubusercontent.com/pyroscope/pyrocore/master/src/pyrocore/data/config/bash-completion source = https://raw.githubusercontent.com/chros73/rtorrent-ps-ch/master/patches/command_pyroscope.cc source = https://raw.githubusercontent.com/chros73/rtorrent-ps-ch/master/patches/ui_pyroscope.cc source = https://raw.githubusercontent.com/chros73/rtorrent-ps-ch/master/patches/ui_pyroscope.h source = rtorrent.rc.sample + source = bootstrap.sh md5sums = SKIP md5sums = 5d41e09f61e346a6c055e36c243f00b5 + md5sums = efdb1a143d661dcda5a22e43bb28e36f md5sums = d68073da455851d628b587b852b4b54a md5sums = 5befaa2e705a550a6dcd7f397060df81 md5sums = 0e9791d796e2185279d7f109b064576b - md5sums = 35e2c69152a3c2137c5958f9f27cb906 + md5sums = ac6885720390a54fea906976eae84a9d + md5sums = 9edae7ef267b47d2445a667e98f6ea2d pkgname = rtorrent-pyro-git @@ -17,7 +17,8 @@ license=('GPL2') arch=('i686' 'x86_64' 'armv7h') depends=('libtorrent-pyro-git' 'ncurses' 'curl' 'xmlrpc-c') makedepends=('git' 'clang') -optdepends=('ttf-dejavu: for utf8 glyphs') +optdepends=('ttf-dejavu: for utf8 glyphs' + 'python2: for pyroscope tools') conflicts=('rtorrent' 'rtorrent-git' 'rtorrent-ps') provides=('rtorrent') install='pyroscope.install' @@ -35,17 +36,21 @@ backup=('usr/share/doc/rtorrent/rtorrent.rc.sample') _url='https://raw.githubusercontent.com/chros73/rtorrent-ps-ch/master/patches' source=("git://github.com/rakshasa/rtorrent.git#branch=$_branch" "https://github.com/skydrome/rtorrent/commit/c3697d3a82085194643e58e8ee06855e4d45a6dc.patch" + "https://raw.githubusercontent.com/pyroscope/pyrocore/master/src/pyrocore/data/config/bash-completion" "$_url/command_pyroscope.cc" "$_url/ui_pyroscope.cc" "$_url/ui_pyroscope.h" - "rtorrent.rc.sample") + "rtorrent.rc.sample" + "bootstrap.sh") md5sums=('SKIP' - '5d41e09f61e346a6c055e36c243f00b5' + '5d41e09f61e346a6c055e36c243f00b5' + 'efdb1a143d661dcda5a22e43bb28e36f' 'd68073da455851d628b587b852b4b54a' '5befaa2e705a550a6dcd7f397060df81' '0e9791d796e2185279d7f109b064576b' - '35e2c69152a3c2137c5958f9f27cb906') + 'ac6885720390a54fea906976eae84a9d' + '9edae7ef267b47d2445a667e98f6ea2d') pkgver() { cd rtorrent @@ -93,7 +98,9 @@ package() { cd rtorrent make DESTDIR="$pkgdir" install - install -Dm644 "$srcdir"/rtorrent.rc.sample "$pkgdir/usr/share/doc/rtorrent/rtorrent.rc.sample" - install -Dm644 doc/faq.xml "$pkgdir/usr/share/doc/rtorrent/faq.xml" - install -Dm644 doc/old/rtorrent.1 "$pkgdir/usr/share/man/man1/rtorrent.1" + install -Dm644 doc/faq.xml "$pkgdir/usr/share/doc/rtorrent/faq.xml" + install -Dm644 doc/old/rtorrent.1 "$pkgdir/usr/share/man/man1/rtorrent.1" + install -Dm755 ../bootstrap.sh "$pkgdir/usr/share/doc/rtorrent/bootstrap.sh" + install -Dm644 ../rtorrent.rc.sample "$pkgdir/usr/share/doc/rtorrent/rtorrent.rc.sample" + install -Dm644 ../bash-completion "$pkgdir/usr/share/bash-completion/completions/pyrocore" } diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 000000000000..1e39da80e3a8 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +_install() { + echo -e "\n>>> Creating rtorrent folder tree..." + mkdir -vp $HOME/.rtorrent/{downloads,session,logs,watch} + mkdir -p bin .local + + echo -en "\n>>> Checking PATH... " + [[ $PATH =~ "$HOME/bin:" ]] && + echo "ok" || { echo "add ~/bin to your PATH"; export PATH="$PATH:$HOME/bin"; } + + echo -e "\n>>> Installing pyroscope tools..." + git clone -q https://github.com/pyroscope/pyrocore.git .local/pyroscope ||exit 1 + ~/.local/pyroscope/update-to-head.sh python2 +} + +_update() { + git -C .local/pyroscope pull + ~/.local/pyroscope/update-to-head.sh python2 +} + +cd $HOME +[[ -d .local/pyroscope ]] && + _update || _install diff --git a/pyroscope.install b/pyroscope.install index be4ed5027ac0..0b9e82022fb2 100644 --- a/pyroscope.install +++ b/pyroscope.install @@ -1,11 +1,13 @@ post_install() { echo - echo " An updated rtorrent.rc file is installed to" - echo " /usr/share/doc/rtorrent/rtorrent.rc.sample" + echo " An updated rtorrent.rc file is provided at /usr/share/doc/rtorrent/rtorrent.rc.sample" echo " If you wish to use the pyrocore tools, you'll want to read" echo " https://code.google.com/p/pyroscope/wiki/UserConfiguration" + echo " A bootstrap script is provided at /usr/share/doc/rtorrent/bootstrap.sh" + echo " Run it as the user who will be using rtorrent" echo } -post_upgrade() { - post_install -} + +# post_upgrade() { +# post_install +# } diff --git a/rtorrent.rc.sample b/rtorrent.rc.sample index d1382b2d8228..023ef72457e0 100644 --- a/rtorrent.rc.sample +++ b/rtorrent.rc.sample @@ -45,8 +45,7 @@ schedule = watch_directory,5,5,"load.start=~/.rtorrent/watch/*.torrent,d.delete_ method.insert = pyro.extended, value|const, 1 method.insert = pyro.bin_dir, string|const, ~/bin/ -method.insert = pyro.rtorrent_rc, string|const|private, "$cat=~/.pyroscope/rtorrent-0.9.2.rc" -import = $pyro.rtorrent_rc= +import = ~/.pyroscope/rtorrent-pyro.rc # TORQUE: Daemon watchdog schedule # Must be activated by touching the "~/.pyroscope/run/pyrotorque" file! |