wok annotate 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 |
rev | line source |
---|---|
al@19523 | 1 # SliTaz package receipt. |
al@19523 | 2 |
al@19523 | 3 PACKAGE="yandex-disk" |
pascal@25783 | 4 VERSION="0.1.6.1080" |
al@19523 | 5 CATEGORY="misc" |
al@19523 | 6 SHORT_DESC="Yandex.Disk keeps your files with you at all times" |
al@19523 | 7 MAINTAINER="al.bobylev@gmail.com" |
al@19523 | 8 LICENSE="custom" |
al@19523 | 9 WEB_SITE="https://disk.yandex.ru/" |
al@19523 | 10 #TARBALL="$PACKAGE-$VERSION.deb" |
al@19523 | 11 COOKOPTS="!extradesktops" |
al@19523 | 12 |
al@19523 | 13 DEPENDS="gcc-lib-base glibc-base zlib" |
al@19823 | 14 BUILD_DEPENDS="gettext" |
al@19523 | 15 |
pascal@25783 | 16 # What is the latest version available today? |
pascal@25783 | 17 current_version() |
pascal@25783 | 18 { |
pascal@25783 | 19 repo='http://repo.yandex.ru/yandex-disk/deb/pool/main/y/yandex-disk/' |
pascal@25783 | 20 wget -q -T10 -O- $repo | fgrep i386 | cut -d'"' -f2 | cut -d'_' -f2 |
pascal@25783 | 21 } |
pascal@25783 | 22 |
al@19523 | 23 # Rules to configure and make the package. |
al@19523 | 24 compile_rules() |
al@19523 | 25 { |
al@19523 | 26 # Get current (and the one) version |
al@19523 | 27 repo='http://repo.yandex.ru/yandex-disk/deb/pool/main/y/yandex-disk/' |
al@19523 | 28 url=$(wget -q -T10 -O- $repo | fgrep i386 | cut -d'"' -f2) |
al@19523 | 29 # for example, url='yandex-disk_0.1.5.978_i386.deb' |
al@19523 | 30 |
al@19523 | 31 version=$(echo $url | cut -d'_' -f2) |
al@19523 | 32 # for example, version='0.1.5.978' |
al@19523 | 33 [ -n "$version" ] || exit 1 |
al@19523 | 34 |
al@19523 | 35 # Hot changing VERSION in this receipt |
al@19523 | 36 sed -i "/^VERSION=/s/.*$/VERSION=\"$version\"/" $WOK/$PACKAGE/receipt |
al@19523 | 37 |
al@19523 | 38 TARBALL="$PACKAGE-$version.deb" |
al@19523 | 39 |
al@19523 | 40 # Get current package |
al@19523 | 41 [ -s $SRC/$TARBALL ] || wget -O $SRC/$TARBALL "$repo$url" |
al@19523 | 42 |
al@19523 | 43 # Extract filesystem from package |
al@19523 | 44 mkdir -p $install |
al@19523 | 45 dpkg-deb -x $SRC/$TARBALL $install |
al@19523 | 46 |
al@19523 | 47 # Add SliTaz desktop integration |
al@19523 | 48 cp -a $stuff/usr $install |
al@19523 | 49 |
al@19523 | 50 # Add translations for desktop integration |
al@19523 | 51 cd $stuff/po |
al@19523 | 52 make DESTDIR=$install install |
al@19523 | 53 make clean |
al@19523 | 54 } |
al@19523 | 55 |
al@19523 | 56 # Rules to gen a SliTaz package suitable for Tazpkg. |
al@19523 | 57 genpkg_rules() |
al@19523 | 58 { |
al@19523 | 59 cook_copy_files yandex-disk copyright *.mo \ |
al@19523 | 60 publish unpublish test status *.desktop yandex-disk-helper |
al@19523 | 61 cook_copy_icons |
al@19523 | 62 } |
al@19523 | 63 |
al@19523 | 64 pre_remove() |
al@19523 | 65 { |
al@19523 | 66 killall -q yandex-disk |
al@19523 | 67 } |