[gnome-packagekit] Generate the NEWS file automatically



commit d6fc386e28f3339fbef60bd49f62fbfb4ad57710
Author: Richard Hughes <richard hughsie com>
Date:   Fri Feb 13 10:42:15 2015 +0000

    Generate the NEWS file automatically

 Makefile.am                                   |   11 +-
 NEWS                                          | 2904 -------------------------
 configure.ac                                  |    1 +
 contrib/gnome-packagekit.spec.in              |    1 +
 data/appdata/gpk-application.appdata.xml.in   |   15 +
 data/appdata/gpk-update-viewer.appdata.xml.in |   22 +
 6 files changed, 49 insertions(+), 2905 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index fef4cde..4187a00 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,6 +31,7 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
 distclean-local:
        if test $(srdcir) = .; then :; else \
                rm -f ChangeLog; \
+               rm -f NEWS; \
        fi
 
 ChangeLog:
@@ -47,4 +48,12 @@ 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
diff --git a/configure.ac b/configure.ac
index 139fa18..ce3eae6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,6 +100,7 @@ PKG_CHECK_MODULES(GTK, \
  gtk+-3.0 >= 3.15.3 gdk-3.0 fontconfig)
 PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk3 >= 0.10)
 PKG_CHECK_MODULES(X11, x11)
+AC_PATH_PROG(APPSTREAM_UTIL, [appstream-util], [unfound])
 
 dnl **** Check for libnotify ****
 PKG_CHECK_MODULES(NOTIFY, libnotify >= 0.7.0)
diff --git a/contrib/gnome-packagekit.spec.in b/contrib/gnome-packagekit.spec.in
index 46e5be7..c11b51d 100644
--- a/contrib/gnome-packagekit.spec.in
+++ b/contrib/gnome-packagekit.spec.in
@@ -42,6 +42,7 @@ BuildRequires: docbook-utils
 BuildRequires: systemd-devel
 BuildRequires: polkit-devel
 BuildRequires: itstool
+BuildRequires: libappstream-glib
 
 %description
 gnome-packagekit provides session applications for the PackageKit API.
diff --git a/data/appdata/gpk-application.appdata.xml.in b/data/appdata/gpk-application.appdata.xml.in
index b897579..96199ee 100644
--- a/data/appdata/gpk-application.appdata.xml.in
+++ b/data/appdata/gpk-application.appdata.xml.in
@@ -22,6 +22,21 @@
     <screenshot 
type="default">https://git.gnome.org/browse/gnome-packagekit/plain/data/appdata/ss-application.png</screenshot>
     
<screenshot>https://git.gnome.org/browse/gnome-packagekit/plain/data/appdata/ss-application-details.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.4" timestamp="1421625600"/>
+    <release version="3.15.3" timestamp="1418774400">
+      <description>
+        <p>This release fixes the following bug:</p>
+        <ul>
+          <li>Avoid conflict with new GTK+ API</li>
+        </ul>
+      </description>
+    </release>
+  </releases>
   <url type="homepage">http://www.packagekit.org/</url>
   <updatecontact>richard_at_hughsie.com</updatecontact>
 </application>
diff --git a/data/appdata/gpk-update-viewer.appdata.xml.in b/data/appdata/gpk-update-viewer.appdata.xml.in
index c7b2ebc..12f64eb 100644
--- a/data/appdata/gpk-update-viewer.appdata.xml.in
+++ b/data/appdata/gpk-update-viewer.appdata.xml.in
@@ -19,6 +19,28 @@
   <screenshots>
     <screenshot 
type="default">https://git.gnome.org/browse/gnome-packagekit/plain/data/appdata/ss-updater.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.4" timestamp="1421625600">
+      <description>
+        <p>This release fixes the following bugs:</p>
+        <ul>
+          <li>Add suitable Keywords to the package updater desktop file</li>
+        </ul>
+      </description>
+    </release>
+    <release version="3.15.3" timestamp="1418774400">
+      <description>
+        <p>This release fixes the following bug:</p>
+        <ul>
+          <li>Avoid conflict with new GTK+ API</li>
+        </ul>
+      </description>
+    </release>
+  </releases>
   <url type="homepage">http://www.packagekit.org/</url>
   <updatecontact>richard_at_hughsie.com</updatecontact>
 </application>


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