wok view yandex-disk/receipt @ rev 19523

Add yandex-disk (with custom desktop integration)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Nov 27 18:29:04 2016 +0200 (2016-11-27)
parents
children 98ec0fc5e9e9
line source
1 # SliTaz package receipt.
3 PACKAGE="yandex-disk"
4 VERSION="0.1.5.978"
5 CATEGORY="misc"
6 SHORT_DESC="Yandex.Disk keeps your files with you at all times"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="custom"
9 WEB_SITE="https://disk.yandex.ru/"
10 #TARBALL="$PACKAGE-$VERSION.deb"
11 COOKOPTS="!extradesktops"
13 DEPENDS="gcc-lib-base glibc-base zlib"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 # Get current (and the one) version
19 repo='http://repo.yandex.ru/yandex-disk/deb/pool/main/y/yandex-disk/'
20 url=$(wget -q -T10 -O- $repo | fgrep i386 | cut -d'"' -f2)
21 # for example, url='yandex-disk_0.1.5.978_i386.deb'
23 version=$(echo $url | cut -d'_' -f2)
24 # for example, version='0.1.5.978'
25 [ -n "$version" ] || exit 1
27 # Hot changing VERSION in this receipt
28 sed -i "/^VERSION=/s/.*$/VERSION=\"$version\"/" $WOK/$PACKAGE/receipt
30 TARBALL="$PACKAGE-$version.deb"
32 # Get current package
33 [ -s $SRC/$TARBALL ] || wget -O $SRC/$TARBALL "$repo$url"
35 # Extract filesystem from package
36 mkdir -p $install
37 dpkg-deb -x $SRC/$TARBALL $install
39 # Add SliTaz desktop integration
40 cp -a $stuff/usr $install
42 # Add translations for desktop integration
43 cd $stuff/po
44 make DESTDIR=$install install
45 make clean
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 cook_copy_files yandex-disk copyright *.mo \
52 publish unpublish test status *.desktop yandex-disk-helper
53 cook_copy_icons
54 }
56 pre_remove()
57 {
58 killall -q yandex-disk
59 }