[gnome-software] Remove the automake build system



commit c480ee6e09e6299146f32b383296aa80d29f15b0
Author: Richard Hughes <richard hughsie com>
Date:   Mon Apr 10 13:38:34 2017 +0100

    Remove the automake build system

 Makefile.am                                |   90 -----
 autogen.sh                                 |   26 --
 configure                                  |  143 +++++++
 configure.ac                               |  552 ----------------------------
 contrib/gnome-software.spec.in             |   25 +-
 data/Makefile.am                           |   62 ---
 data/appdata/Makefile.am                   |   10 -
 data/icons/Makefile.am                     |    4 -
 data/icons/hicolor/16x16/Makefile.am       |    4 -
 data/icons/hicolor/22x22/Makefile.am       |    4 -
 data/icons/hicolor/24x24/Makefile.am       |    4 -
 data/icons/hicolor/256x256/Makefile.am     |    4 -
 data/icons/hicolor/32x32/Makefile.am       |    4 -
 data/icons/hicolor/48x48/Makefile.am       |    4 -
 data/icons/hicolor/Makefile.am             |   10 -
 data/icons/hicolor/scalable/Makefile.am    |    6 -
 data/tests/Makefile.am                     |    4 -
 doc/Makefile.am                            |    3 -
 doc/api/Makefile.am                        |  109 ------
 git.mk                                     |  350 ------------------
 glib-tap.mk                                |  134 -------
 lib/Makefile.am                            |  101 -----
 m4/.gitignore                              |    1 -
 m4/as-linguas.m4                           |   24 --
 m4/glibtests.m4                            |   28 --
 plugins/Makefile.am                        |   67 ----
 plugins/core/Makefile.am                   |   82 ----
 plugins/dpkg/Makefile.am                   |   24 --
 plugins/dummy/Makefile.am                  |   24 --
 plugins/epiphany/Makefile.am               |   32 --
 plugins/external-appstream/Makefile.am     |   18 -
 plugins/fedora-distro-upgrades/Makefile.am |   12 -
 plugins/fedora-tagger-usage/Makefile.am    |   12 -
 plugins/flatpak/Makefile.am                |   42 ---
 plugins/flatpak/tests/Makefile.am          |   26 --
 plugins/fwupd/Makefile.am                  |   34 --
 plugins/limba/Makefile.am                  |   21 -
 plugins/modalias/Makefile.am               |   24 --
 plugins/odrs/Makefile.am                   |   21 -
 plugins/ostree/Makefile.am                 |   18 -
 plugins/packagekit/Makefile.am             |  103 -----
 plugins/repos/Makefile.am                  |   24 --
 plugins/shell-extensions/Makefile.am       |   23 --
 plugins/snap/Makefile.am                   |   31 --
 plugins/steam/Makefile.am                  |   21 -
 plugins/ubuntu-reviews/Makefile.am         |   20 -
 plugins/ubuntuone/Makefile.am              |   14 -
 src/Makefile.am                            |  330 -----------------
 tests/Makefile.am                          |   13 -
 49 files changed, 155 insertions(+), 2587 deletions(-)
