提交 207d38f7 编写于 作者: P Pavel Hrdina

po/Makefile.am: use SOURCE_DATE_EPOCH to set POT creation date

When building RPMs for libvirt the PO files are part of libvirt-libs
package.  Now that we generate libvirt.pot during build time the POT
creation date is also generated at that time.

The issue here is that when building libvirt-libs for x86_64 and i686
the generated libvirt.pot file will have different POT creation date
which affects installed PO files as well which leads to conflict when
installing both x86_64 and i686 packages.
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 26cbb23e
......@@ -45,10 +45,19 @@ XGETTEXT_ARGS = \
--msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \
$(NULL)
POT_CREATION_DATE = $(shell \
if test -n "$$SOURCE_DATE_EPOCH"; \
then \
date --date="@$$SOURCE_DATE_EPOCH" +"%F %R%z"; \
else \
date +'%F %R%z'; \
fi)
SED_PO_FIXUP_ARGS = \
-e "s|text/plain; charset=CHARSET|text/plain; charset=UTF-8|g" \
-e "s|SOME DESCRIPTIVE TITLE|Libvirt package strings|g" \
-e "s|Copyright (C) YEAR|Copyright (C) $$(date +'%Y')|" \
-e "s|POT-Creation-Date:[^\]*|POT-Creation-Date: $(POT_CREATION_DATE)|" \
$(NULL)
update-po: $(POFILES)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册