File albumshaper.spec of Package albumshaper

#
# spec file for package albumshaper (Version 2.1)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           albumshaper
BuildRequires:  libdrm-devel libjpeg-devel libxslt-devel qt3-devel update-desktop-files
Summary:        Tool for Organizing and Enhancing Photos
Version:        2.1
Release:        222
Url:            http://albumshaper.sourceforge.net/
License:        GPLv2+
Group:          Productivity/Graphics/Viewers
AutoReqProv:    on
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Patch:          albumshaper-gcc-warning.patch
Patch1:         albumshaper-project.patch
Patch2:         albumshaper-2.1-memory-leak.patch
Patch3:         albumshaper-includes.patch

%description
Album Shaper strives to be the most friendly, easy-to-use, open source
application for organizing, annotating, framing, enhancing, stylizing,
and sharing your digital photos. Album Shaper embraces open formats
like XML, JPEG, and XSLT, while supporting Windows, Mac OS X, and Unix
users who speak a multitude of languages around the world.



Authors:
--------
    Will Stokes <wstokes@gmail.com>

%prep
%setup 
%patch
%patch1
%patch2
%patch3

%build
	export QTDIR=/usr/lib/qt3
	export PATH=${QTDIR}/bin:${PATH}
	qmake "DESTDIR+=${RPM_BUILD_ROOT}/usr VPATH=${RPM_BUILD_ROOT}" AlbumShaper.pro
	make

%install
	#make install
	cd bin
	chmod 0755 AlbumShaper
	cp 	-a AlbumShaper  $RPM_BUILD_ROOT/usr/bin
	install -m 0755 -d $RPM_BUILD_ROOT%{_datadir}/%{name}/
	cp -a images  $RPM_BUILD_ROOT%{_datadir}/%{name}/
	cp -a text    $RPM_BUILD_ROOT%{_datadir}/%{name}/
	find themes -type f -print0 | xargs -0 chmod 644
	cp -a themes $RPM_BUILD_ROOT%{_datadir}/%{name}/
	cp -a translations  $RPM_BUILD_ROOT%{_datadir}/%{name}/
	cp -a xmlConversion $RPM_BUILD_ROOT%{_datadir}/%{name}/
	cd ..
	cd resources/icons/
	install -m 0755 -d $RPM_BUILD_ROOT/usr/share/pixmaps/
	install -m 0644 as64.png $RPM_BUILD_ROOT/usr/share/pixmaps/albumshaper.png
	%suse_update_desktop_file -i %name Graphics Photography
	#
        #remove rpm build root 
        #this will not work :(
        #sed -i "s%${RPM_BUILD_ROOT}%""%g"   ${RPM_BUILD_ROOT}/usr/bin/AlbumShaper.bin

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%dir /usr/share/albumshaper
/usr/share/albumshaper/*
/usr/bin/AlbumShaper*
/usr/share/applications/albumshaper.desktop
/usr/share/pixmaps/albumshaper.png

%changelog