File imagewriter.spec of Package imagewriter

#
# spec file for package imagewriter
#
# Copyright (c) 2011 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/
#

# needsrootforbuild

Url:            http://kiwi.berlios.de

Name:           imagewriter
BuildRequires:  gcc-c++

%if 0%{?fedora_version}  
    %define breq qt4-devel  
    %define qmake /usr/bin/qmake-qt4  
    %define lrelease /usr/bin/lrelease-qt4
BuildRequires:  hal-devel
%endif    
%if 0%{?mandriva_version}  
    %define breq libqt4-devel
    %define qmake /usr/lib/qt4/bin/qmake  
    %define lrelease /usr/lib/qt4/bin/lrelease
BuildRequires:  hal-devel
%endif  
%if 0%{?suse_version}
    %define breq libqt4-devel update-desktop-files
    %define qmake /usr/bin/qmake  
    %define lrelease /usr/bin/lrelease
%endif

%if 0%{?suse_version} < 1130
BuildRequires:  hal-devel
%endif

Summary:        SUSE Studio Imagewriter
Version:        1.9
Release:        1
Group:          Hardware/Other
License:        GPLv2
Source:         imagewriter-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  %{breq}

%description
Graphical image writer application

%prep
%setup 

%build
%{qmake} PREFIX=$RPM_BUILD_ROOT/%{_prefix} imagewriter.pro
make buildroot=$RPM_BUILD_ROOT CFLAGS="$RPM_OPT_FLAGS -DKIOSKHACK"

%install
# build
# I don't know why 'make install' ignores the binary when built in OBS
install -d $RPM_BUILD_ROOT/usr/bin
install -m 755 -p imagewriter $RPM_BUILD_ROOT/%{_bindir}
make install
%if 0%{?suse_version}
    %suse_update_desktop_file imagewriter
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_bindir}/imagewriter
%{_prefix}/share/applications/imagewriter.desktop
#%{_prefix}/share/icons/hicolor/*/apps/imagewriter.png
%dir %{_datadir}/icons/hicolor/*/apps/
%dir %{_datadir}/icons/hicolor/*/
%dir %{_datadir}/icons/hicolor/
%{_datadir}/icons/hicolor/*/apps/imagewriter.*
%doc COPYING

%changelog
openSUSE Build Service is sponsored by