appstream.am 2.22 KB
Newer Older
1
2
3
4
5
# tarot implements the rules of the tarot game
# Copyright (C) 2019  Vivien Kraus

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation, version 3 of the License.
7
8
9
10
11
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
Vivien Kraus's avatar
Vivien Kraus committed
12
#
13
14
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Vivien Kraus's avatar
Vivien Kraus committed
15
16
17
18
19
20

metainfodir = $(datadir)/metainfo
dist_metainfo_DATA = %reldir%/eu.planete_kraus.Tarot.appdata.xml
EXTRA_DIST += \
  %reldir%/eu.planete_kraus.Tarot.appdata.xsl \
  %reldir%/eu.planete_kraus.Tarot.appdata.xml.in
Vivien Kraus's avatar
Vivien Kraus committed
21
MAINTAINERCLEANFILES += \
22
23
  $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml.in \
  $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml
Vivien Kraus's avatar
Vivien Kraus committed
24

Vivien Kraus's avatar
Vivien Kraus committed
25
26
$(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml.in: releases.xml %reldir%/eu.planete_kraus.Tarot.appdata.xsl
	$(XSLTPROC) $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xsl \
Vivien Kraus's avatar
Vivien Kraus committed
27
28
	            $(srcdir)/releases.xml \
	  | $(XMLLINT) --format - \
29
30
	  > %reldir%/eu.planete_kraus.Tarot.appdata.xml.in-t
	@mv %reldir%/eu.planete_kraus.Tarot.appdata.xml.in-t $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml.in
Vivien Kraus's avatar
Vivien Kraus committed
31
32
33
34
35
36

$(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml: %reldir%/eu.planete_kraus.Tarot.appdata.xml.in
	@cp $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml.in $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml
	$(AM_V_GEN) for locale in $$(cat $(srcdir)/po/LINGUAS) ; \
	do \
	  $(MSGFMT) --xml $(srcdir)/po/$$locale.po --template $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml \
37
	    -o %reldir%/eu.planete_kraus.Tarot.appdata.xml-t \
Vivien Kraus's avatar
Vivien Kraus committed
38
	    -l $$locale; \
39
	  mv %reldir%/eu.planete_kraus.Tarot.appdata.xml-t \
Vivien Kraus's avatar
Vivien Kraus committed
40
41
42
43
	    $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml ; \
	done
	@grep '<!--Copyright' $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml.in \
	    >> $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml
Vivien Kraus's avatar
Vivien Kraus committed
44
	$(APPSTREAM_UTIL) validate-strict --nonet $(srcdir)/%reldir%/eu.planete_kraus.Tarot.appdata.xml