Blob Blame History Raw
%global commit 78e110e1380a5f9bc9f86d3c53e5ed0274253071
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global date 20170217

Name:		gpick
Version:	0.2.5 
Release:	18.%{date}git%{?dist}
Summary:	Advanced color picker

License:	BSD
URL:		http://gpick.org
# To get tarball from github
# wget https://github.com/thezbyg/gpick/archive/569ee0f165b689825efd0cb7da1695beb7f8aa9b/gpick-0.2.5-569ee0f.tar.gz

%{!?shortcommit:
Source:		https://github.com/thezbyg/%{name}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz}
%{?shortcommit:
Source:		https://github.com/thezbyg/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz}

BuildRequires:	boost-devel
BuildRequires:	desktop-file-utils 
BuildRequires:	expat-devel
BuildRequires:	gettext-devel
BuildRequires:	libappstream-glib
BuildRequires:	libcurl-devel
BuildRequires:	pkgconfig(lua)
BuildRequires:	pkgconfig(dbus-glib-1)
BuildRequires:	pkgconfig(gtk+-2.0)
BuildRequires:	ragel
BuildRequires:	scons
# Regression on other arches with F26 mass rebuild
# Temporarily exclude them
# https://bugzilla.redhat.com/show_bug.cgi?id=1419949

ExcludeArch:	ppc64 ppc64le aarch64 armv7hl
%description
Advanced color picker

%prep
#%%setup -q -n %%{name}_%%{version}
%autosetup -n %{name}-%{commit}
mkdir .git

# Delete external libraries and only use system dependencies to build GPick
rm -rf extern
echo "INTERNAL_EXPAT=False" >> user-config.py
echo "INTERNAL_LUA=False" >> user-config.py
echo "LOCALEDIR=\"%{_datadir}/locale\"" >> user-config.py

%build
scons %{?_smp_mflags} CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" LDFLAGS="%{optflags}"

%install
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
export LDFLAGS="%{optflags}"

scons install DESTDIR=%{buildroot}/%{_prefix}
cp -v share/appdata/%{name}.appdata.xml %{buildroot}/%{_datadir}/appdata/

%check
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
%find_lang %{name}

%files -f %{name}.lang
%doc %{_docdir}/%{name}/copyright
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_mandir}/man1/%{name}.1.*

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
fi
/usr/bin/update-desktop-database &> /dev/null || :

%posttrans
/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :

%changelog
* Fri Feb 10 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 0.2.5-18.20170217git
- Latest git snapshot
- Clean up spec
- Set ExcludeArch for ppc64 ppc64le aarch64 armv7hl

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-17.20160613git569ee0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Jun 13 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0.2.5-16.20160613git569ee0f
- Latest upstream git snapshot
- Dropped downstream appdata
- Added ragel,libcurl and libappstream-lib as dependency

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 0.2.5-14
- Rebuilt for Boost 1.60

* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 0.2.5-13
- Rebuilt for Boost 1.59

* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-12
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159

* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 0.2.5-11
- rebuild for Boost 1.58

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.2.5-9
- Rebuilt for GCC 5 C++11 ABI change

* Thu Mar 26 2015 Richard Hughes <rhughes@redhat.com> - 0.2.5-8
- Add an AppData file for the software center

* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 0.2.5-7
- Rebuild for boost 1.57.0

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 0.2.5-4
- Rebuild for boost 1.55.0

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 0.2.5-2
- Rebuild for boost 1.54.0

* Wed May 15 2013 Tom Callaway <spot@fedoraproject.org> - 0.2.5-1
- update to 0.2.5, lua 5.2

* Sat Apr 13 2013 Luya Tshimbalanga <luya@fedoraproject.org> - 0.2.4-4
- Updated spec based Packaging review (rhbz #913367)

* Wed Feb 20 2013 Luya Tshimbalanga <luya@fedoraproject.org> - 0.2.4-2
- Adherance to Fedora Packaging guideline

* Sat Sep 01 2012 Alexis Lameire <alexisis-pristontale@hotmail.com> - 0.2.4-1
- initial release