Blob Blame History Raw
Name:                gpick
Version:             0.2.5 
Release:             3%{?dist}
Summary:             Advanced color picker

License:             BSD
URL:                 http://code.google.com/p/gpick/
Source0:             http://gpick.googlecode.com/files/%{name}_%{version}.tar.gz

BuildRequires:       scons
BuildRequires:       boost-devel
BuildRequires:       pkgconfig(lua)
BuildRequires:       pkgconfig(dbus-glib-1)
BuildRequires:       pkgconfig(gtk+-2.0)
BuildRequires:       flex
BuildRequires:       expat-devel
BuildRequires:       gettext-devel
BuildRequires:       desktop-file-utils 

%description
Advanced color picker

%prep
%setup -q -n %{name}_%{version}

# 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}
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop

%find_lang %{name}

%files -f %{name}.lang
%doc %{_docdir}/%{name}/copyright
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_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
* 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