aboutsummaryrefslogtreecommitdiff
path: root/extra/tzdata/build
blob: d334d2a5059b8a78128471c8734a4d4b79c10c63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh -e

pkg_dir=$1

make CC="${CC:-gcc}" LDFLAGS="$LDFLAGS -static"
make DESTDIR="$1" install

# Get rid of the sbin directory
mv "$1/usr/sbin/zic" "$1/usr/bin/zic"
rm -rf "$1/usr/sbin"
rm -rf "${1:?}/etc"

set -- africa asia australasia europe northamerica southamerica

./zic -d "$pkg_dir/usr/share/zoneinfo" "$@"
./zic -d "$pkg_dir/usr/share/zoneinfo/posix" "$@"
./zic -d "$pkg_dir/usr/share/zoneinfo/right" -L leapseconds "$@"
./zic -d "$pkg_dir/usr/share/zoneinfo" -p America/New_York

# The 'tzselect' script is not great by any means, but it will work with most
# POSIX compatible shells, if not all.
clsed '1c#!/bin/sh' "$pkg_dir/usr/bin/tzselect"