rpms/wesnoth/FC-3 README.fedora, NONE, 1.1 wesnoth.sysconfig, NONE, 1.1 wesnothd.init, NONE, 1.1 .cvsignore, 1.3, 1.4 sources, 1.3, 1.4 wesnoth.spec, 1.4, 1.5

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Fri Jul 22 17:22:33 UTC 2005


Author: mschwendt

Update of /cvs/extras/rpms/wesnoth/FC-3
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18384

Modified Files:
	.cvsignore sources wesnoth.spec 
Added Files:
	README.fedora wesnoth.sysconfig wesnothd.init 
Log Message:
Sync with devel.



--- NEW FILE README.fedora ---
This is a DEVELOPMENT release of "Battle for Wesnoth. Be careful when to
upgrade this game package, since it may affect your [or your users'] saved
games or result in unexpected incompatibilities or changes.

With development release 0.8.8 the developers switched to a different
release model and discontinued their stable branch. There won't be another
stable release until 1.0 is ready. Version 0.8, which was the last stable
release from June/July 2004, is quite old, unsupported, and is also
incompatible with the official game server at wesnoth.org. The game server
will run always the most recent version of the software shortly after its
release.



--- NEW FILE wesnoth.sysconfig ---
#
# wesnothd(6) options. Pick a custom port here if needed, for example.
#
WESNOTHD_OPTIONS=""


--- NEW FILE wesnothd.init ---
#!/bin/sh
#
# wesnothd     This shell script takes care of starting and stopping
#              the Wesnoth game server.
#
# chkconfig:   - 15 85
# description: The Wesnoth server supports playing networked \
#              multi-player games.
# processname: wesnothd
# config:      /etc/sysconfig/wesnothd
# pidfile:     /var/run/wesnothd.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0

exec="/usr/sbin/wesnothd"
prog=$(basename $exec)
pidfile=/var/run/$prog.pid
socketfile=/var/run/wesnothd/socket

[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

lockfile=/var/lock/subsys/$prog

start() {
    echo -n $"Starting Wesnoth game server: "
    if [ -n "`/sbin/pidof $prog`" ]; then
        echo -n $"$prog already running"
        failure
        echo
        return 1
    fi
    [ -p $socketfile ] && rm -f $socketfile
    daemon --user wesnothd $exec --daemon $WESNOTHD_OPTIONS >/dev/null 2>&1
    retval=$?
    if [ $retval -eq 0 ]; then
        success
        touch $lockfile
        pidofproc $prog > $pidfile
    else
        failure
    fi
    echo
    return $retval
}

stop() {
    echo -n $"Stopping Wesnoth game server: "
    killproc $prog
    retval=$?
    echo
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}

restart() {
    stop
    start
}

reload() {
    restart
}

force_reload() {
    restart
}

fdr_status() {
    status $prog
}

case "$1" in
    start|stop|restart|reload)
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        fdr_status
        ;;
    condrestart|try-restart)
        [ ! -f $lockfile ] || restart
    ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
        exit 2
esac


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/wesnoth/FC-3/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	8 Nov 2004 05:33:21 -0000	1.3
+++ .cvsignore	22 Jul 2005 17:22:31 -0000	1.4
@@ -1 +1 @@
-wesnoth-0.8.tar.gz
+wesnoth-0.9.3.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/wesnoth/FC-3/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	8 Nov 2004 05:33:21 -0000	1.3
+++ sources	22 Jul 2005 17:22:31 -0000	1.4
@@ -1 +1 @@
-c6258d08645a97c311c9538128f5af6e  wesnoth-0.8.tar.gz
+833bd6995a26c873485750875607f127  wesnoth-0.9.3.tar.gz


Index: wesnoth.spec
===================================================================
RCS file: /cvs/extras/rpms/wesnoth/FC-3/wesnoth.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- wesnoth.spec	10 Dec 2004 22:03:12 -0000	1.4
+++ wesnoth.spec	22 Jul 2005 17:22:31 -0000	1.5
@@ -1,66 +1,176 @@
 Name:           wesnoth
-Version:        0.8
-Release:        2
-Epoch:          0
-Summary:        Battle for Wesnoth is a fantasy turn-based strategy game.
+Version:        0.9.3
+Release:        1%{?dist}
+Summary:        Battle for Wesnoth, a fantasy turn-based strategy game
 
-Group:         	Amusements/Games
+Group:          Amusements/Games
 License:        GPL
 URL:            http://www.wesnoth.org
