Last active
August 29, 2015 13:57
-
-
Save dchusovitin/9469152 to your computer and use it in GitHub Desktop.
PKGBUILD for yandex-disk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Marochkin Sergey <me@ziggi.org> | |
# Contributor: Dmitry Chusovitin <dchusovitin@gmail.com> | |
pkgname='yandex-disk' | |
pkgver=0.1.4.504 | |
pkgrel=3 | |
pkgdesc='Yandex.Disk keeps your files with you at all times.' | |
arch=('i686' 'x86_64') | |
url='http://disk.yandex.ru/' | |
license=('custom') | |
depends=('glibc>=2.4' 'gcc-libs>=4.4.3') | |
_arch='i386' | |
[ "$CARCH" = "x86_64" ] && _arch='amd64' | |
install=yandex-disk.install | |
source=("http://repo.yandex.ru/yandex-disk/deb/pool/main/y/yandex-disk/yandex-disk_${pkgver}_${_arch}.deb" | |
"yandex-disk.install" | |
"yandex-disk.service") | |
md5sums=('b342b34b5503213944c8223e10ebb7ec' | |
'584be219c1e31ba01d83778a56837096' | |
'ee5d64c7097b4837d6315e278ef81b12') | |
[ "$CARCH" = "x86_64" ] && | |
md5sums=('2e89d48eb804f1f83b4f06fb235d19bd' | |
'584be219c1e31ba01d83778a56837096' | |
'ee5d64c7097b4837d6315e278ef81b12') | |
package() { | |
cd $srcdir | |
ar x *.deb | |
bsdtar xf data.tar.gz -C $pkgdir | |
install -Dm644 "${srcdir}/yandex-disk.service" "${pkgdir}/usr/lib/systemd/user/yandex-disk.service" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_install() { | |
echo ">>> Use 'yandex-disk setup' for initial configure" | |
echo ">>> Use 'systemctl --user enable yandex-disk.service' for load with system start" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Yandex-Disk service | |
After=local-fs.target network.target | |
[Service] | |
Type=simple | |
ExecStart=/bin/sh -c "/usr/bin/yandex-disk --no-daemon `cat %h/.config/yandex-disk/config.cfg | grep '=' | xargs -l1 -I0 echo -n '--0 '`" | |
ExecReload=/usr/bin/killall -qw yandex-disk | |
RestartSec=60 | |
Restart=always | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment