~ubuntu-branches/ubuntu/raring/vice/raring

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Name:		vice
Version:	2.3
Release:	1%{?dist}
Summary:	Versatile Commodore 8-bit Emulator
Vendor:		VICE Team
Group:		Applications/Emulators
License:	GPLv2
URL:		http://vice-emu.sourceforge.net/
Source0:	http://www.zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/%{name}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Packager:	VICE Team
BuildRequires:	alsa-lib-devel ffmpeg-devel gettext-devel giflib-devel gtk2-devel gtkglext-devel lame-devel libieee1284-devel libjpeg-devel libpcap-devel libpng-devel libX11-devel libXrandr-devel mesa-libGL-devel pulseaudio-libs-devel zlib-devel
# Requires:	ffmpeg-libs lame-libs


%description
This is version 2.3 of VICE, the multi-platform C64, C128, VIC20,
PET, PLUS4, CBM-II and C64DTV emulator.


%prep
%setup -q


%build
%define __global_cflags -O3 -ffast-math -g -pipe -Wall -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
%if 0%{?archopt:1}
  %define optflags %{__global_cflags} %{archopt}
%else
  %if %{_target_cpu} == i686
    %define optflags %{__global_cflags} -m32 -march=pentium-m -fasynchronous-unwind-tables
  %else
    %if %{_target_cpu} == x86_64
      %define optflags %{__global_cflags} -m64 -march=nocona -mtune=core2
    %endif
  %endif
%endif
%configure --docdir=%{_docdir}/%{name}-%{version}/doc --enable-gnomeui --enable-ethernet --enable-parsid --without-oss --disable-arch
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
# Generated Makefile ignores docdir from configure
make install DESTDIR=%{buildroot} realdocdir=%{_docdir}/%{name}-%{version}/doc
rm -f %{buildroot}%{_infodir}/dir
%{__install} -D -p -m 0644 AUTHORS ChangeLog FEEDBACK COPYING INSTALL NEWS README %{buildroot}%{_docdir}/%{name}-%{version}
%find_lang vice


%clean
rm -rf %{buildroot}


%post
/sbin/install-info %{_infodir}/vice.info.gz %{_infodir}/dir


%preun
if [ "$1" = 0 ]; then
 /sbin/install-info --delete %{_infodir}/vice.info.gz %{_infodir}/dir
fi


%files -f vice.lang
%defattr(-,root,root,-)
%{_docdir}/%{name}-%{version}/*
%{_bindir}/*
%{_prefix}/lib/vice/*
%{_infodir}/vice.info.gz
%{_infodir}/vice.txt.gz
%{_mandir}/man1/* 
%{_datadir}/locale/*/LC_MESSAGES/vice.mo


%changelog
* Fri Feb 25 2011 Dag Lem <resid@nimrod.no> - 2.3-1
- Update of requirements and configuration.
- Added missing files, fix for 64 bit builds.
- Less conservative architecture specific optimizations:
    rpmbuild --define "archopt <archopt>"    -> gcc -O3 <archopt>
    rpmbuild [--target=i686-<vendor>-<os>]   -> gcc -O3 -march=pentium-m
    rpmbuild [--target=x86_64-<vendor>-<os>] -> gcc -O3 -march=prescott -mtune=core2

* Tue Oct 28 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0-1
- Wrap up a new package