wok-6.x view slitaz-tools-boxes/receipt @ rev 24069

Add some current_version()
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jul 06 11:01:20 2021 +0000 (2021-07-06)
parents 8f9abd79c4da
children db9d9cb3c164
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-tools-boxes"
4 VERSION="1036"
5 CATEGORY="system-tools"
6 SHORT_DESC="All SliTaz GTK/Yad boxes to command line tools."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://www.slitaz.org/"
10 SOURCE="slitaz-tools"
11 TARBALL="$SOURCE-$VERSION.tar.bz2"
12 WGET_URL="http://hg.slitaz.org/slitaz-tools/archive/$VERSION.tar.bz2"
13 #CONFIG_FILES="/etc/wireless"
14 GENERIC_MENUS="no"
15 HOST_ARCH="i486 arm"
17 DEPENDS="slitaz-tools gettext-base yad xorg-xhost"
18 BUILD_DEPENDS="tzdata"
19 SIBLINGS="slitaz-tools tazdrop"
21 current_version()
22 {
23 wget -O - http://hg.slitaz.org/slitaz-tools/ 2>/dev/null | \
24 sed '/^Changeset/!d;s|.*">|http://hg.slitaz.org/slitaz-tools/rev/|;s|<.*||' | \
25 xargs wget -O - 2>/dev/null | sed '/rev /!d;s|.*rev ||;s| .*||'
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 make && make DESTDIR=$DESTDIR install-boxes
33 # make zone-mini.tab for timezone selector
34 TAB=$WOK/tzdata/install/usr/share/zoneinfo/zone.tab
35 OUT=$install/usr/share/zoneinfo/zone-mini.tab
36 echo -n > $OUT
37 ZONES="$(cat $TAB | sed '/#/ d' | cut -d' ' -f1,3 | sort -u)"
38 for COUNTRY in $(echo "$ZONES" | cut -d' ' -f1 | sort -u); do
39 echo -ne "$COUNTRY\t" >> $OUT
40 for LOC in $(echo "$ZONES" | sed -n "/$COUNTRY/ s|.*\t\(.*\)|\1|p"); do
41 echo -n "${LOC##*/} " >> $OUT
42 done
43 echo >> $OUT
44 done
45 sed -i 's| $||g' $OUT
46 # Remove historical locations for UA
47 sed -i 's| Uzhgorod Zaporozhye||' $OUT
49 # country names
50 cp -a $WOK/tzdata/install/usr/share/zoneinfo/iso3166.tab \
51 $install/usr/share/zoneinfo/
52 }
54 # Rules to gen a SliTaz package suitable for Tazpkg.
55 genpkg_rules()
56 {
57 mkdir -p $fs
58 cp -a $install/* $fs
59 # No CD-ROM on embedded devices
60 case "$ARCH" in
61 arm*)
62 rm -f $fs/usr/bin/burn-box
63 rm -f $fs/usr/share/applications/burn-*.desktop ;;
64 esac
65 chmod 0644 $fs/usr/share/locale/*/*/*.mo
66 chown -R root.root $fs
67 }