Update build-metapackage script to include build date and improve copyright information

This commit is contained in:
Daniel
2026-07-18 17:23:08 +02:00
parent 79d9f06f8a
commit bb7cde9739
+18 -2
View File
@@ -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" <<EOF
espos-kernel ($METAPACKAGE_VERSION) espos-unstable; urgency=medium
* Automatically generated metapackage for espOS kernel $KERNEL_VERSION.
-- espOS Project <danilacasito8@gmail.com> $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"