From 5bd93641258b7f5f3fae67177249a2bef0c499a7 Mon Sep 17 00:00:00 2001 From: Florian Müllner Date: Feb 09 2019 03:25:07 +0000 Subject: [PATCH 1/3] metadata: Update URL The project was moved to pagure a long time ago. https://pagure.io/background-logo-extension/pull-request/9 --- diff --git a/metadata.json.in b/metadata.json.in index 082714a..afe9084 100644 --- a/metadata.json.in +++ b/metadata.json.in @@ -4,5 +4,5 @@ "description": "Overlay a tasteful logo on the background to enhance the user experience", "settings-schema": "@settings_schema@", "shell-version": ["@shell_version@"], -"url": "https://git.fedorahosted.org/git/background-logo-extension.git" +"url": "https://pagure.io/background-logo-extension" } From fcd43d6c2fbd06a4fee2a4e8bfb800978923a708 Mon Sep 17 00:00:00 2001 From: Florian Müllner Date: Feb 09 2019 03:25:22 +0000 Subject: [PATCH 2/3] build: Support meson It's what all the cool kids use nowadays. https://pagure.io/background-logo-extension/pull-request/9 --- diff --git a/meson-postinstall.sh b/meson-postinstall.sh new file mode 100755 index 0000000..400edee --- /dev/null +++ b/meson-postinstall.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# Package managers set this so we don't need to run +if [ -z "$DESTDIR" ]; then + echo Compiling GSettings schemas... + glib-compile-schemas ${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas +fi diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..667bd0b --- /dev/null +++ b/meson.build @@ -0,0 +1,78 @@ +project('background-logo-extension', + version: '3.24.0', + meson_version: '>= 0.40.0' +) + +sources = [ + 'extension.js', + 'prefs.js' +] +extra_sources = ['COPYING', 'convenience.js'] + +schemas = ['org.fedorahosted.background-logo-extension'] + +uuid = 'background-logo@fedorahosted.org' + +ver_arr = meson.project_version().split('.') +if ver_arr[1].to_int().is_even() + shell_version = '@0@.@1@'.format(ver_arr[0], ver_arr[1]) +else + shell_version = '.'.join(ver_arr) +endif + +datadir = get_option('datadir') +extensiondir = join_paths(datadir, 'gnome-shell', 'extensions') +schemadir = join_paths(datadir, 'glib-2.0', 'schemas') + +have_schemas = schemas.length() > 0 + +metaconf = configuration_data() +metaconf.set('uuid', uuid) +metaconf.set('shell_version', shell_version) +if have_schemas + metaconf.set('settings_schema', schemas[0]) +endif + +meta = [ + configure_file( + input: 'metadata.json.in', + output: 'metadata.json', + configuration: metaconf + ) +] + +install_data(sources + extra_sources + meta, + install_dir: join_paths(extensiondir, uuid) +) + +foreach s : schemas + install_data('schemas/@0@.gschema.xml'.format(s), + install_dir: schemadir + ) +endforeach + +if have_schemas + meson.add_install_script('meson-postinstall.sh') +endif + +extension_tool = find_program('gnome-extensions', required: false) +if extension_tool.found() + builddir = meson.current_build_dir() + srcdir = meson.current_source_dir() + + command = [ + extension_tool, + 'pack', + '--force', + '--out-dir=@0@'.format(builddir), + '--extra-source=@0@/metadata.json'.format(builddir) + ] + + foreach s : extra_sources + command += '--extra-source=@0@'.format(s) + endforeach + + command += srcdir + + run_target('zip-file', command: command) +endif From 91bc8ff51a7e1d72f97219df552525af91203b02 Mon Sep 17 00:00:00 2001 From: Florian Müllner Date: Feb 09 2019 03:25:30 +0000 Subject: [PATCH 3/3] build: Remove autotools support It's all-meson from now on. https://pagure.io/background-logo-extension/pull-request/9 --- diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 688c967..0000000 --- a/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -UUID := background-logo@fedorahosted.org -SCHEMA := org.fedorahosted.background-logo-extension -NULL := - -extensiondir = $(datadir)/gnome-shell/extensions/$(UUID) -dist_extension_DATA = \ - COPYING \ - convenience.js \ - extension.js \ - prefs.js \ - $(NULL) -nodist_extension_DATA = metadata.json - -EXTRA_DIST = metadata.json.in - -metadata.json: metadata.json.in $(builddir)/config.status - $(AM_V_GEN) sed \ - -e "s|[@]uuid@|$(UUID)|" \ - -e "s|[@]shell_version@|$(SHELL_VERSION)|" \ - -e "s|[@]settings_schema@|$(SCHEMA)|" \ - $< > $@ - -CLEANFILES = metadata.json - -gsettings_SCHEMAS = $(srcdir)/schemas/$(SCHEMA).gschema.xml -@GSETTINGS_RULES@ - -EXTRA_DIST += \ - $(gsettings_SCHEMAS) \ - $(NULL) - -CLEANFILES += schemas/gschemas.compiled - -zip_content = \ - $(dist_extension_DATA) \ - $(nodist_extension_DATA) \ - $(gsettings_SCHEMAS) \ - schemas/gschemas.compiled \ - $(NULL) - -schemas/gschemas.compiled: schemas/$(SCHEMA).gschema.xml - $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) schemas - -zip: $(UUID).zip $(zip_content) -$(UUID).zip: $(zip_content) - @rm -f $(builddir)/*.zip - $(AM_V_GEN) zip -qr $@ $^ diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 0df97d8..0000000 --- a/autogen.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -PKG_NAME="background-logo-extension" - -test -f $srcdir/configure.ac || { - echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" - echo " top-level background-logo-extension directory" - exit 1 -} - -which gnome-autogen.sh || { - echo "You need to install gnome-common from GNOME Git (or from" - echo "your OS vendor's package manager)." - exit 1 -} -. gnome-autogen.sh diff --git a/configure.ac b/configure.ac deleted file mode 100644 index e56d3fa..0000000 --- a/configure.ac +++ /dev/null @@ -1,24 +0,0 @@ -AC_PREREQ(2.63) -AC_INIT([background-logo-extension],[3.24.0]) - -AC_CONFIG_AUX_DIR([config]) - -AM_INIT_AUTOMAKE([1.10 dist-xz no-dist-gzip foreign tar-ustar]) - -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - -GLIB_GSETTINGS - -dnl From gnome-shell-extensions -SHELL_VERSION="$PACKAGE_VERSION" -shell_major=`echo "$PACKAGE_VERSION" | cut -d'.' -f1` -shell_minor=`echo "$PACKAGE_VERSION" | cut -d'.' -f2` -if test "$(($shell_minor % 2))" -eq 0; then - SHELL_VERSION="$shell_major.$shell_minor" -fi -AC_SUBST([SHELL_VERSION]) - -AC_CONFIG_FILES([ - Makefile -]) -AC_OUTPUT