From bb7cde9739da0c9efadf85c51d10e29ff2339715 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 18 Jul 2026 17:23:08 +0200 Subject: [PATCH] Update build-metapackage script to include build date and improve copyright information --- scripts/build-metapackage | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/build-metapackage b/scripts/build-metapackage index ae03fd1..3ce92e1 100755 --- a/scripts/build-metapackage +++ b/scripts/build-metapackage @@ -1,6 +1,7 @@ #!/bin/sh set -eu +umask 022 artifact_dir=${1:-kernel-artifacts} output_dir=${2:-dist} @@ -39,14 +40,29 @@ Upstream-Name: espos-kernel Source: https://github.com/esposlinux/espos-kernel-metapackage Files: * -Copyright: espOS Project +Copyright: 2026 espOS Project License: GPL-2+ This package may be redistributed and/or modified under the terms of the GNU General Public License version 2 or (at your option) any later version. EOF +if [ -n "${SOURCE_DATE_EPOCH:-}" ]; then + build_date=$(date -u -R -d "@$SOURCE_DATE_EPOCH") +else + build_date=$(date -R) +fi +cat > "$staging_dir/usr/share/doc/espos-kernel/changelog.Debian" < $build_date +EOF +gzip -9n "$staging_dir/usr/share/doc/espos-kernel/changelog.Debian" + +find "$staging_dir" -type d -exec chmod 0755 {} + +find "$staging_dir" -type f -exec chmod 0644 {} + chmod 0755 "$staging_dir/DEBIAN" -chmod 0644 "$staging_dir/DEBIAN/control" "$staging_dir/usr/share/doc/espos-kernel/copyright" package_file="$output_dir/espos-kernel_${METAPACKAGE_VERSION}_all.deb" dpkg-deb --root-owner-group --build "$staging_dir" "$package_file"