forked from espos/base-files
Update build-metapackage script to include build date and improve copyright information
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user