5fbdcbb
%global commit 78e110e1380a5f9bc9f86d3c53e5ed0274253071
3648f8d
%global shortcommit %(c=%{commit}; echo ${c:0:7})
5fbdcbb
%global date 20170217
3648f8d
5fbdcbb
Name:		gpick
5fbdcbb
Version:	0.2.5 
5fbdcbb
Release:	18.%{date}git%{?dist}
5fbdcbb
Summary:	Advanced color picker
e0759ff
5fbdcbb
License:	BSD
5fbdcbb
URL:		http://gpick.org
3648f8d
# To get tarball from github
3648f8d
# wget https://github.com/thezbyg/gpick/archive/569ee0f165b689825efd0cb7da1695beb7f8aa9b/gpick-0.2.5-569ee0f.tar.gz
5fbdcbb
5fbdcbb
%{!?shortcommit:
5fbdcbb
Source:		https://github.com/thezbyg/%{name}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz}
5fbdcbb
%{?shortcommit:
5fbdcbb
Source:		https://github.com/thezbyg/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz}
5fbdcbb
5fbdcbb
BuildRequires:	boost-devel
5fbdcbb
BuildRequires:	desktop-file-utils 
5fbdcbb
BuildRequires:	expat-devel
5fbdcbb
BuildRequires:	gettext-devel
5fbdcbb
BuildRequires:	libappstream-glib
5fbdcbb
BuildRequires:	libcurl-devel
5fbdcbb
BuildRequires:	pkgconfig(lua)
5fbdcbb
BuildRequires:	pkgconfig(dbus-glib-1)
5fbdcbb
BuildRequires:	pkgconfig(gtk+-2.0)
5fbdcbb
BuildRequires:	ragel
5fbdcbb
BuildRequires:	scons
5fbdcbb
# Regression on other arches with F26 mass rebuild
5fbdcbb
# Temporarily exclude them
5fbdcbb
# https://bugzilla.redhat.com/show_bug.cgi?id=1419949
5fbdcbb
5fbdcbb
ExcludeArch:	ppc64 ppc64le aarch64 armv7hl
e0759ff
%description
e0759ff
Advanced color picker
e0759ff
e0759ff
%prep
3648f8d
#%%setup -q -n %%{name}_%%{version}
5fbdcbb
%autosetup -n %{name}-%{commit}
3648f8d
mkdir .git
e0759ff
e0759ff
# Delete external libraries and only use system dependencies to build GPick
e0759ff
rm -rf extern
e0759ff
echo "INTERNAL_EXPAT=False" >> user-config.py
e0759ff
echo "INTERNAL_LUA=False" >> user-config.py
b368bd7
echo "LOCALEDIR=\"%{_datadir}/locale\"" >> user-config.py
e0759ff
e0759ff
%build
e0759ff
scons %{?_smp_mflags} CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" LDFLAGS="%{optflags}"
e0759ff
e0759ff
%install
e0759ff
export CFLAGS="%{optflags}"
e0759ff
export CXXFLAGS="%{optflags}"
e0759ff
export LDFLAGS="%{optflags}"
e0759ff
e0759ff
scons install DESTDIR=%{buildroot}/%{_prefix}
3648f8d
cp -v share/appdata/%{name}.appdata.xml %{buildroot}/%{_datadir}/appdata/
Richard Hughes 0dfe500
3648f8d
%check
3648f8d
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
3648f8d
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
b368bd7
%find_lang %{name}
b368bd7
b368bd7
%files -f %{name}.lang
e0759ff
%doc %{_docdir}/%{name}/copyright
e0759ff
%{_bindir}/%{name}
e0759ff
%{_datadir}/%{name}
Richard Hughes 0dfe500
%{_datadir}/appdata/%{name}.appdata.xml
e0759ff
%{_datadir}/applications/%{name}.desktop
e0759ff
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
e0759ff
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
e0759ff
%{_mandir}/man1/%{name}.1.*
e0759ff
e0759ff
%post
e0759ff
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
e0759ff
/usr/bin/update-desktop-database &> /dev/null || :
e0759ff
e0759ff
%postun
e0759ff
if [ $1 -eq 0 ] ; then
e0759ff
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
e0759ff
    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
e0759ff
fi
e0759ff
/usr/bin/update-desktop-database &> /dev/null || :
e0759ff
e0759ff
%posttrans
e0759ff
/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
e0759ff
e0759ff
%changelog
5fbdcbb
* Fri Feb 10 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 0.2.5-18.20170217git
5fbdcbb
- Latest git snapshot
5fbdcbb
- Clean up spec
5fbdcbb
- Set ExcludeArch for ppc64 ppc64le aarch64 armv7hl
5fbdcbb
1921963
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-17.20160613git569ee0f
1921963
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
1921963
3648f8d
* Mon Jun 13 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0.2.5-16.20160613git569ee0f
3648f8d
- Latest upstream git snapshot
3648f8d
- Dropped downstream appdata
3648f8d
- Added ragel,libcurl and libappstream-lib as dependency
3648f8d
fd87d69
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-15
fd87d69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
fd87d69
c54c08b
* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 0.2.5-14
c54c08b
- Rebuilt for Boost 1.60
c54c08b
6d8f96a
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 0.2.5-13
6d8f96a
- Rebuilt for Boost 1.59
6d8f96a
afa2f40
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-12
afa2f40
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
afa2f40
cd8b9b1
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 0.2.5-11
cd8b9b1
- rebuild for Boost 1.58
cd8b9b1
44f2c88
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-10
44f2c88
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
44f2c88
b6bf53c
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.2.5-9
b6bf53c
- Rebuilt for GCC 5 C++11 ABI change
b6bf53c
Richard Hughes 0dfe500
* Thu Mar 26 2015 Richard Hughes <rhughes@redhat.com> - 0.2.5-8
Richard Hughes 0dfe500
- Add an AppData file for the software center
Richard Hughes 0dfe500
Petr Machata 3b8127f
* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 0.2.5-7
Petr Machata 3b8127f
- Rebuild for boost 1.57.0
Petr Machata 3b8127f
fe1e36e
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-6
fe1e36e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
fe1e36e
7ac6b14
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-5
7ac6b14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7ac6b14
Petr Machata 3f218e9
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 0.2.5-4
Petr Machata 3f218e9
- Rebuild for boost 1.55.0
Petr Machata 3f218e9
e5bc1e8
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-3
e5bc1e8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
e5bc1e8
Petr Machata fa2c30e
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 0.2.5-2
Petr Machata fa2c30e
- Rebuild for boost 1.54.0
Petr Machata fa2c30e
b368bd7
* Wed May 15 2013 Tom Callaway <spot@fedoraproject.org> - 0.2.5-1
b368bd7
- update to 0.2.5, lua 5.2
b368bd7
e0759ff
* Sat Apr 13 2013 Luya Tshimbalanga <luya@fedoraproject.org> - 0.2.4-4
e0759ff
- Updated spec based Packaging review (rhbz #913367)
e0759ff
e0759ff
* Wed Feb 20 2013 Luya Tshimbalanga <luya@fedoraproject.org> - 0.2.4-2
e0759ff
- Adherance to Fedora Packaging guideline
e0759ff
e0759ff
* Sat Sep 01 2012 Alexis Lameire <alexisis-pristontale@hotmail.com> - 0.2.4-1
e0759ff
- initial release
e0759ff