-Source0:        http://www.wesnoth.org/files/wesnoth-0.8.tar.gz
+Source0:        http://www.wesnoth.org/files/wesnoth-%{version}.tar.gz
+Source1:        wesnothd.init
+Source2:        wesnoth.sysconfig
+Source3:        README.fedora
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  SDL-devel, SDL_image-devel, SDL_mixer-devel
-BuildRequires:	SDL_ttf-devel, SDL_net-devel, freetype-devel
-BuildRequires:	desktop-file-utils
+BuildRequires:  SDL_ttf-devel, SDL_net-devel, freetype-devel
+BuildRequires:  libpng-devel
+BuildRequires:  desktop-file-utils, gettext
+
+Requires:       /sbin/chkconfig
 
 %description
-%{summary}
+%{summary}.
 
-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 
+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.
 
+
+%package server
+Summary:	%{summary}
+Group:		Amusements/Games
+Requires:   %{name} = %{version}-%{release}
+
+%description server
+This package contains the binaries for running a Wesnoth server
+for multi-player games.
+
+
+%package tools
+Summary:	%{summary}
+Group:		Amusements/Games
+Requires:   %{name} = %{version}-%{release}
+
+%description tools
+This package contains the game editor and development tools.
+
+
 %prep
 %setup -q
+cp %{SOURCE3} .
 
 
 %build
 %configure --disable-dependency-tracking \
-	   --enable-server \
-	   --enable-editor
-
-make %{?_smp_mflags} 
+    --with-localedir=%{_datadir}/locale \
+    --enable-editor \
+    --enable-tools \
+    --enable-server \
+    --with-fifodir=/var/run/wesnothd \
+    --with-server-uid=$(id -u) \
+    --with-server-gid=$(id -g) 
+make %{?_smp_mflags}
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%makeinstall
+make install DESTDIR=${RPM_BUILD_ROOT}
 
 desktop-file-install --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
-		     --mode="0644" --vendor fedora \
-		     --add-category="X-Fedora" icons/%{name}.desktop
-# add icon for menus		     
+                     --mode="0644" --vendor fedora \
+                     --add-category="X-Fedora" icons/%{name}.desktop
+# add icon for menus
 mkdir -p $RPM_BUILD_ROOT/%{_datadir}/pixmaps
 install -m 644 images/%{name}-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
 
+# arrange server package files
+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
+
+%find_lang %{name}.\*
+#/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT %name --all-name
+
 find $RPM_BUILD_ROOT -name ".cvs*" | xargs rm -f
 find $RPM_BUILD_ROOT -name "CVS" | xargs rm -rf
 
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+
+%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
+
+
+%files -f %{name}.\*.lang
 %defattr(-,root,root,-)
-%doc COPYING changelog README copyright MANUAL*
-%{_bindir}/*
+%doc COPYING changelog README copyright MANUAL* README.fedora
+%{_bindir}/wesnoth
 %{_datadir}/%{name}
 %{_datadir}/applications/*
 %{_datadir}/pixmaps/*
-%{_mandir}/man6/*
+%{_mandir}/man6/wesnoth.6*
+%{_mandir}/*/man6/wesnoth.6*
+
+%files tools
+%defattr(-,root,root,-)
+%{_bindir}/wesnoth_editor
+%{_bindir}/exploder
+%{_bindir}/cutter
+%{_bindir}/wmlxgettext
+%{_mandir}/man6/wesnoth_editor.6*
+%{_mandir}/*/man6/wesnoth_editor.6*
+
+%files server
+%defattr(-,root,root,-)
+%config %{_initrddir}/wesnothd
+%config(noreplace) %{_sysconfdir}/sysconfig/wesnoth
+%{_sbindir}/wesnothd
+%{_mandir}/man6/wesnothd.*
+%{_mandir}/*/man6/wesnothd.*
+%attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/
+%ghost /var/run/wesnothd/socket
 
 %changelog
+* Fri Jul  8 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.3-1
+- update to 0.9.3
+
+* Mon Jun 13 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.2-1
+- update to 0.9.2
+- BR libpng-devel is needed
+- add initscript and scriptlets for -server package
+- don't build campaign server (upstream suggestion)
+- split off editor+tools into -tools sub-package
+- install translations into system's locale directories
+- merge Panu's changes:
+  Sat Apr 16 2005 Panu Matilainen <pmatilai at welho.com> 0.9.0-1
+- enable campaign server and tools
+- split server to separate package
+- add wesnothd user in server %%pre
+- buildrequire gettext
+
+* Thu May 26 2005 Jeremy Katz <katzj at redhat.com> - 0.8-5
+- fix build on x86_64
+
+* Sun May 22 2005 Jeremy Katz <katzj at redhat.com> - 0.8-4
+- rebuild on all arches
+
+* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
+- rebuilt
+
 * Fri Jul 09 2004 Panu Matilainen <pmatilai at welho.com> 0:0.8-0.fdr.2
 - use upstream desktop file and icon
 




More information about the fedora-extras-commits mailing list