Ver código fonte

wesnoth 1.14.1-2

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11685 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 7 anos atrás
pai
commit
6416dd6742
1 arquivos alterados com 31 adições e 8 exclusões
  1. 31 8
      w/wesnoth/wesnoth-vl.spec

+ 31 - 8
w/wesnoth/wesnoth-vl.spec

@@ -1,7 +1,7 @@
-%global with_editor 0
-%global with_tools 0
-%global with_campaignd 0
-%global with_wesnothd 0
+#%bcond_with editor
+%bcond_without tools
+%bcond_without campaignd
+%bcond_without wesnothd
 
 #% global svn_rev 41885
 %global with_unofficial_po 0
@@ -11,7 +11,7 @@ Summary:	Fantasy Turn-Based Strategy Game
 Summary(ja):	ターンベースのファンタジー戦略シミュレーションゲーム
 Name:		wesnoth
 Version:	1.14.1
-Release:	1%{?svn_rev:.svn%svn_rev}%{?_dist_release}
+Release:	2%{?svn_rev:.svn%svn_rev}%{?_dist_release}
 Source0:	http://www.wesnoth.org/files/%{name}-%{version}%{?svn_rev:-svn%svn_rev}.tar.bz2
 Source1:	wesnothd.init
 # Source1:	wesnothd.service
@@ -80,6 +80,7 @@ Battle for Wesnoth はターンベースの戦略シミュレーションゲー
 して,シナリオから次のキャンペーンまで連れて行かれます.
 
 
+%if %{with tools}
 %package tools
 Group: Applications/Games
 Summary: The Battle of Wesnoth tools.
@@ -95,7 +96,9 @@ Battle for Wesnoth.
 Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
 このパッケージには,Battle for Wesnoth で作業されている
 翻訳者やアーティストへのツールが含まれています.
+%endif
 
+%if 0%{?with_campaignd:1}%{?with_wesnothd:1}
 %package server
 Group: Applications/Games
 Summary: The Battle of Wesnoth game server.
@@ -113,6 +116,7 @@ This package contains the wesnothd server needed to play networked games.
 Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
 このパッケージには,ネットワークゲームのプレイに必要とされるwesnothdサー
 バが入っています.
+%endif
 
 
 %prep
@@ -136,7 +140,7 @@ popd
 %endif
 
 %build
-scons wesnoth wesnothd campaignd \
+scons wesnoth %{?with_wesnothd:wesnothd} %{?with_campaignd:campaignd} \
       prefix=%{_prefix} \
       bindir=%{_bindir} \
       libdir=%{_libdir} \
@@ -148,9 +152,10 @@ scons wesnoth wesnothd campaignd \
 
 %install
 %{__rm} -rf ${RPM_BUILD_ROOT}
-scons install install-pytools destdir=$RPM_BUILD_ROOT
+scons install %{?with_tools:install-pytools} destdir=$RPM_BUILD_ROOT
 
 ### for wesnothd server
+%if 0%{?with_campaignd:1}%{?with_wesnothd:1}
 ## extra files we provide
 install -Dpm 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/wesnothd
 install -Dpm 644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/wesnoth
@@ -161,8 +166,13 @@ touch ${RPM_BUILD_ROOT}/var/run/wesnothd/socket
 
 ## move server stuff into sbindir
 mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
+%endif
+%if 0%{?with_wesnothd:1}
 mv $RPM_BUILD_ROOT/%{_bindir}/wesnothd $RPM_BUILD_ROOT/%{_sbindir}
+%endif
+%if 0%{?with_campaignd:1}
 mv $RPM_BUILD_ROOT/%{_bindir}/campaignd $RPM_BUILD_ROOT/%{_sbindir}
+%endif
 
 
 ### Wesnoth ships its own fonts, replace with Vine Linux packaged versions
@@ -232,6 +242,7 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then
 fi
 
 
+%if 0%{?with_campaignd:1}%{?with_wesnothd:1}
 %pre server
 /usr/sbin/useradd -c "Wesnoth server" -s /sbin/nologin \
 	-r -d /var/run/wesnothd wesnothd 2> /dev/null || :
@@ -247,6 +258,7 @@ if [ $1 -eq 0 ]; then
     %{_initrddir}/wesnothd stop >/dev/null 2>&1 || :
     /sbin/chkconfig --del wesnothd
 fi
+%endif
 
 
 %files -f %{name}.lang
@@ -261,28 +273,39 @@ fi
 %{_datadir}/applications/wesnoth.desktop
 %{_datadir}/wesnoth/fonts/*
 %{_datadir}/icons/*
-%{python_sitelib}/wesnoth
 %{_mandir}/man6/wesnoth*.6.gz
 %{_mandir}/*/man6/wesnoth*.6.gz
 
+%if 0%{?with_tools:1}
 %files tools
 %defattr(-,root,root)
 %{_bindir}/wesnoth_addon_manager
 #%{_bindir}/exploder
 #%{_bindir}/cutter
 %{_bindir}/wml*
+%{python_sitelib}/wesnoth
+%endif
 
+%if 0%{?with_campaignd:1}%{?with_wesnothd:1}
 %files server
 %defattr(-,root,root)
 %{_initrddir}/wesnothd
 %config(noreplace) %{_sysconfdir}/sysconfig/wesnoth
+%if 0%{?with_wesnothd:1}
 %{_sbindir}/wesnothd
+%endif
+%if 0%{?with_campaignd:1}
 %{_sbindir}/campaignd
+%endif
 %attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/
 %ghost /var/run/wesnothd/socket
+%endif
 
 
 %changelog
+* Thu May 24 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.14.1-2
+- using %%bcond_without macro
+
 * Thu May 24 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.14.1-1
 - update to 1.14.1
 - drop unnecessary patches (Patch8, 9): upstream fixed