wok view yandex-disk/receipt @ rev 25794
created recipe for exo-lang
author | Hans-G?nter Theisgen |
---|---|
date | Wed Oct 23 16:19:52 2024 +0100 (4 weeks ago) |
parents | 98ec0fc5e9e9 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="yandex-disk"
4 VERSION="0.1.6.1080"
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"
14 BUILD_DEPENDS="gettext"
16 # What is the latest version available today?
17 current_version()
18 {
19 repo='http://repo.yandex.ru/yandex-disk/deb/pool/main/y/yandex-disk/'
20 wget -q -T10 -O- $repo | fgrep i386 | cut -d'"' -f2 | cut -d'_' -f2
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 # Get current (and the one) version
27 repo='http://repo.yandex.ru/yandex-disk/deb/pool/main/y/yandex-disk/'
28 url=$(wget -q -T10 -O- $repo | fgrep i386 | cut -d'"' -f2)
29 # for example, url='yandex-disk_0.1.5.978_i386.deb'
31 version=$(echo $url | cut -d'_' -f2)
32 # for example, version='0.1.5.978'
33 [ -n "$version" ] || exit 1
35 # Hot changing VERSION in this receipt
36 sed -i "/^VERSION=/s/.*$/VERSION=\"$version\"/" $WOK/$PACKAGE/receipt
38 TARBALL="$PACKAGE-$version.deb"
40 # Get current package
41 [ -s $SRC/$TARBALL ] || wget -O $SRC/$TARBALL "$repo$url"
43 # Extract filesystem from package
44 mkdir -p $install
45 dpkg-deb -x $SRC/$TARBALL $install
47 # Add SliTaz desktop integration
48 cp -a $stuff/usr $install
50 # Add translations for desktop integration
51 cd $stuff/po
52 make DESTDIR=$install install
53 make clean
54 }
56 # Rules to gen a SliTaz package suitable for Tazpkg.
57 genpkg_rules()
58 {
59 cook_copy_files yandex-disk copyright *.mo \
60 publish unpublish test status *.desktop yandex-disk-helper
61 cook_copy_icons
62 }
64 pre_remove()
65 {
66 killall -q yandex-disk
67 }