File flickr-uploadr.spec of Package flickr-uploadr
# #
# # spec file for package flickr-uploadr
# #
# # This file and all modifications and additions to the pristine
# # package are under the same license as the package itself.
# #
# # norootforbuild
Name: flickr-uploadr
Version: 3.0.5
Release: 1
Summary: Non official port of the official Flickr Uploadr client
License: GPLv2
Group: Productivity/Graphics/Viewers
URL: http://www.flickr.com/tools/uploadr/
Source0: FlickrUploadr-%{version}-src.tar.bz2
Source1: flickr-uploadr.desktop
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch0: 01-make-build-process-work-on-linux.patch
Patch1: 02-include-flickr-key.patch
Patch2: 03-x86_64-platform-support.patch
AutoReqProv: yes
BuildRequires: libGraphicsMagick++-devel libexiv2-devel libbz2-devel
BuildRequires: libxml2-devel libpng-devel libjpeg-devel libtiff-devel
BuildRequires: pkg-config mozilla-xulrunner190-devel
%description
Flickr Uploadr 3.0 is the new best way to get your photos on Flickr. With it you can quickly import your photos to Flickr.
It features a powerful offline mode allowing you to prepare your photos for uploading (arrange, rename, describe, re-size and rotate) without requiring any network connectivity.
Also, all photos uploads are done in the background using a queuing system, allowing you to work on other photos while it's uploading.
%prep
%setup -q -n uploadr
%patch0
%patch1
%patch2
%build
%if 0%{?suse_version} > 1100
%define _xulrunner_sdk %{_libdir}/xulrunner-devel-1.9.0.1/sdk
%define _xulrunner_bin %{_libdir}/xulrunner-1.9.0.1
%else
%define _xulrunner_sdk %{_libdir}/xulrunner-devel-1.9b5
%define _xulrunner_bin %{_libdir}/xulrunner-devel-1.9b5/bin
%endif
%{__cp} %{_xulrunner_bin}/xulrunner-stub ./MacUploadr.app/Contents/Resources/uploadr
cd ./MacUploadr.app/Contents/Resources
ln -s %{_xulrunner_sdk} gecko-sdk.linux
ln -s %{_xulrunner_bin} gecko-bin.linux
cd components/
make linux gm
make linux key
make linux clh
%install
# Create the directories
%{__mkdir} -p %{buildroot}/%{_bindir}
%{__mkdir} -p %{buildroot}/%{_libdir}/%{name}/components
%{__mkdir} -p %{buildroot}/%{_datadir}/applications
# Copy all the files in libdir
%{__cp} -ra MacUploadr.app/Contents/Resources/chrome %{buildroot}/%{_libdir}/%{name}/
%{__cp} -ra MacUploadr.app/Contents/Resources/defaults %{buildroot}/%{_libdir}/%{name}/
%{__cp} MacUploadr.app/Contents/Resources/components/*.{so,js,xpt} \
%{buildroot}/%{_libdir}/%{name}/components/
%{__cp} MacUploadr.app/Contents/Resources/application.ini %{buildroot}/%{_libdir}/%{name}/
%{__cp} MacUploadr.app/Contents/Resources/uploadr %{buildroot}/%{_libdir}/%{name}/
# Copy the launchers in the right place
ln -s %{_libdir}/%{name}/uploadr %{buildroot}/%{_bindir}/flickr-uploadr
install %SOURCE1 %{buildroot}/%{_datadir}/applications/
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%doc MacUploadr.app/Contents/Resources/LICENSE.txt
%{_libdir}/%{name}
%{_bindir}/flickr-uploadr
%{_datadir}/applications/flickr-uploadr.desktop
%changelog