spec file for Qt project

Hello guys,

I’m quite new to using the Build Service and so I have I few questions. I’m trying to deploy my Qt4 project (PhyxCalc Qt-Apps.org) to several Linux distributions. So I have started by downloading the spec file from a other Qt project on the Build Service, the project was QElectroTech in the Rallaz home directory. It was possible for me to edit most of the arguments, but I have a few questions to the %install and %files section:

 
#
# spec file for package phyxcalc (Version 3rev150)
#
# Copyright (c) 2010 Rallaz
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# norootforbuild

Name:		phyxcalc

# Fedora specifics
%if 0%{?fedora_version} > 0 || 0%{?rhel_version} > 0 || 0%{?centos_version} > 0
BuildRequires:  qt4-devel >= 4.4.1 gcc-c++  boost-devel
%endif

# Mandriva specifics
%if 0%{?mandriva_version} > 0
BuildRequires:  libqt4-devel >= 4.4.1 boost-devel
#BuildRequires:  XFree86-devel lcms-devel freetype-devel hal-devel  -kernel
%endif

# SUSE Specifics
%if 0%{?suse_version} > 0
BuildRequires:  update-desktop-files libqt4-devel >= 4.4.1 boost-devel
%endif

Version:	3rev150
Release:	0
URL:		http://sourceforge.net/projects/phyxcalc/
License:	GPLv3
Source0:	%{name}-%{version}.tar.bz2
Group:		Productivity/Scientific/Math
Summary:	Physical Expression Calculator
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       
#Requires:         electronics-menu

%description
PhyxCalc is an Physical Expression Calculator.

%prep
%setup -q
%patch1 -p1

%build
%if 0%{?fedora_version} > 0
qmake-qt4
%else
qmake
%endif
%{__make} %{?jobs:-j %jobs}

%install
%makeinstall INSTALL_ROOT=%buildroot
#rm -rf $RPM_BUILD_ROOT/usr/doc/qelectrotech \
#       $RPM_BUILD_ROOT%{_mandir}/fr.ISO8859-1 \
#       $RPM_BUILD_ROOT%{_mandir}/fr

#mv $RPM_BUILD_ROOT%{_mandir}/fr.UTF-8 $RPM_BUILD_ROOT%{_mandir}/fr

#%{__install} -Dm 755 -s %{name} %{buildroot}%{_bindir}/%{name}
#%{__install} -Dm 644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
#%{__install} -Dm 644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
#%{__install} -Dm 644 icon/icon.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
%if 0%{?suse_version} > 0
%suse_update_desktop_file -r %{name} Graphics VectorGraphics
%endif

%clean
 "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc CREDIT LICENSE README examples
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/mime/application
%{_datadir}/mime/application/x-qet-*.xml
%{_datadir}/mime/packages/%{name}.xml
%dir %{_datadir}/mimelnk
%dir %{_datadir}/mimelnk/application
%{_datadir}/mimelnk/application/x-qet-*.desktop
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/128x128
%dir %{_datadir}/icons/hicolor/128x128/apps
%dir %{_datadir}/icons/hicolor/128x128/mimetypes
%dir %{_datadir}/icons/hicolor/16x16
%dir %{_datadir}/icons/hicolor/16x16/apps
%dir %{_datadir}/icons/hicolor/16x16/mimetypes
%dir %{_datadir}/icons/hicolor/22x22
%dir %{_datadir}/icons/hicolor/22x22/apps
%dir %{_datadir}/icons/hicolor/22x22/mimetypes
%dir %{_datadir}/icons/hicolor/256x256
%dir %{_datadir}/icons/hicolor/256x256/apps
%dir %{_datadir}/icons/hicolor/256x256/mimetypes
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%dir %{_datadir}/icons/hicolor/32x32/mimetypes
%dir %{_datadir}/icons/hicolor/48x48
%dir %{_datadir}/icons/hicolor/48x48/apps
%dir %{_datadir}/icons/hicolor/48x48/mimetypes
%dir %{_datadir}/icons/hicolor/64x64
%dir %{_datadir}/icons/hicolor/64x64/apps
%dir %{_datadir}/icons/hicolor/64x64/mimetypes
%{_datadir}/icons/hicolor/*/*/*.png
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/lang
%{_datadir}/%{name}/lang/*
%exclude %{_datadir}/%{name}/examples
%{_mandir}/man1/%{name}.*
%lang(es) %{_mandir}/es/man1/%{name}.*
%lang(fr) %{_mandir}/fr/man1/%{name}.*
%lang(pt) %dir %{_mandir}/pt
%lang(pt) %dir %{_mandir}/pt/man1
%lang(pt) %{_mandir}/pt/man1/%{name}.*


%changelog
* Fr Mar 02 2012 Strahlex <mail.aroessler@gmail.com>
- updated blabla to blabla

The files and install section I have of course not changed. My project consists only of a binary, an icon and a desktop file, maybe a doc file. Please help to configure the spec file.

https://build.opensuse.org/package/show?package=phyxcalc&project=home%3AStrahlex

Looks like you solved your problem. You can submit your package to the Education repository. That way you also get a review/polish of your spec file.