File QtSpim.spec of Package QtSpim

# norootforbuild

Name:           QtSpim
Summary:        MIPS32 Simulator
Group:          System/Emulators/Other
Version:        9.0.5_r536
Release:        0
License:        BSD
URL:            http://spimsimulator.sourceforge.net/
# from https://spimsimulator.svn.sourceforge.net/svnroot/spimsimulator
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        %{name}.png
# PATCH-FIX-UPSTREAM QtSpim-9.0.5_pro.patch adam@mizerski.pl -- added "-fno-strict-aliasing $(RPM_OPT_FLAGS)" to CFLAGS
Patch0:         %{name}-9.0.5_pro.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  gcc-c++ bison flex
BuildRequires:  libqt4-devel libqt4-devel-doc
BuildRequires:  dos2unix update-desktop-files

%description
spim is a self-contained simulator that will run MIPS32 assembly
language programs. It reads and executes assembly language programs
written for this processor. spim also provides a simple debugger and
minimal set of operating system services. spim does not execute binary
(compiled) programs.

%prep
%setup -q
%patch0 -p1
pushd QtSpim
qmake
popd

%build
pushd QtSpim
#%%__make %%{?_smp_mflags} this fails
%__make
popd

%install
pushd QtSpim
%__install -D QtSpim %buildroot%{_bindir}/%{name}
popd
%__install -D %{SOURCE1} %buildroot%{_datadir}/applications/%{name}.desktop
%__install -D %{SOURCE2} %buildroot%{_datadir}/pixmaps/%{name}.png
%suse_update_desktop_file %{name}
dos2unix ChangeLog

%clean
[ -d %{buildroot} -a "%{buildroot}" != "" ] && %__rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%doc README ChangeLog

%changelog
openSUSE Build Service is sponsored by