|
发表于 2007-7-12 16:21:15
|
显示全部楼层
这里给你一个标准的 magic spec 作为示例:
-------------------------------------------------------
- Summary: Challenging 2D Moto cross Platform Game
- Summary(zh_CN): 富有挑战性的 2D 摩托跨平台游戏
- Name: xmoto
- Version: 0.3.1
- Release: 1mgc
- Source0: http://osdn.dl.sourceforge.net/xmoto/xmoto-%{version}-src.tar.gz
- Source1: xmoto.desktop
- Source2: xmoto.png
- Patch0: xmoto-man.patch
- URL: http://xmoto.sourceforge.net
- Group: Amusements/Games
- Group(zh_CN): 娱乐/游戏
- Packager: Pascal Bleser <[email protected]>, kde <athena_star {at} 163 {dot} com>
- Distribution: Magic Linux 2.1
- License: GPL
- BuildRoot: %{_tmppath}/build-%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
- Requires: SDL, libgcc, libstdc++, libogg, libvorbis, lua, ode
- BuildRequires: gcc-c++, libstdc++, libstdc++-devel
- BuildRequires: SDL_mixer-devel, SDL_ttf-devel
- BuildRequires: curl-devel
- BuildRequires: ode-devel
- BuildRequires: lua-devel >= 5.0
- BuildRequires: libGL-devel
- BuildRequires: libGLU-devel
- BuildRequires: libjpeg-devel
- BuildRequires: libpng-devel
- BuildRequires: bzip2-devel
- BuildRequires: sqlite-devel
- %description
- X-Moto is a challenging 2D moto cross platform game, where physics play an all
- important role in the gameplay. You need to control your bike to its limit, if
- you want to have a chance finishing the more difficult of the challenges.
- %description -l zh_CN
- X-Moto 是一个极富挑战性的 2D 摩托车跨平台游戏。在游戏中,您可以亲历
- 所有重要角色。如果您想有机会完成更高难度的挑战,您必须竭尽全力控制
- 您的摩托车。
- %prep
- %setup -q
- %patch0
- #fix encoding
- sed -i 's/\r//' src/xmscene/Camera.cpp
- sed -i 's/\r//' src/xmscene/Camera.h
- #fix permissions
- chmod 644 src/xmscene/Camera.*
- %build
- export LDFLAGS=-L%{_prefix}/X11R6/%{_lib}
- %configure --with-enable-zoom=1
- %{__make} %{?_smp_mflags}
- %install
- %{__rm} -rf "%{buildroot}"
- %{__make} DESTDIR="%{buildroot}" install
- # Install desktop file and icon
- %{__mkdir_p} "%{buildroot}/usr/share/applications"
- %{__install} -m 0644 "%{SOURCE1}" "%{buildroot}/usr/share/applications/"
- %{__mkdir_p} "%{buildroot}/usr/share/pixmaps"
- %{__install} -m 0644 "%{SOURCE2}" "%{buildroot}/usr/share/pixmaps/"
- # Locale files
- %find_lang %{name} %{name}.lang
- %clean
- %{__rm} -rf %{buildroot} %{_builddir}/%{buildsubdir}
- %files -f %{name}.lang
- %defattr(-,root,root)
- %attr(0644,root,root) %doc AUTHORS ChangeLog COPYING NEWS README
- %{_bindir}
- %{_datadir}/xmoto
- %{_datadir}/applications/xmoto.desktop
- %{_datadir}/pixmaps/xmoto.png
- %{_mandir}
- %changelog
- * Thu Jul 12 2007 kde <athena_star {at} 163 {dot} com> - 0.3.1-1mgc
- - update to release 0.3.1
- * Thu Dec 29 2005 kde <[email protected]> 0.1.10-1mgc
- - update to release 0.1.10
- * Sat Oct 29 2005 kde <[email protected]> 0.1.6-1mgc
- - port to Magic Linux 2.0
- * Thu Oct 13 2005 Pascal Bleser <[email protected]> 0.1.6-1
- - new upstream version
- * Mon Oct 3 2005 Pascal Bleser <[email protected]> 0.1.4-1
- - new package
复制代码
[ 本帖最后由 KDE 于 2007-7-14 12:31 编辑 ] |
|