po: Update German man pages translation
[dpkg.git] / scripts / mk / pkg-info.mk
blobcfd456af1a0e7b60a0f609c100e9f8dfb3bb52f8
1 # This Makefile fragment (since dpkg 1.16.1) defines the following package
2 # information variables:
4 # DEB_SOURCE: source package name.
5 # DEB_VERSION: package's full version (epoch + upstream vers. + revision).
6 # DEB_VERSION_EPOCH_UPSTREAM: package's version without the Debian revision.
7 # DEB_VERSION_UPSTREAM_REVISION: package's version without the Debian epoch.
8 # DEB_VERSION_UPSTREAM: package's upstream version.
9 # DEB_DISTRIBUTION: distribution(s) listed in the current debian/changelog
10 # entry.
12 # SOURCE_DATE_EPOCH: source release date as seconds since the epoch, as
13 # specified by <https://reproducible-builds.org/specs/source-date-epoch/>
14 # (since dpkg 1.18.8).
15 # If it is undefined, the date of the latest changelog entry is used.
16 # In both cases, the value is exported.
18 ifndef dpkg_pkg_info_mk_included
19 dpkg_pkg_info_mk_included = yes
21 dpkg_parsechangelog_run = $(eval $(shell dpkg-parsechangelog | sed -n '\
22 s/^Distribution: \(.*\)/$$(eval DEB_DISTRIBUTION:=\1)/p;\
23 s/^Source: \(.*\)/$$(eval DEB_SOURCE:=\1)/p;\
24 s/^Version: \([0-9]*:\)\?\([^-]*\)\(\(.*\)-[^-]*\)\?$$/\
25 $$(eval DEB_VERSION:=\1\2\3)\
26 $$(eval DEB_VERSION_EPOCH_UPSTREAM:=\1\2\4)\
27 $$(eval DEB_VERSION_UPSTREAM_REVISION:=\2\3)\
28 $$(eval DEB_VERSION_UPSTREAM:=\2\4)/p;\
29 s/^Timestamp: \(.*\)/$$(eval SOURCE_DATE_EPOCH?=\1)/p'))
31 ifdef SOURCE_DATE_EPOCH
32 dpkg_lazy_eval ?= $(eval $(1) = $(2)$$($(1)))
33 $(call dpkg_lazy_eval,DEB_DISTRIBUTION,$$(dpkg_parsechangelog_run))
34 $(call dpkg_lazy_eval,DEB_SOURCE,$$(dpkg_parsechangelog_run))
35 $(call dpkg_lazy_eval,DEB_VERSION,$$(dpkg_parsechangelog_run))
36 $(call dpkg_lazy_eval,DEB_VERSION_EPOCH_UPSTREAM,$$(dpkg_parsechangelog_run))
37 $(call dpkg_lazy_eval,DEB_VERSION_UPSTREAM,$$(dpkg_parsechangelog_run))
38 $(call dpkg_lazy_eval,DEB_UPSTREAM_REVISION,$$(dpkg_parsechangelog_run))
39 else
40 # We need to compute the values right now.
41 $(dpkg_parsechangelog_run)
42 endif
43 export SOURCE_DATE_EPOCH
45 endif # dpkg_pkg_info_mk_included