diff --git a/geeqie.spec b/geeqie.spec index c5a9690..e7db542 100644 --- a/geeqie.spec +++ b/geeqie.spec @@ -1,11 +1,12 @@ -# un-double the %%s to uncomment -# %%global gitcommit 0004617a71100553a13e49e7208e401f2493b72c -# %%{?gitcommit:%%global gitcommitshort %%(c=%%{gitcommit}; echo ${c:0:7})} +# un-double the %% to uncomment +%global gitcommit 26c4dadbf4cdbcc52b5ca66c51d9ad19a6a31938 + +%{?gitcommit:%global gitcommitshort %(c=%{gitcommit}; echo ${c:0:7})} Summary: Image browser and viewer Name: geeqie Version: 1.5.1 -Release: 2%{?gitcommit:.git%{gitcommitshort}}%{?dist} +Release: 3%{?gitcommit:.git%{gitcommitshort}}%{?dist} License: GPLv2+ %if %{defined gitcommit} Source0: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=snapshot;h=%{gitcommit};sf=tbz2#/geeqie-g%{gitcommitshort}.tar.bz2 @@ -17,9 +18,8 @@ BuildRequires: gcc-c++ BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool -BuildRequires: git +BuildRequires: yelp-tools -Source1: https://raw.githubusercontent.com/hughsie/fedora-appstream/master/appdata-extra/desktop/geeqie.appdata.xml # for /usr/bin/appstream-util BuildRequires: libappstream-glib @@ -67,6 +67,14 @@ and zoom. %prep %setup -q %{?gitcommit:-n %{name}-%{gitcommitshort}} +# fix autoconf problem with missing version +sed -r -i 's/m4_esyscmd_s\(git rev-parse --quiet --verify --short HEAD\)/[%{version}]/' configure.ac + +# different distros have different names for this +sed -i -e 's/lua5\.1/lua-5.1/' configure* + +%build + autoreconf -f -i ; intltoolize # guard against missing executables at (re)build-time, # these are needed by the plug-in scripts @@ -79,24 +87,20 @@ for f in ufraw-batch ; do done %endif -# different distros have different names for this -sed -i -e 's/lua5\.1/lua-5.1/' configure* - - - -%build cflags=( -Wno-error=unused-variable -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=parentheses + -Wno-deprecated-declarations ) - %configure --enable-lirc \ --with-readmedir=%{_pkgdocdir} CFLAGS="$CFLAGS ${cflags[*]}" +# this will fail w/o git repo structure +touch ChangeLog ChangeLog.html %make_build @@ -118,8 +122,8 @@ desktop-file-install \ %find_lang %name -install -D -m0644 %{SOURCE1} %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml -appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml +mv %{buildroot}/usr/share/metainfo %{buildroot}%{_datadir}/appdata +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/org.geeqie.Geeqie.appdata.xml %files -f %{name}.lang %doc %{_pkgdocdir}/ @@ -130,7 +134,7 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.ap %{_datadir}/%{name}/ %{_datadir}/pixmaps/%{name}.png %{_datadir}/applications/*%{name}.desktop -%{_datadir}/appdata/%{name}.appdata.xml +%{_datadir}/appdata/org.geeqie.Geeqie.appdata.xml %changelog