source: projects/specs/trunk/nonfree/self-build-zsnes/zsnes-vl.spec @ 4181

Revision 4181, 4.8 KB checked in by munepi, 13 years ago (diff)

updated {,self-build-}zsnes-vl.spec

Line 
1%define srcversion %(echo "%{version}src" | %{__sed} 's/\\.//')
2%define interversion %(echo %{version} | %{__sed} 's/\\./_/')
3
4Summary: Super Nintendo Enter System(SNES) emulator
5Summary(ja): スーパーファミコン(SNES)のエミュレーター
6Name: zsnes
7Version: 1.51
8Release: 3%{?_dist_release}
9License: GPLv2
10Group: Applications/Emulators
11URL: http://www.zsnes.com/
12Source0: http://prdownloads.sourceforge.net/%{name}/%{name}%{srcversion}.tar.bz2
13# Source Mage
14Patch1: zsnes-1.51-Makefile.in.FIX.BROKENESS.patch
15# Hans de Goede
16Patch2: zsnes-1.51-FORTIFY_SOURCE.patch
17# Paul Bender (minimyth)
18Patch3: zsnes-1.51-gcc43.patch
19# Upstream CVS
20Patch4: zsnes-1.51-pulseaudio.patch
21
22Requires: SDL >= 1.2.0
23Requires: hicolor-icon-theme
24BuildRequires: automake
25BuildRequires: nasm >= 0.98
26BuildRequires: zlib >= 1.1.0
27BuildRequires: libpng >= 1.2.0
28BuildRequires: SDL-devel >= 1.2.0
29BuildRequires: zlib-devel >= 1.1.0
30BuildRequires: libpng-devel >= 1.2.0
31BuildRequires: ncurses-devel
32BuildRequires: libao-devel
33BuildRequires: desktop-file-utils
34%if %{?_dist_release} != "vl4"
35Requires: mesa-libGL
36BuildRequires: xorg-x11-devel
37BuildRequires: mesa-libGL-devel
38%else
39Requires: XOrg-gl
40BuildRequires: XOrg-devel
41BuildRequires: XOrg-gl-devel
42%endif
43BuildRoot: %{_tmppath}/%{name}-%{version}-root
44ExclusiveArch: %{ix86}
45
46%description
47ZSNES is one of Super Nintendo Entertainment System (SNES) emulators.
48
49%desctiption -l ja
50ZSNESはスーパーファミコンエミュレーターの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
72iconv --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
75iconv --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
84aclocal
85autoconf
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
99desktop-file-install \
100  --vendor vine \
101  --remove-category Application \
102  --dir %{buildroot}%{_datadir}/applications \
103  linux/%{name}.desktop
104
105# install icons
106for 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
111done
112
113%clean
114%{__rm} -rf %{buildroot}
115
116%post
117touch --no-create %{_datadir}/icons/hicolor
118if [ -x %{_bindir}/gtk-update-icon-cache ]; then
119    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
120fi
121
122%postun
123touch --no-create %{_datadir}/icons/hicolor
124if [ -x %{_bindir}/gtk-update-icon-cache ]; then
125    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
126fi
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
Note: See TracBrowser for help on using the repository browser.