File pivot.spec of Package pivot

Name:           pivot
Version:        0.1.262
Release:        %{release}
License:        GPL-3.0+
Summary:        The Photo, Image and Video Organization Tool
Url:            http://dominik-ruess.de/pivot/
Group:          Productivity/Graphics/Viewers
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  freeimage-devel
BuildRequires:  libexif-devel
BuildRequires:  libqt4-devel
BuildRequires:  update-desktop-files
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme

Source0:        %{name}-%{version}.tar.bz2
# installDesktop.cmake.patch Allows to create file pivot.desktop without the presence of local user folder $ENV{HOME}/.local/share/applications/
Patch1:		installDesktop.cmake.patch
# CMakeLists.txt.patch Fixes pivot.desktop file categories
Patch2:		CMakeLists.txt.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The Photo, Image and Video Organization Tool - Pivot - is a tool for the first step of the image (and video) processing tool chain. Pivot can organize your images from the hard drive or directly from the camera. It allows you to specify destination folders and filename patterns for the copying process. The organization is mainly based on the creation date and time of the images.
%prep
%setup -q
%patch1
%patch2

%build


mkdir build
cd build
cmake ../pivot -DCMAKE_BUILD_TYPE=Release \
	       -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
	       -DCMAKE_CXX_FLAGS="%{optflags}"
make %{?jobs:-j%jobs}

%install
cd build

%make_install
%__install -D -m0644 ../pivot/ico/pivot.png "%{buildroot}%{_datadir}/icons/hicolor/128x128/apps/pivot.png"

%suse_update_desktop_file %{name}
%fdupes %{buildroot} 

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/128x128/apps/pivot.png

%changelog
openSUSE Build Service is sponsored by