From 7a8a5ef79f6f061491ac1f34a0acd8acc4d2ffaa Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Fri, 14 Aug 2015 20:30:36 +0200 Subject: [PATCH] Fix dependencies in spec-file, automatically set major and minor-version of installed gnome-shell in metadata.json. So the extension works in rawhide after repackaging without the need to manually fix this. --- gnome-shell-extension-panel-osd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnome-shell-extension-panel-osd.spec b/gnome-shell-extension-panel-osd.spec index c1f30af..e1e2013 100644 --- a/gnome-shell-extension-panel-osd.spec +++ b/gnome-shell-extension-panel-osd.spec @@ -2,6 +2,8 @@ %global uuid panel-osd@berend.de.schouwer.gmail.com %global github jenslody-gnome-shell-extension-panel-osd %global checkout git%{git} +%global gs_version %(dnf info gnome-shell | grep Version | cut -d \":\" -f 2 | cut -d \" \" -f 2) +%global gs_major_version %(echo %{gs_version} | cut -d \".\" -f 1-2) Name: gnome-shell-extension-panel-osd Version: 1 @@ -17,7 +19,7 @@ Source0: https://github.com/jenslody/gnome-shell-extension-panel-osd/tarb BuildArch: noarch BuildRequires: autoconf >= 2.53, automake >= 1.9, glib2-devel, gnome-common >= 3.10.0, intltool >= 0.25 -Requires: gnome-shell >= 3.10.0 +Requires: gnome-shell-extension-common >= 3.10.0 %description @@ -28,6 +30,7 @@ messages at any (configurable) place on the (primary) monitor. %setup -q -n %{github}-%{git} %build +sed -i "s/^\"shell-version\":.*/\"shell-version\": [ \"%{gs_version}\", \"%{gs_major_version}\" ],/g" data/metadata.json.in NOCONFIGURE=1 ./autogen.sh %configure --prefix=%{_prefix} make %{?_smp_mflags}