[gnome-ostree] Autogenerate release files



commit 5d753d693355f5d3daf451d654de11bb4709c7b6
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Fri Sep 14 23:40:49 2012 +0200

    Autogenerate release files
    
    Centralize OS name and version in configure.ac, and use configure
    substitutions to generate /etc/os-release and /etc/system-release
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684049

 Makefile-integration.am       |    8 +++++++-
 configure.ac                  |   13 ++++++++++++-
 src/integration/os-release    |    5 -----
 src/integration/os-release.in |    5 +++++
 4 files changed, 24 insertions(+), 7 deletions(-)
---
diff --git a/Makefile-integration.am b/Makefile-integration.am
index ba0831e..ed47e03 100644
--- a/Makefile-integration.am
+++ b/Makefile-integration.am
@@ -19,10 +19,16 @@ if SYSTEM_INTEGRATION
 INSTALL_DATA_HOOKS += integration-install-data-hook
 endif
 
-integration-install-data-hook:
+BUILT_SOURCES = system-release
+
+system-release: config.status
+	$(AM_V_GEN)echo "$(OS_PRETTY_NAME)" > $@
+
+integration-install-data-hook: $(top_srcdir)/src/integration/os-release system-release
 	mkdir -p $(DESTDIR)$(prefix)/lib/systemd/system
 	ln -sf gdm.service $(DESTDIR)$(prefix)/lib/systemd/system/display-manager.service
 	ln -sf NetworkManager.service $(DESTDIR)$(prefix)/lib/systemd/system/dbus-org.freedesktop.NetworkManager.service
 	install -D $(srcdir)/src/integration/os-release $(DESTDIR)$(sysconfdir)/os-release
+	install -D $(builddir)/system-release $(DESTDIR)$(sysconfdir)/system-release
 	install -D $(srcdir)/src/integration/lib-passwd $(DESTDIR)$(prefix)/lib/passwd
 	install -D $(srcdir)/src/integration/lib-group $(DESTDIR)$(prefix)/lib/group
diff --git a/configure.ac b/configure.ac
index b9d74aa..1ed4c18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,9 +1,19 @@
 AC_PREREQ([2.63])
-AC_INIT([gnome-ostree], [2012.3], [walters verbum org])
+AC_INIT([gnome-ostree], [2012.3], [walters verbum org], [gnome-ostree], [https://live.gnome.org/OSTree/GnomeOSTree])
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
 
+OS_NAME="GNOME-OSTree"
+OS_ID=$PACKAGE_TARNAME
+OS_VERSION=3.6
+OS_PRETTY_NAME="$OS_NAME ($OS_VERSION, OE-Core edison, $PACKAGE_VERSION)"
+
+AC_SUBST([OS_NAME])
+AC_SUBST([OS_ID])
+AC_SUBST([OS_VERSION])
+AC_SUBST([OS_PRETTY_NAME])
+
 AM_INIT_AUTOMAKE([1.11 -Wno-portability foreign no-define tar-ustar no-dist-gzip dist-xz])
 AM_MAINTAINER_MODE([enable])
 AM_SILENT_RULES([yes])
@@ -21,6 +31,7 @@ AC_ARG_ENABLE(system-integration,
 AM_CONDITIONAL(SYSTEM_INTEGRATION, test x$enable_system_integration != xno)
 
 AC_CONFIG_FILES([
+src/integration/os-release
 Makefile
 ])
 AC_OUTPUT
diff --git a/src/integration/os-release.in b/src/integration/os-release.in
new file mode 100644
index 0000000..d7934ee
--- /dev/null
+++ b/src/integration/os-release.in
@@ -0,0 +1,5 @@
+NAME="@OS_NAME@"
+ID="@OS_ID@"
+PRETTY_NAME="@OS_PRETTY_NAME@"
+VERSION="@OS_VERSION@"
+HOME_URL="@PACKAGE_URL@"



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