123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518 |
- %define with_editor 0
- %define with_tools 0
- %define with_campaignd 0
- %define with_wesnothd 0
- %define ver 1.8.5
- %define src_ver %{ver}
- %define rel 2
- %define with_svn 0
- %if %{with_svn}
- %define svn_rev 41885
- %endif
- %define with_unofficial_po 1
- %define po_date 20100926
- Summary: Fantasy Turn-Based Strategy Game
- Summary(ja): ターンベースのファンタジー戦略シミュレーションゲーム
- Name: wesnoth
- Version: %{ver}
- %if %{with_svn}
- Release: %{rel}.svn%{svn_rev}%{?_dist_release}
- Source0: %{name}-%{version}-svn%{svn_rev}.tar.bz2
- %else
- Release: %{rel}%{?_dist_release}
- Source0: %{name}-%{src_ver}.tar.bz2
- %endif
- Source1: wesnothd.init
- Source2: %{name}.sysconfig
- %if %{with_unofficial_po}
- # http://sourceforge.jp/projects/wesnoth-ja/releases/?package_id=11460
- Source12: wesnoth-%{version}_ja-catalogs-%{po_date}.zip
- %endif
- %{?nosrc:NoSource: 0}
- License: GPLv2+
- Group: Applications/Games
- URL: http://www.wesnoth.org/
- Distribution: Vine Linux
- Vendor: Project Vine
- Packager: munepi, iwaim
- Requires: xorg-x11-libs SDL SDL_image SDL_mixer SDL_net SDL_ttf
- Requires: freetype2 libpng zlib pango fontconfig
- Requires: libboost-iostreams libboost-regex
- %if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl6"
- Requires: TrueType-vlgothic
- %endif
- %if %{?_dist_release} == "vl4"
- Requires: TrueType-sazanami
- %endif
- BuildRequires: desktop-file-utils
- BuildRequires: ImageMagick
- BuildRequires: xorg-x11-devel SDL-devel SDL_image-devel SDL_mixer-devel
- BuildRequires: SDL_net-devel SDL_ttf-devel
- BuildRequires: freetype2-devel libpng-devel zlib-devel pango-devel
- BuildRequires: fontconfig-devel
- BuildRequires: libboost-devel >= 1.35
- BuildRequires: libboost-iostreams libboost-regex
- BuildRequires: lua-devel
- #BuildRequires: fribidi-devel
- #BuildRequires: python-devel
- %if %{with_unofficial_po}
- BuildRequires: unzip
- %endif
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- Conflicts: wesnoth165
- %description
- Battle for Wesnoth is a fantasy turn-based strategy game. Battle for
- control of villages, using variety of units which have advantages and
- disadvantages in different types of terrains and against different
- types of attacks. Units gain experience and advance levels, and are
- carried over from one scenario to the next campaign.
- %description -l ja
- Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
- 異なる地形や攻撃のタイプに対して,長所と短所をもつ多種のユニットを使用
- しながら,村々の支配のために戦います.ユニットは経験を得てレベルアップ
- して,シナリオから次のキャンペーンまで連れて行かれます.
- %if %{with_editor}
- %package editor
- Group: Applications/Games
- Summary: The Battle of Wesnoth map editor.
- Summary(ja): The Battle of Wesnoth マップエディタ
- Requires: wesnoth = %{version}-%{release}
- %description editor
- Battle for Wesnoth is a fantasy turn-based strategy game.
- This package contains the map editor for it.
- %description editor -l ja
- Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
- このパッケージには,そのマップエディタが入っています.
- %endif
- %if %{with_tools}
- %package tools
- Group: Applications/Games
- Summary: The Battle of Wesnoth tools.
- Summary(ja): The Battle of Wesnoth ツール
- Requires: wesnoth = %{version}-%{release}
- %description tools
- Battle for Wesnoth is a fantasy turn-based strategy game.
- This package includes tools for translators and artists working on
- Battle for Wesnoth.
- %description tools -l ja
- Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
- このパッケージには,Battle for Wesnoth で作業されている
- 翻訳者やアーティストへのツールが含まれています.
- %endif
- %if %{with_campaignd}
- %package campaign-server
- Summary: The Battle of Wesnoth campaign server.
- Summary(ja): The Battle of Wesnoth キャンペーンサーバ
- Requires: wesnoth = %{version}-%{release}
- %description campaign-server
- Battle for Wesnoth is a fantasy turn-based strategy game.
- The campaign server acts as a simple download server, much like ftp, to
- provide a collection of Wesnoth campaigns to players.
- %description campaign-server -l ja
- Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
- このキャンペーンサーバーは,プレーヤーたちに Wesnoth キャンペーンの
- コレクションを提供するために,FTP のような簡易なダウンロードサーバとして
- 動作します.
- %endif
- %if %{with_wesnothd}
- %package server
- Group: Applications/Games
- Summary: The Battle of Wesnoth game server.
- Summary(ja): The Battle of Wesnoth ゲームサーバ
- Requires: wesnoth = %{version}-%{release}
- Requires(post): /sbin/chkconfig
- Requires(preun): /sbin/chkconfig
- Requires(pre): /usr/sbin/useradd
- %description server
- Battle for Wesnoth is a fantasy turn-based strategy game.
- This package contains the wesnothd server needed to play networked games.
- %description server -l ja
- Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
- このパッケージには,ネットワークゲームのプレイに必要とされるwesnothdサー
- バが入っています.
- %endif
- %prep
- %__rm -rf ${RPM_BUILD_ROOT}
- %if %{with_svn}
- %setup -q -n %{name}-%{version}-svn%{svn_rev}
- %else
- %setup -q -a 12 -n %{name}-%{src_ver}
- %endif
- %if %{with_unofficial_po}
- %define japo_dir wesnoth-%{version}_ja-catalogs-%{po_date}
- pushd %{japo_dir}
- target=(
- httt
- )
- for n in "${target[@]}"
- do
- %{__cp} -f wesnoth-%{version}_$n-%{po_date}_ja.po ../po/wesnoth-$n/ja.po
- done
- popd
- %endif
- %build
- export CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
- %if %{with_svn}
- ./autogen.sh
- %endif
- ## for 1.8: missing configure script
- ./autogen.sh
- %configure \
- --disable-dependency-tracking \
- %if %{with_editor}
- --enable-editor \
- %endif
- %if %{with_tools}
- --enable-tools \
- %endif
- %if %{with_campaignd}
- --enable-campaign-server \
- %endif
- %if %{with_wesnothd}
- --enable-server=yes \
- --with-fifodir=/var/run/wesnothd \
- --with-server-gid=root \
- --with-server-uid=root \
- %else
- --enable-server=no \
- %endif
- --with-localedir=%{_datadir}/locale \
- ;
-
- %{__make}
- %install
- %{__rm} -rf ${RPM_BUILD_ROOT}
- %{__make} DESTDIR=${RPM_BUILD_ROOT} install
- ### link sazanami-gothic.ttf
- pushd ${RPM_BUILD_ROOT}%{_datadir}/%{name}/fonts/
- ## for 1.2.7 or higher (contains sazanami-gothic.ttf)
- #%{__rm} -f sazanami-gothic.ttf
- ## for 1.6a or higher (NOT contains sazanami-gothic.ttf)
- %{__rm} -f wqy-zenhei.ttc
- %if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl6"
- #ln -s /usr/share/fonts/TrueType-sazanami-gothic/sazanami-gothic.ttf .
- ln -s /usr/share/fonts/TrueType-vlgothic/VL-PGothic-Regular.ttf sazanami-gothic.ttf
- ln -s /usr/share/fonts/TrueType-vlgothic/VL-Gothic-Regular.ttf wqy-zenhei.ttc
- %endif
- %if %{?_dist_release} == "vl4"
- ln -s /usr/X11R6/lib/X11/fonts/TrueType/sazanami-gothic.ttf .
- %endif
- popd
- ### for Gnome menu
- %__mkdir_p $RPM_BUILD_ROOT/%{_datadir}/pixmaps
- %__sed -i -e 's/^Version=.*$//' \
- -e 's/^Icon=wesnoth-icon\.png/Icon=wesnoth-icon/' \
- icons/%{name}.desktop
- desktop-file-install \
- --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
- --mode="0644" --vendor vine \
- icons/%{name}.desktop
- #%__install -m 644 icons/%{name}-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
- for size in 16x16 20x20 22x22 24x24 32x32 36x36 64x64 48x48 64x64 72x72 96x96 128x128 192x192 ; do
- %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps
- convert icons/%{name}-icon.png -size ${size} \
- $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps/%{name}-icon.png
- done
- %if %{with_editor}
- desktop-file-install \
- --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
- --mode="0644" --vendor vine \
- icons/%{name}_editor.desktop
- %__install -m 644 icons/%{name}_editor-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
- %endif
- ### rename for tools
- %if %{with_tools}
- pushd ${RPM_BUILD_ROOT}%{_bindir}/
- mv cutter %{name}_cutter
- mv exploder %{name}_exploder
- popd
- %endif
- ### for wesnothd server
- %if %{with_wesnothd}
- mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
- mv ${RPM_BUILD_ROOT}%{_bindir}/wesnothd ${RPM_BUILD_ROOT}%{_sbindir}
- mkdir -p ${RPM_BUILD_ROOT}/var/run/wesnothd
- touch ${RPM_BUILD_ROOT}/var/run/wesnothd/socket
- install -Dpm 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/wesnothd
- install -Dpm 644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/wesnoth
- %endif
- ### remove unpackage files
- %if !%{with_editor}
- %{__rm} -f ${RPM_BUILD_ROOT}%{_datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-editor.mo
- %endif
- find $RPM_BUILD_ROOT -name ".cvs*" | xargs rm -f
- find $RPM_BUILD_ROOT -name "CVS" | xargs rm -rf
- %{__rm} -rf $RPM_BUILD_ROOT/usr/share/doc/wesnoth/
- %{__rm} -f $RPM_BUILD_ROOT/usr/share/icons/wesnoth-icon.png \
- $RPM_BUILD_ROOT/usr/share/pixmaps/wesnoth-icon.png \
- $RPM_BUILD_ROOT/usr/share/icons/wesnoth_editor-icon.png
- %{__rm} -f $RPM_BUILD_ROOT/usr/share/applications/wesnoth*.desktop
- %if !%{with_wesnothd}
- %{__rm} -f $RPM_BUILD_ROOT/%{_mandir}/man6/wesnothd.*
- %{__rm} -f $RPM_BUILD_ROOT/%{_mandir}/*/man6/wesnothd.*
- %endif
- %find_lang %{name} --all-name
- %clean
- %{__rm} -rf ${RPM_BUILD_ROOT}
- %post
- touch --no-create %{_datadir}/icons/hicolor || :
- if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
- fi
- %{_bindir}/update-desktop-database %{_datadir}/applications || :
- %postun
- %{_bindir}/update-desktop-database %{_datadir}/applications || :
- touch --no-create %{_datadir}/icons/hicolor || :
- if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
- fi
- %if %{with_wesnothd}
- %pre server
- /usr/sbin/useradd -c "Wesnoth server" -s /sbin/nologin \
- -r -d /var/run/wesnothd wesnothd 2> /dev/null || :
- %post server
- /sbin/chkconfig --add wesnothd
- if [ $1 -gt 1 ]; then
- %{_initrddir}/wesnothd try-restart >/dev/null || :
- fi
- %preun server
- if [ $1 -eq 0 ]; then
- %{_initrddir}/wesnothd stop >/dev/null 2>&1 || :
- /sbin/chkconfig --del wesnothd
- fi
- %endif
- %files -f %{name}.lang
- %defattr(-,root,root)
- %doc COPYING INSTALL README changelog copyright doc/manual/
- %{_bindir}/%{name}
- %{_mandir}/man6/wesnoth.*
- %{_mandir}/*/man6/wesnoth.*
- %{_datadir}/%{name}
- %{_datadir}/applications/vine-wesnoth.desktop
- #%{_datadir}/pixmaps/wesnoth-icon.png
- %{_datadir}/icons/hicolor/*/apps/*.png
- %if %{with_editor}
- %files editor
- %defattr(-,root,root)
- %{_bindir}/wesnoth_editor
- %{_mandir}/man6/wesnoth_editor.*
- %{_mandir}/*/man6/wesnoth_editor.*
- %{_datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-editor.mo
- %{_datadir}/applications/vine-wesnoth_editor.desktop
- %endif
- %if %{with_tools}
- %files tools
- %defattr(-,root,root)
- #%{_bindir}/cutter
- #%{_bindir}/exploder
- %{_bindir}/wesnoth_cutter
- %{_bindir}/wesnoth_exploder
- %endif
- %if %{with_campaignd}
- %files campaign-server
- %defattr(-,root,root)
- %{_bindir}/campaignd
- %endif
- %if %{with_wesnothd}
- %files server
- %defattr(-,root,root)
- %config %{_initrddir}/wesnothd
- %config(noreplace) %{_sysconfdir}/sysconfig/wesnoth
- #%{_bindir}/wesnothd
- %{_sbindir}/wesnothd
- %{_mandir}/man6/wesnothd.*
- %{_mandir}/*/man6/wesnothd.*
- %attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/
- %ghost /var/run/wesnothd/socket
- %endif
- %changelog
- * Tue Jan 18 2011 Shu KONNO <owa@bg.wakwak.com> 1.8.5-2
- - rebuilt with libboost-1.45.0
- * Wed Oct 20 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.5-1
- - new upstream release
- - add Japanese po files version 20100926 (Source12)
- - add BuildRequires: unzip for Japanese po files
- * Thu Aug 12 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.4-1
- - new upstream release
- - drop Japanese po files version 20100710 (Source12)
- * Sat Jul 10 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.3-1
- - new upstream release
- - add Japanese po files version 20100710 (Source12)
- * Thu Jun 3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.2-1
- - new upstream release
- - add required Boost Library version
- * Mon May 3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.1-1
- - new upstream release
- - fix typo for Conflicts tag: wesnoth165
- * Fri Apr 2 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-2
- - new upstream release
- - running autogen.sh: missing configure script in 1.8 tarball
- * Tue Mar 30 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-1.svn41885
- - update to 1.8.0+svn41885
- - add Conflicts: wesnoth165
- - without unofficial po files (Source10): unstream merged
- - symbolic link: VL-Gothic-Regular.ttf to wqy-zenhei.ttc
- - add BuildRequires: lua-devel
- - fix changelog: 1.6.5-3
- * Mon Mar 29 2010 IWAI, Masaharu <iwai@alib.jp> 1.6.5-3
- - add unofficial Japanese po files
- - add wesnoth-1.6.5-japanese-po.tar.gz (Source10)
- - add wesnoth-1.6.5-sotbe-ja.po (Source11)
- - add Japanese translators patch (Patch10)
- - update Packager: assign iwaim
- * Mon Feb 08 2010 Shu KONNO <owa@bg.wakwak.com> 1.6.5-2vl6
- - rebuilt with new toolchain and libboost-1.42.0
- * Fri Sep 11 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.5-1
- - new upstream release
- - added BuildRequires:
- - desktop-file-utils
- - ImageMagick
- * Wed Jul 22 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.4-1
- - new upstream release
- * Wed Jul 8 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.6.3-2
- - fix enable-server bits
- - specify --enable-server=no when with_wesnothd is NOT set)
- - fix install section
- * Fri Jul 03 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.3-1
- - new upstream release
- * Sun May 17 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.2-1
- - new upstream release
- * Fri May 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.1-1
- - new upstream release
- * Mon Mar 23 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6a-1
- - new upstream release
- - added BuildRequires: libboost-regex
- - added Requires:
- - libboost-regex
- - TrueType-vlgothic for vl5
- - dropped BuildRequires: TrueType-sazanami
- - dropped wesnoth-1.2.8-gcc43.patch
- - added configure options:
- - --disable-dependency-tracking
- - --with-localedir=%%{_datadir}/locale
- - removed wqy-zenhei.ttc
- because wqy-zenhei.ttc affected sazanami-gothic.ttf badly
- - added update-desktop-database process in %%post and %%postun
- * Sat Jan 10 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.7-1
- - new upstream release
- * Sun Nov 16 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.6-1
- - new upstream release
- * Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.5-1
- - new upstream release
- - fixed License to GPLv2+
- - added BuildRequires: libboost-devel
- - added Requires: libboost-iostreams
- - dropped wesnoth.desktop, wesnoth.png, wesnoth-editor.desktop
- - apply wesnoth-1.2.8-gcc43.patch (from Fedora package)
- * Tue Oct 14 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-1vl5
- - applied new versioning policy, spec in utf-8
- * Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-0vl2
- - rebuilt for VineSeed
- * Mon Oct 23 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.7-0vl1
- - new upstream
- - define with_editor 0, with_tools 0, with_campaignd 0, with_wesnothd 0
- - drop wesnoth-server package
- - arrange wesnothd server package files
- [HELP] please test wesnoth-server, which change with_wesnothd to TRUE
- # * Tue Sep 4 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl3
- # - provide wesnoth-tools package
- # - drop wesnoth-server package
- # - arrange wesnothd server package files
- # [HELP] please test wesnoth-server and wesnoth-campaign-server,
- # which change with_wesnothd and with_campaignd to TRUE
- * Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl2
- - rebuild for VineSeed
- * Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl1
- - initial build for Vine Linux 4.1
- * Sun Apr 15 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.3-0vlmp1
- - new upstream for Vine Linux 4.1
- * Fri Jun 10 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 0.9.2-0vlmp1
- - initial build for Vine Linux 3.2
- # end of file
|