[gnome-power-manager] Generate the NEWS file automatically



commit 42d9577a8b23af88c2e08acb40522706d5fe138c
Author: Richard Hughes <richard hughsie com>
Date:   Thu Feb 5 10:12:06 2015 +0000

    Generate the NEWS file automatically

 Makefile.am                                        |   13 +-
 NEWS                                               | 3202 --------------------
 configure.ac                                       |    1 +
 data/appdata/gnome-power-statistics.appdata.xml.in |   13 +
 4 files changed, 26 insertions(+), 3203 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index df01f50..155ed78 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,12 +32,15 @@ MAINTAINERCLEANFILES =                                      \
        ltmain.sh                                       \
        missing                                         \
        mkinstalldirs                                   \
+       ChangeLog                                       \
+       NEWS                                            \
        omf.make                                        \
        xmldocs.make
 
 distclean-local:
        if test $(srdcir) = .; then :; else \
                rm -f ChangeLog; \
+               rm -f NEWS; \
        fi
 
 ChangeLog:
@@ -54,6 +57,14 @@ ChangeLog:
          echo A git checkout and git-log is required to generate this file >> $@); \
        fi
 
-.PHONY: ChangeLog
+NEWS: data/appdata/*.appdata.xml
+       $(AM_V_GEN) \
+       if test -e $(APPSTREAM_UTIL); then \
+               $(APPSTREAM_UTIL) appdata-to-news $^ > $@; \
+       else \
+               touch $@; \
+       fi
+
+.PHONY: ChangeLog NEWS
 
 -include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index 37d6cf6..9ca3307 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,6 +76,7 @@ PKG_CHECK_MODULES(GNOME, [
  cairo >= 1.0.0])
 
 PKG_CHECK_MODULES(UPOWER, upower-glib >= 0.9.1)
+AC_PATH_PROG(APPSTREAM_UTIL, [appstream-util], [unfound])
 
 dnl ---------------------------------------------------------------------------
 dnl - Build self tests
diff --git a/data/appdata/gnome-power-statistics.appdata.xml.in 
b/data/appdata/gnome-power-statistics.appdata.xml.in
index 0bfe573..fa69ac5 100644
--- a/data/appdata/gnome-power-statistics.appdata.xml.in
+++ b/data/appdata/gnome-power-statistics.appdata.xml.in
@@ -3,6 +3,8 @@
 <application>
   <id type="desktop">gnome-power-statistics.desktop</id>
   <licence>CC0</licence>
+  <_name>GNOME Power Statistics</_name>
+  <_summary>Observe power management</_summary>
   <description>
     <_p>
       Power Statistics can show historical and current battery information and
@@ -18,6 +20,17 @@
     <screenshot 
type="default">https://git.gnome.org/browse/gnome-power-manager/plain/data/appdata/gpm-stats-history.png</screenshot>
     
<screenshot>https://git.gnome.org/browse/gnome-power-manager/plain/data/appdata/gpm-stats-wakeups.png</screenshot>
   </screenshots>
+  <!--
+   Validate with `appstream-util validate *.appdata.xml`
+   Use `date -d "2010-10-02" "+%s"` to get the timestamp.
+  -->
+  <releases>
+    <release version="3.15.90" timestamp="1390089600">
+      <description>
+        <p>This release updates the header style to match other GNOME applications.</p>
+      </description>
+    </release>
+  </releases>
   <url type="homepage">http://www.gnome.org/projects/gnome-power-manager/</url>
   <updatecontact>richard_at_hughsie.com</updatecontact>
 </application>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]