Skip to content
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
aa527a1
Create tzdata package
Eeems Jan 4, 2021
30cc4cc
Update package
Eeems Jan 4, 2021
781edf4
Update package
Eeems Jan 4, 2021
0bdf9fa
Update package
Eeems Jan 4, 2021
41dfc37
Update package
Eeems Jan 4, 2021
468230c
Update package
Eeems Jan 4, 2021
6b709ce
Update package
Eeems Jan 4, 2021
bded744
Update package
Eeems Jan 4, 2021
5ed2fc4
Update package
Eeems Jan 4, 2021
b3d977b
Update package
Eeems Jan 4, 2021
4f9220b
Update package-build
Eeems Jan 4, 2021
e39021d
Update package
Eeems Jan 4, 2021
b552319
Force workdir no longer be relative
Eeems Jan 4, 2021
d175e42
Update package
Eeems Jan 4, 2021
0cf6479
Update package
Eeems Jan 4, 2021
bb02df0
Update package
Eeems Jan 4, 2021
1ce33ec
Update package
Eeems Jan 4, 2021
e5b8bb7
Merge branch 'testing' into Eeems-patch-4
Eeems Jan 5, 2021
3856b69
Merge branch 'testing' into Eeems-patch-4
Eeems Jan 5, 2021
208ac35
Update package
Eeems Jan 5, 2021
d61513e
Fix build for arm
Eeems Jan 5, 2021
db3bca8
Use the latest zic to create files
Eeems Jan 5, 2021
ef3c08c
move zic to /opt/bin
Eeems Jan 5, 2021
ef4baef
Fix zic location
Eeems Jan 5, 2021
8d58ca8
Merge branch 'testing' into Eeems-patch-4
Eeems Jan 10, 2021
b399088
Merge branch 'testing' into Eeems-patch-4
Eeems Jan 12, 2021
4cded4f
Rename to zoneinfo-utils and remove zoneinfo data
Eeems Jan 12, 2021
9634d0f
Update package
Eeems Jan 12, 2021
a17d89f
Update package
Eeems Jan 12, 2021
07a906b
Update package
Eeems Jan 12, 2021
cb9f330
Merge branch 'testing' into Eeems-patch-4
matteodelabre Jan 13, 2021
630eeb5
Merge branch 'testing' into Eeems-patch-4
Eeems Jan 16, 2021
c6ecbbd
Apply suggestions from code review
Eeems Jan 16, 2021
0f8a92a
Update package
Eeems Jan 16, 2021
3ce408b
Update package
Eeems Jan 16, 2021
47d55c1
Update package
Eeems Jan 16, 2021
7a321d9
Update package
Eeems Jan 16, 2021
2f388eb
Merge branch 'testing' into Eeems-patch-4
Eeems Jan 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions package/zoneinfo-utils/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/env bash
# Copyright (c) 2020 The Toltec Contributors
# SPDX-License-Identifier: MIT

# Inspired by https://github.com/archlinux/svntogit-packages/blob/packages/tzdata/trunk/PKGBUILD

pkgnames=(zoneinfo-utils)
pkgdesc="Utilities for interacting with zoneinfo files"
url=https://www.iana.org/time-zones
_tzver=2020f
pkgver="$_tzver"-1
timestamp=2020-05-04T06:16Z
section=utils
maintainer="Eeems <[email protected]>"
license="custom: public domain"
depends=()
image=base:v1.2.1

source=(
"https://www.iana.org/time-zones/repository/releases/tzcode${_tzver}.tar.gz"
"https://www.iana.org/time-zones/repository/releases/tzdata${_tzver}.tar.gz"
)
sha256sums=(
cfeeea2a7745164f64bd9f6d76e47916f4ac820c4434493674adbbd4324329c5
121131918c3ae6dc5d40f0eb87563a2be920b71a76e2392c09519a5e4a666881
)

prepare() {
sed -i "s:sbin:bin:" Makefile
}

build() {
# Upgrade gawk to latest to avoid a bug
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y gawk

mkdir .x86
pushd .x86 > /dev/null

shopt -s extglob
cp -r ../* .
make LFLAGS="${LDFLAGS}"

popd > /dev/null

make LFLAGS="${LDFLAGS}" CC=arm-linux-gnueabihf-cc
}

package() {
pushd "${srcdir}" > /dev/null
local zic=.x86/zic
# install tzcode stuff
make DESTDIR="${pkgdir}" zic="$zic" install
# install license
install -Dm644 LICENSE "${pkgdir}"/opt/usr/share/licenses/tzdata/LICENSE

popd > /dev/null

mv "${pkgdir}"/usr/{lib,share/man} "${pkgdir}"/opt/usr
mv "${pkgdir}"/usr/{s,}bin "${pkgdir}"/opt

install -D -m 644 -t "$pkgdir"/opt/share/zoneinfo "$srcdir"/iso3166.tab
install -D -m 644 -t "$pkgdir"/opt/share/zoneinfo "$srcdir"/zone1970.tab

# cleanup
rm -rf "${pkgdir:?}"/{etc,usr}
}
20 changes: 10 additions & 10 deletions scripts/package-build
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ readonly recipedir="$1"
load-recipe-header "$1"
shift

readonly workdir="$1"
[[ -d $workdir ]] && files="$(ls -qA -- "$workdir")" && [[ -n $files ]] \
&& error "Working directory '$workdir' exists and is not empty"
mkdir -p "$workdir"
[[ -d $1 ]] && files="$(ls -qA -- "$1")" && [[ -n $files ]] \
&& error "Working directory '$1' exists and is not empty"
mkdir -p "$1"
readonly workdir="$(realpath "$1")"
shift

readonly requestedpkgs=("$@")
Expand Down Expand Up @@ -139,12 +139,6 @@ for pkgname in "${pkgnames[@]}"; do
readonly pkgdir="$worksubdir"/pkg
mkdir "$pkgdir"

readonly ctldir="$worksubdir"/control
mkdir "$ctldir"

readonly ardir="$worksubdir"/ar
mkdir "$ardir"

# Run packaging script
package

Expand All @@ -165,6 +159,9 @@ SCRIPT
tree -np "$pkgdir" | tail +2
fi

readonly ctldir="$worksubdir"/control
mkdir "$ctldir"

# Create control file
readonly ctlfile="$ctldir"/control

Expand Down Expand Up @@ -265,6 +262,9 @@ SCRIPT
fi
done

readonly ardir="$worksubdir"/ar
mkdir "$ardir"

# Create archives
section "Creating archive"
readonly pkgar="$ardir"/data.tar.gz
Expand Down