diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:45:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:45:20 +0000 |
commit | 9a08cbfcc1ef900a04580f35afe2a4592d7d6030 (patch) | |
tree | 004cc7027bca2f2c0bcb5806527c8e0c48df2d6e /scripts/mk/pkg-info.mk | |
parent | Initial commit. (diff) | |
download | dpkg-upstream/1.19.8.tar.xz dpkg-upstream/1.19.8.zip |
Adding upstream version 1.19.8.upstream/1.19.8upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/mk/pkg-info.mk')
-rw-r--r-- | scripts/mk/pkg-info.mk | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/mk/pkg-info.mk b/scripts/mk/pkg-info.mk new file mode 100644 index 0000000..15322ce --- /dev/null +++ b/scripts/mk/pkg-info.mk @@ -0,0 +1,24 @@ +# Makefile snippet defining the following variables: +# +# DEB_SOURCE: the source package name +# DEB_VERSION: the full version of the package (epoch + upstream vers. + revision) +# DEB_VERSION_EPOCH_UPSTREAM: the package's version without the Debian revision +# DEB_VERSION_UPSTREAM_REVISION: the package's version without the Debian epoch +# DEB_VERSION_UPSTREAM: the package's upstream version +# DEB_DISTRIBUTION: the distribution(s) listed in the current entry of debian/changelog +# +# SOURCE_DATE_EPOCH: the source release date as seconds since the epoch, as +# specified by <https://reproducible-builds.org/specs/source-date-epoch/> + +dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1))) + +DEB_SOURCE = $(call dpkg_late_eval,DEB_SOURCE,dpkg-parsechangelog -SSource) +DEB_VERSION = $(call dpkg_late_eval,DEB_VERSION,dpkg-parsechangelog -SVersion) +DEB_VERSION_EPOCH_UPSTREAM = $(call dpkg_late_eval,DEB_VERSION_EPOCH_UPSTREAM,echo '$(DEB_VERSION)' | sed -e 's/-[^-]*$$//') +DEB_VERSION_UPSTREAM_REVISION = $(call dpkg_late_eval,DEB_VERSION_UPSTREAM_REVISION,echo '$(DEB_VERSION)' | sed -e 's/^[0-9]*://') +DEB_VERSION_UPSTREAM = $(call dpkg_late_eval,DEB_VERSION_UPSTREAM,echo '$(DEB_VERSION_EPOCH_UPSTREAM)' | sed -e 's/^[0-9]*://') +DEB_DISTRIBUTION = $(call dpkg_late_eval,DEB_DISTRIBUTION,dpkg-parsechangelog -SDistribution) + +SOURCE_DATE_EPOCH ?= $(call dpkg_late_eval,SOURCE_DATE_EPOCH,dpkg-parsechangelog -STimestamp) + +export SOURCE_DATE_EPOCH |