wok-current view tzdata/receipt @ rev 24462
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 16 21:07:01 2022 +0000 (2022-02-16) |
parents | 2fb468a8fde8 |
children | bc2b9d9bed6f |
line source
1 # SliTaz package receipt.
3 PACKAGE="tzdata"
4 VERSION="2019c"
5 CATEGORY="base-system"
6 SHORT_DESC="Time Zone Database."
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="PublicDomain"
9 WEB_SITE="https://www.iana.org/time-zones"
11 TARBALL="$PACKAGE$VERSION.tar.gz"
12 WGET_URL="ftp://ftp.iana.org/tz/releases/$TARBALL"
14 DEPENDS="glibc"
15 # genpkg_rules expect some locale-* build tree
16 BUILD_DEPENDS="glibc-dev locale-fr"
18 HOST_ARCH="i486 arm"
20 # What is the latest version available today?
21 current_version()
22 {
23 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
24 sed "/latest/d;/$PACKAGE[0-9]/!d;/tar/!d;s|.*$PACKAGE\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
25 }
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 ZONEINFO=$install/usr/share/zoneinfo
31 mkdir -p $ZONEINFO/posix
32 mkdir -p $ZONEINFO/right
34 tzs="etcetera southamerica northamerica europe africa antarctica asia \
35 australasia backward pacificnew systemv"
36 zic -L /dev/null -d $ZONEINFO -y "sh yearistype.sh" $tzs
37 zic -L /dev/null -d $ZONEINFO/posix -y "sh yearistype.sh" $tzs
38 zic -L leapseconds -d $ZONEINFO/right -y "sh yearistype.sh" $tzs
40 cp -a $src/zone.tab $src/zone1970.tab $src/iso3166.tab $ZONEINFO
41 zic -d $ZONEINFO -p America/New_York
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 cp -a $install/* $fs
49 . $WOK/slitaz-i18n/stuff/locale-pack.conf
50 for locale in $LOCALE_PACK
51 do
52 [ -d "$WOK/locale-$locale" ] || continue
53 echo "* Removing files provided by locale-$locale..."
54 files=$(cat $WOK/locale-$locale/taz/locale-$locale-*/files.list | \
55 grep /usr/share/zoneinfo/)
56 for file in $files
57 do
58 [ -e $fs/$file ] && rm -f $fs$file
59 done
60 done
61 }