[gnome-packagekit] Remove automake build system



commit e684d643b4b8f6daf58e2e299ac31ad57ac419f2
Author: Richard Hughes <richard hughsie com>
Date:   Tue Apr 4 14:18:58 2017 +0100

    Remove automake build system

 Makefile.am                             |   78 ----------
 TODO                                    |    6 -
 autogen.sh                              |   38 -----
 configure                               |  143 +++++++++++++++++++
 configure.ac                            |  236 -------------------------------
 contrib/gnome-packagekit.spec.in        |   13 +-
 data/Makefile.am                        |   44 ------
 data/appdata/Makefile.am                |   12 --
 data/icons/16x16/Makefile.am            |    3 -
 data/icons/16x16/actions/Makefile.am    |   17 ---
 data/icons/16x16/status/Makefile.am     |   44 ------
 data/icons/22x22/Makefile.am            |    3 -
 data/icons/22x22/actions/Makefile.am    |   17 ---
 data/icons/22x22/status/Makefile.am     |   46 ------
 data/icons/24x24/Makefile.am            |    3 -
 data/icons/24x24/actions/Makefile.am    |   18 ---
 data/icons/24x24/status/Makefile.am     |   44 ------
 data/icons/48x48/Makefile.am            |    3 -
 data/icons/48x48/actions/Makefile.am    |   18 ---
 data/icons/48x48/status/Makefile.am     |   44 ------
 data/icons/Makefile.am                  |   16 --
 data/icons/create-application-icons.sh  |   24 ++--
 data/icons/scalable/Makefile.am         |    3 -
 data/icons/scalable/actions/Makefile.am |   18 ---
 data/icons/scalable/status/Makefile.am  |   44 ------
 docs/Makefile.am                        |    1 -
 git.mk                                  |  200 --------------------------
 man/Makefile.am                         |   37 -----
 meson.build                             |    5 +-
 src/Makefile.am                         |  219 ----------------------------
 30 files changed, 163 insertions(+), 1234 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-packagekit.spec.in b/contrib/gnome-packagekit.spec.in
index 9502a19..d97162d 100644
--- a/contrib/gnome-packagekit.spec.in
+++ b/contrib/gnome-packagekit.spec.in
@@ -29,6 +29,7 @@ BuildRequires: systemd-devel
 BuildRequires: polkit-devel
 BuildRequires: itstool
 BuildRequires: libappstream-glib
+BuildRequires: meson
 
 # the top level package depends on all the apps to make upgrades work
 Requires: %{name}-installer
@@ -75,14 +76,11 @@ without rebooting.
 %setup -q
 
 %build
-%configure --enable-systemd
-make %{?_smp_mflags}
+%meson
+%meson_build
 
 %install
-%make_install
-
-# nuke the ChangeLog file, it's huge
-rm -f $RPM_BUILD_ROOT%{_datadir}/doc/gnome-packagekit-*/ChangeLog
+%meson_install
 
 %find_lang %name --with-gnome
 
@@ -107,7 +105,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 
 %files common -f %{name}.lang
 %license COPYING
-%doc AUTHORS NEWS README
+%doc AUTHORS
 %{_bindir}/gpk-log
 %{_bindir}/gpk-prefs
 %dir %{_datadir}/gnome-packagekit
@@ -117,7 +115,6 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 %dir %{_datadir}/gnome-packagekit/icons/hicolor/*/*
 %{_datadir}/gnome-packagekit/icons/hicolor/*/*/*.png
 %{_datadir}/gnome-packagekit/icons/hicolor/scalable/*/*.svg*
-%{_datadir}/icons/hicolor/*/*/*.png
 %{_datadir}/icons/hicolor/scalable/*/*.svg*
 %{_datadir}/man/man1/gpk-log.1*
 %{_datadir}/man/man1/gpk-prefs.1*
diff --git a/data/icons/create-application-icons.sh b/data/icons/create-application-icons.sh
index db26920..1a8511b 100644
--- a/data/icons/create-application-icons.sh
+++ b/data/icons/create-application-icons.sh
@@ -6,20 +6,22 @@ if [ -z $MESON_INSTALL_PREFIX ]; then
     exit 1
 fi
 
-PKGICONSDIR="${DESTDIR:-}${MESON_INSTALL_PREFIX}/share/gnome-packagekit/icons/hicolor";
+PKGICONSDIR="../../../../gnome-packagekit/icons/hicolor";
 ICONSDIR="${DESTDIR:-}${MESON_INSTALL_PREFIX}/share/icons/hicolor";
 echo ${ICONSDIR}
 mkdir -p ${ICONSDIR}/scalable/apps
 mkdir -p ${ICONSDIR}/scalable/mimetypes
-ln -fs ${PKGICONSDIR}/scalable/status/pk-package-sources.svg \
-    ${ICONSDIR}/scalable/apps/gpk-repo.svg
-ln -fs ${PKGICONSDIR}/scalable/status/pk-package-info.svg \
-    ${ICONSDIR}/scalable/apps/gpk-log.svg
-ln -fs ${PKGICONSDIR}/scalable/status/pk-update-high.svg \
-    ${ICONSDIR}/scalable/apps/gpk-prefs.svg
-ln -fs ${PKGICONSDIR}/scalable/status/pk-package-info.svg \
-    ${ICONSDIR}/scalable/mimetypes/application-x-package-list.svg
-ln -fs ${PKGICONSDIR}/scalable/status/pk-collection-installed.svg \
-    ${ICONSDIR}/scalable/mimetypes/application-x-catalog.svg
+
+cd ${ICONSDIR}/scalable/apps
+ln -sf ${PKGICONSDIR}/scalable/status/pk-package-sources.svg gpk-repo.svg
+ln -sf ${PKGICONSDIR}/scalable/status/pk-package-info.svg gpk-log.svg
+ln -sf ${PKGICONSDIR}/scalable/status/pk-update-high.svg gpk-prefs.svg
+ln -sf ${PKGICONSDIR}/scalable/status/pk-package-sources.svg gpk-repo.svg
+cd -
+
+cd ${ICONSDIR}/scalable/mimetypes
+ln -sf ${PKGICONSDIR}/scalable/status/pk-package-info.svg application-x-package-list.svg
+ln -sf ${PKGICONSDIR}/scalable/status/pk-collection-installed.svg application-x-catalog.svg
+cd -
 
 echo "Finished custom install step"
diff --git a/meson.build b/meson.build
index 79d131f..2346053 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@
 #
 # Licensed under the GNU General Public License Version 2 or later
 project('gnome-packagekit', 'c',
-  version : '3.22.2',
+  version : '3.25.1',
   default_options : ['warning_level=1'],
   meson_version : '>=0.37.0'
 )
@@ -86,7 +86,6 @@ add_global_link_arguments(
 gio = dependency('gio-2.0', version : '>= 2.25.9')
 gtk = dependency('gtk+-3.0', version : '>= 3.15.3')
 packagekit = dependency('packagekit-glib2', version : '>= 0.9.1')
-upower = dependency('upower-glib', version : '>= 0.9.1')
 libm = cc.find_library('libm', required: false)
 
 if get_option('enable-systemd')
@@ -113,7 +112,7 @@ conf.set_quoted('BINDIR',
 conf.set_quoted('PKGDATADIR',
                 join_paths(get_option('prefix'),
                            get_option('datadir'),
-                           'gnome-software'))
+                           'gnome-packagekit'))
 configure_file(
   output : 'config.h',
   configuration : conf


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