1 | %define srcversion %(echo "%{version}src" | %{__sed} 's/\\.//') |
---|
2 | %define interversion %(echo %{version} | %{__sed} 's/\\./_/') |
---|
3 | |
---|
4 | Summary: Super Nintendo Enter System(SNES) emulator |
---|
5 | Summary(ja): スーパーファミコン(SNES)のエミュレーター |
---|
6 | Name: zsnes |
---|
7 | Version: 1.51 |
---|
8 | Release: 3%{?_dist_release} |
---|
9 | License: GPLv2 |
---|
10 | Group: Applications/Emulators |
---|
11 | URL: http://www.zsnes.com/ |
---|
12 | Source0: http://prdownloads.sourceforge.net/%{name}/%{name}%{srcversion}.tar.bz2 |
---|
13 | # Source Mage |
---|
14 | Patch1: zsnes-1.51-Makefile.in.FIX.BROKENESS.patch |
---|
15 | # Hans de Goede |
---|
16 | Patch2: zsnes-1.51-FORTIFY_SOURCE.patch |
---|
17 | # Paul Bender (minimyth) |
---|
18 | Patch3: zsnes-1.51-gcc43.patch |
---|
19 | # Upstream CVS |
---|
20 | Patch4: zsnes-1.51-pulseaudio.patch |
---|
21 | |
---|
22 | Requires: SDL >= 1.2.0 |
---|
23 | Requires: hicolor-icon-theme |
---|
24 | BuildRequires: automake |
---|
25 | BuildRequires: nasm >= 0.98 |
---|
26 | BuildRequires: zlib >= 1.1.0 |
---|
27 | BuildRequires: libpng >= 1.2.0 |
---|
28 | BuildRequires: SDL-devel >= 1.2.0 |
---|
29 | BuildRequires: zlib-devel >= 1.1.0 |
---|
30 | BuildRequires: libpng-devel >= 1.2.0 |
---|
31 | BuildRequires: ncurses-devel |
---|
32 | BuildRequires: libao-devel |
---|
33 | BuildRequires: desktop-file-utils |
---|
34 | %if %{?_dist_release} != "vl4" |
---|
35 | Requires: mesa-libGL |
---|
36 | BuildRequires: xorg-x11-devel |
---|
37 | BuildRequires: mesa-libGL-devel |
---|
38 | %else |
---|
39 | Requires: XOrg-gl |
---|
40 | BuildRequires: XOrg-devel |
---|
41 | BuildRequires: XOrg-gl-devel |
---|
42 | %endif |
---|
43 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
44 | ExclusiveArch: %{ix86} |
---|
45 | |
---|
46 | %description |
---|
47 | ZSNES is one of Super Nintendo Entertainment System (SNES) emulators. |
---|
48 | |
---|
49 | %desctiption -l ja |
---|
50 | ZSNESはスーパーファミコンエミュレーターの1つです。 |
---|
51 | |
---|
52 | %prep |
---|
53 | %{__rm} -rf %{buildroot} |
---|
54 | |
---|
55 | %setup -q -n %{name}_%{interversion}/src |
---|
56 | %patch1 -p2 |
---|
57 | %patch2 -p2 |
---|
58 | %patch3 -p2 |
---|
59 | %patch4 -p2 |
---|
60 | |
---|
61 | # Remove hardcoded CFLAGS and LDFLAGS |
---|
62 | %{__sed} -i \ |
---|
63 | -e 's:^\s*CFLAGS=.* -D__RELEASE__.*$:CFLAGS="$CFLAGS -D__RELEASE__":' \ |
---|
64 | -e 's:^\s*CFLAGS=.* -I\/usr\/local\/include .*$:CFLAGS="${CFLAGS} -I.":' \ |
---|
65 | -e '/^\s*LDFLAGS=.* -L\/usr\/local\/lib /d' \ |
---|
66 | configure.in |
---|
67 | |
---|
68 | # Fix line encodings in docs/readme.txt/* |
---|
69 | %{__sed} -i 's/\r//' ../docs/readme.txt/*.txt |
---|
70 | |
---|
71 | # Fix char encondigs |
---|
72 | iconv --from=ISO-8859-1 --to=UTF-8 ../docs/readme.txt/games.txt > \ |
---|
73 | ../docs/readme.txt/games.txt.utf8 |
---|
74 | %__mv ../docs/readme.txt/games.txt.utf8 ../docs/readme.txt/games.txt |
---|
75 | iconv --from=ISO-8859-1 --to=UTF-8 ../docs/readme.txt/support.txt > \ |
---|
76 | ../docs/readme.txt/support.txt.utf8 |
---|
77 | %__mv ../docs/readme.txt/support.txt.utf8 ../docs/readme.txt/support.txt |
---|
78 | |
---|
79 | # Remove icon extension from desktop file |
---|
80 | %{__sed} -i -e 's/^Icon=%{name}.png$/Icon=%{name}/g' \ |
---|
81 | linux/%{name}.desktop |
---|
82 | |
---|
83 | %build |
---|
84 | aclocal |
---|
85 | autoconf |
---|
86 | |
---|
87 | %configure \ |
---|
88 | --enable-libao \ |
---|
89 | --enable-release \ |
---|
90 | --disable-cpucheck force_arch="%{_arch}" |
---|
91 | %{__make} %{?_smp_mflags} |
---|
92 | |
---|
93 | %install |
---|
94 | %__rm -rf %{buildroot} |
---|
95 | %__make DESTDIR=%{buildroot} install |
---|
96 | |
---|
97 | # install desktop file |
---|
98 | %__mkdir_p %{buildroot}%{_datadir}/applications |
---|
99 | desktop-file-install \ |
---|
100 | --vendor vine \ |
---|
101 | --remove-category Application \ |
---|
102 | --dir %{buildroot}%{_datadir}/applications \ |
---|
103 | linux/%{name}.desktop |
---|
104 | |
---|
105 | # install icons |
---|
106 | for px in 16 32 48 64; do |
---|
107 | size=${px}x${px} |
---|
108 | %__mkdir_p %{buildroot}%{_datadir}/icons/hicolor/${size}/apps |
---|
109 | %__install -m 644 icons/${size}x32.png \ |
---|
110 | %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/zsnes.png || exit 1 |
---|
111 | done |
---|
112 | |
---|
113 | %clean |
---|
114 | %{__rm} -rf %{buildroot} |
---|
115 | |
---|
116 | %post |
---|
117 | touch --no-create %{_datadir}/icons/hicolor |
---|
118 | if [ -x %{_bindir}/gtk-update-icon-cache ]; then |
---|
119 | %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : |
---|
120 | fi |
---|
121 | |
---|
122 | %postun |
---|
123 | touch --no-create %{_datadir}/icons/hicolor |
---|
124 | if [ -x %{_bindir}/gtk-update-icon-cache ]; then |
---|
125 | %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : |
---|
126 | fi |
---|
127 | |
---|
128 | |
---|
129 | %files |
---|
130 | %defattr(-,root,root) |
---|
131 | %doc ../docs/authors.txt ../docs/license.txt ../docs/README.LINUX |
---|
132 | %doc ../docs/support.txt ../docs/thanks.txt ../docs/todo.txt |
---|
133 | %doc ../docs/readme.htm/ ../docs/readme.txt/ |
---|
134 | %{_bindir}/zsnes |
---|
135 | %{_mandir}/man1/zsnes.1* |
---|
136 | %{_datadir}/applications/vine-%{name}.desktop |
---|
137 | %{_datadir}/icons/hicolor/*/apps/%{name}.png |
---|
138 | |
---|
139 | |
---|
140 | %changelog |
---|
141 | * Sun Jun 19 2011 Munehiro Yamamoto <munepi@vinelinux.org> 1.51-3 |
---|
142 | - applied zsnes-1.51-gcc43.patch, zsnes-1.51-pulseaudio.patch |
---|
143 | |
---|
144 | * Tue May 26 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.51-2 |
---|
145 | - change release to sync with self-build-zsnes |
---|
146 | |
---|
147 | * Mon Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.51-1 |
---|
148 | - applied new versioning policy |
---|
149 | - spec in utf8 |
---|
150 | - dropped NoSource: 0 |
---|
151 | - applied zsnes-1.51-Makefile.in.FIX.BROKENESS.patch, |
---|
152 | zsnes-1.51-FORTIFY_SOURCE.patch |
---|
153 | #, zsnes-1.51-gcc43.patch |
---|
154 | - added Requires: hicolor-icon-theme |
---|
155 | BuildRequires: automake ncurses-devel libao-devel desktop-file-utils |
---|
156 | - For vl5, added Requires: mesa-libGL |
---|
157 | BuildRequires: xorg-x11-devel mesa-libGL-devel |
---|
158 | - fixed ExclusiveArch: %{ix86} |
---|
159 | |
---|
160 | * Thu Jun 28 2007 1.51-0vl2 |
---|
161 | - Set NoSource: 0 |
---|
162 | |
---|
163 | * Sat Jun 9 2007 1.51-0vlmp1 |
---|
164 | - Rename 0vl1 to 0vlmp1 |
---|
165 | |
---|
166 | * Tue Mar 9 2007 1.51-0vl1 |
---|
167 | - initial build for Vine Linux |
---|
168 | |
---|
169 | * Sun Feb 25 2007 1.51-0vlmp1 |
---|
170 | - updated 1.51 for Vine Linux 4.x |
---|
171 | |
---|
172 | * Mon May 9 2005 1.42-0vl1 |
---|
173 | - initial build for Vine Linux |
---|
174 | |
---|
175 | # end of file |
---|