---
diff --git a/configure b/configure
new file mode 100755
index 0000000..b2a0754
--- /dev/null
+++ b/configure
@@ -0,0 +1,143 @@
+#!/bin/bash
+# configure script adapter for Meson
+# Based on build-api: https://github.com/cgwalters/build-api
+# Copyright 2010, 2011, 2013 Colin Walters <walters verbum org>
+# Copyright 2016 Emmanuele Bassi
+# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
+
+# Build API variables:
+# buildapi-variable-require-builddir
+
+# Little helper function for reading args from the commandline.
+# it automatically handles -a b and -a=b variants, and returns 1 if
+# we need to shift $3.
+read_arg() {
+    # $1 = arg name
+    # $2 = arg value
+    # $3 = arg parameter
+    local rematch='^[^=]*=(.*)$'
+    if [[ $2 =~ $rematch ]]; then
+       read "$1" <<< "${BASH_REMATCH[1]}"
+    else
+       read "$1" <<< "$3"
+       # There is no way to shift our callers args, so
+       # return 1 to indicate they should do it instead.
+       return 1
+    fi
+}
+
+sanitycheck() {
+    # $1 = arg name
+    # $1 = arg command
+    # $2 = arg alternates
+    local cmd=$( which $2 2>/dev/null )
+
+    if [ -x "$cmd" ]; then
+        read "$1" <<< "$cmd"
+        return 0
+    fi
+
+    test -z $3 || {
+        for alt in $3; do
+            cmd=$( which $alt 2>/dev/null )
+
+            if [ -x "$cmd" ]; then
+                read "$1" <<< "$cmd"
+                return 0
+            fi
+        done
+    }
+
+    echo -e "\e[1;31mERROR\e[0m: Command '$2' not found"
+    exit 1
+}
+
+
+sanitycheck MESON 'meson'
+sanitycheck NINJA 'ninja' 'ninja-build'
+
+enable_docs='-Denable-gtk-doc=false'
+enable_man='-Denable-man=false'
+enable_introspection=''
+
+while (($# > 0)); do
+    case "${1%%=*}" in
+       --prefix) read_arg prefix "$@" || shift;;
+       --bindir) read_arg bindir "$@" || shift;;
+       --sbindir) read_arg sbindir "$@" || shift;;
+       --libexecdir) read_arg libexecdir "$@" || shift;;
+       --datarootdir) read_arg datarootdir "$@" || shift;;
+       --datadir) read_arg datadir "$@" || shift;;
+       --sysconfdir) read_arg sysconfdir "$@" || shift;;
+       --libdir) read_arg libdir "$@" || shift;;
+       --mandir) read_arg mandir "$@" || shift;;
+       --includedir) read_arg includedir "$@" || shift;;
+       --enable-gtk-doc) enable_docs='-Denable-gtk-doc=true';;
+       --disable-gtk-doc) enable_docs='-Denable-gtk-doc=false';;
+       --enable-man) enable_man='-Denable-man=true';;
+       --disable-man) enable_man='-Denable-man=false';;
+       --enable-introspection) enable_introspection='';;
+       --disable-introspection) enable_introspection='-Ddisable_introspection=true';;
+       *) echo -e "\e[1;33mINFO\e[0m: Ignoring unknown option '$1'";;
+    esac
+    shift
+done
+
+# Defaults
+test -z ${prefix} && prefix="/usr/local"
+test -z ${bindir} && bindir=${prefix}/bin
+test -z ${sbindir} && sbindir=${prefix}/sbin
+test -z ${libexecdir} && libexecdir=${prefix}/bin
+test -z ${datarootdir} && datarootdir=${prefix}/share
+test -z ${datadir} && datadir=${datarootdir}
+test -z ${sysconfdir} && sysconfdir=${prefix}/etc
+test -z ${libdir} && libdir=${prefix}/lib
+test -z ${mandir} && mandir=${prefix}/share/man
+test -z ${includedir} && includedir=${prefix}/include
+
+# The source directory is the location of this file
+srcdir=$(dirname $0)
+
+# Wrapper Makefile for Ninja
+cat > Makefile <<END
+# Generated by configure; do not edit
+
+all:
+       CC="\$(CC)" CXX="\$(CXX)" ${NINJA}
+
+install:
+       DESTDIR="\$(DESTDIR)" ${NINJA} install
+END
+
+echo "Summary:"
+echo "  meson:....... ${MESON}"
+echo "  ninja:....... ${NINJA}"
+echo "  prefix:...... ${prefix}"
+echo "  bindir:...... ${bindir}"
+echo "  sbindir:..... ${sbindir}"
+echo "  libexecdir:.. ${libexecdir}"
+echo "  datarootdir:. ${datarootdir}"
+echo "  datadir:..... ${datadir}"
+echo "  sysconfdir:.. ${sysconfdir}"
+echo "  libdir:...... ${libdir}"
+echo "  mandir:...... ${mandir}"
+echo "  includedir:.. ${includedir}"
+echo "  additional:.."
+echo "    - ${enable_docs} ${enable_man} ${enable_introspection}"
+
+exec ${MESON} \
+       --prefix=${prefix} \
+       --libdir=${libdir} \
+       --libexecdir=${libexecdir} \
+       --datadir=${datadir} \
+       --sysconfdir=${sysconfdir} \
+       --bindir=${bindir} \
+       --includedir=${includedir} \
+       --mandir=${mandir} \
+       --default-library shared \
+       ${enable_docs} \
+       ${enable_man} \
+       ${enable_introspection} \
+       ${srcdir}
+
+# vim: ai ts=8 noet sts=2 ft=sh
diff --git a/contrib/gnome-software.spec.in b/contrib/gnome-software.spec.in
index 0760628..0e5022a 100644
--- a/contrib/gnome-software.spec.in
+++ b/contrib/gnome-software.spec.in
@@ -87,24 +87,23 @@ the source tree. Most users do not need this subpackage installed.
 %setup -q
 
 %build
-%configure \
-    --disable-static \
-    --disable-tests \
-    --disable-snap \
-    --enable-gudev \
+%meson \
+    -Denable-tests=false \
+    -Denable-snap=false \
+    -Denable-ubuntu-reviews=false \
+    -Denable-gudev=true \
 %if %{with packagekit}
-    --enable-packagekit \
+    -Denable-packagekit=true \
 %else
-    --disable-packagekit \
+    -Denable-packagekit=false \
 %endif
-    --disable-external-appstream \
-    --disable-silent-rules
-make %{?_smp_mflags}
+    -Ddisable-external-appstream=false
+%meson_build
 
 %install
-%make_install
+%meson_install
 
-rm %{buildroot}%{_libdir}/gs-plugins-%{gs_plugin_version}/*.la
+#rm %{buildroot}%{_libdir}/gs-plugins-%{gs_plugin_version}/*.la
 
 # make the software center load faster
 desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.desktop \
@@ -139,7 +138,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
 glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 
 %files -f %{name}.lang
-%doc AUTHORS NEWS README
+%doc AUTHORS README
 %license COPYING
 %{_bindir}/gnome-software
 %{_datadir}/applications/*.desktop


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