This script can do svn 1.5.x sparse checkouts or pre-1.5 checkouts. The script defaults to using subversion 1.5+ sparse checkouts. If an older client is detected, the script switches to a legacy checkout directory model. It is available for download from invidious.meflin.net.
Create the desired development directory first, get the script, then run it to checkout. For example:
$ mkdir -p /home/devel/crossfire $ cd /home/devel/crossfire $ wget http://invidious.meflin.net/~kbulgrien/files/svn-co.sh $ bash svn-co.sh --trunk --all
Built-in help shows:
Usage:
svn-co.sh \
{ --client | --server | --all } \
{ --trunk | --branch=1.xx } \
[ --release ]
Where:
xx is the branch number
A client checkout with --release gets arch and server too.
This script is only used for SVN clients of a lower version number than 1.5, or when a non-sparse checkout is used. It is available for download from invidious.meflin.net.
Enter the desired development directory first, get the script, and then run it to update. For example:
$ cd /home/devel/crossfire $ wget http://invidious.meflin.net/~kbulgrien/files/svn-up.sh $ bash svn-up.sh --trunk --all
Built-in help shows:
Usage:
svn-up.sh \
{ --client | --server | --all } \
{ --trunk | --branch=1.xx } \
[ --release ]
Where:
xx is the branch number
A client update with --release updates arch and server too.
#!/bin/bash
#
export CFLAGS="-ggdb -g -O0"
PWD=`pwd`
if [ "${PWD/client/}" != "${PWD}" ]
then
aclocal -I macros --install
autoheader
automake -a -c
autoreconf
./configure --prefix=$(pwd) --enable-cfgtk2
else
bash autogen.sh --prefix=$(pwd) ${*}
fi
echo
!/bin/bash export CFLAGS="-ggdb -g $1" # export CFLAGS="-ggdb -g -O0" if [ -e Makefile ] then make maintainer-clean fi bash autogen.sh --prefix=$(pwd) --enable-cfgtk2
export CFLAGS="-ggdb -g -O0"
if [ -e Makefile ]
then
make maintainer-clean
fi
case "$(basename $(dirname $(pwd)))" in
client)
CFOPTS="--enable-cfgtk2"
;;
esac
CWD="$(pwd)"
if [ "${CWD/client/}" != "${CWD}" ]
then
if [ ! -e utils/config.guess ]
then
aclocal -I macros --install
autoheader
automake -a -c
fi
autoreconf
./configure ${CFOPTS} --prefix=/usr/local/games/crossfire
else
bash ./autogen.sh ${CFOPTS} --prefix=/usr/local/games/crossfire
# --enable-maintainer-mode
fi
Create yet another shell script called config.sh as follows:
#!/bin/bash
#
export CFLAGS="-ggdb -g -O0"
PWD=`pwd`
if [ "${PWD/client/}" != "${PWD}" ]
then
aclocal -I macros --install
autoheader
automake -a -c
autoreconf
./configure --prefix=/home/devel/crossfire/prerelease --enable-cfgtk2
else
bash autogen.sh --prefix=/home/devel/crossfire/prerelease ${*}
fi
echo
$ urpmq --whatprovides libglade2 No package named libglade2 The following packages contain libglade2: libglade2.0_0, libglade2.0_0-devel, ruby-libglade2 You should use "-a" to use all of them $ sudo urpmi libglade2.0_0-devel To satisfy dependencies, the following packages are going to be installed: Package Version Release Arch (medium "Mandriva Linux - 2009.0 (Free) - Installer") libglade2.0_0-devel 2.6.3 1mdv2009.0 i586 libglib2.0-devel 2.18.1 1mdv2009.0 i586 libgtk+2.0_0-devel 2.14.3 2mdv2009.0 i586 libpixman-1-devel 0.12.0 1mdv2009.0 i586 libpthread-stubs 0.1 4mdv2009.0 i586 libsm6-devel 1.1.0 1mdv2009.0 i586 libxcb-devel 1.1.91 2mdv2009.0 i586 libxcursor-devel 1.1.9 3mdv2009.0 i586 libxdamage-devel 1.1.1 3mdv2009.0 i586 libxext6-devel 1.0.4 2mdv2009.0 i586 libxrender1-devel 0.9.4 3mdv2009.0 i586 libxt6-devel 1.0.5 4mdv2009.0 i586 x11-proto-devel 7.3 6mdv2009.0 i586 zlib1-devel 1.2.3 12mdv2009.0 i586 (medium "Main") glib-gettextize 2.18.1 1mdv2009.0 i586 libatk1.0-devel 1.24.0 1mdv2009.0 i586 libcairo-devel 1.8.0 1mdv2009.0 i586 libfontconfig-devel 2.6.0 3mdv2009.0 i586 libfreetype6-devel 2.3.7 1mdv2009.0 i586 libgdk_pixbuf2.0_0-devel 2.14.3 2mdv2009.0 i586 libice6-devel 1.0.4 5mdv2009.0 i586 libpango1.0-devel 1.22.0 1mdv2009.0 i586 libpng-devel 1.2.31 2mdv2009.0 i586 libx11_6-devel 1.1.5 1mdv2009.0 i586 libxau6-devel 1.0.4 1mdv2009.0 i586 libxcomposite1-devel 0.4.0 3mdv2009.0 i586 libxdmcp6-devel 1.0.2 6mdv2009.0 i586 libxfixes3-devel 4.0.3 4mdv2009.0 i586 libxft-devel 2.1.13 1mdv2009.0 i586 libxi-devel 1.1.3 3mdv2009.0 i586 libxinerama1-devel 1.0.3 2mdv2009.0 i586 libxrandr2-devel 1.2.3 1mdv2009.0 i586 pango-doc 1.22.0 1mdv2009.0 i586 (medium "Main Updates") libxml2-devel 2.7.1 1.2mdv2009.0 i586 90MB of additional disk space will be used. 12MB of packages will be retrieved. Proceed with the installation of the 34 packages? (Y/n) Y ... $ sudo urpmi libcurl-devel To satisfy dependencies, the following packages are going to be installed: Package Version Release Arch (medium "Mandriva Linux - 2009.0 (Free) - Installer") libkrb53-devel 1.6.3 6mdv2009.0 i586 libldap2.4_2-devel 2.4.11 3mdv2009.0 i586 (medium "Main") libext2fs-devel 1.41.2 1mnb2 i586 libidn-devel 1.10 1mdv2009.0 i586 libopenssl0.9.8-devel 0.9.8h 3mdv2009.0 i586 libsasl2-devel 2.1.22 29mdv2009.0 i586 libssh2-devel 0.18 4mdv2009.0 i586 libwrap-devel 7.6 37mdv2009.0 i586 (medium "Main Updates") libcurl-devel 7.19.0 2.1mdv2009.0 i586 14MB of additional disk space will be used. 3.5MB of packages will be retrieved. Proceed with the installation of the 9 packages? (Y/n) Y ... $ sudo urpmi liblua-devel To satisfy dependencies, the following packages are going to be installed: Package Version Release Arch (medium "Mandriva Linux - 2009.0 (Free) - Installer") libncurses-devel 5.6 1.20080823.1> i586 (medium "Main") liblua-devel 5.1.4 2mdv2009.0 i586 libreadline5-devel 5.2 9mdv2009.0 i586 lua 5.1.4 2mdv2009.0 i586 14MB of additional disk space will be used. 3MB of packages will be retrieved. Proceed with the installation of the 4 packages? (Y/n) Y ... $ sudo urpmi libSDL_image-devel To satisfy dependencies, the following packages are going to be installed: Package Version Release Arch (medium "Mandriva Linux - 2009.0 (Free) - Installer") libSDL_image1.2_0 1.2.6 6mdv2009.0 i586 libdrm-devel 2.3.1 1mdv2009.0 i586 libxxf86vm-devel 1.0.2 1mdv2009.0 i586 mesa 7.0.4 1mdv2009.0 i586 (medium "Main") libSDL-devel 1.2.13 10mdv2009.0 i586 libSDL_image-devel 1.2.6 6mdv2009.0 i586 libaa-devel 1.4.0 0.rc5.17mdv2> i586 libalsa2-devel 1.0.18 0.rc3.1mdv20> i586 libdirectfb-devel 1.2.3 3mdv2009.0 i586 libggi-devel 2.2.2 10mdv2009.0 i586 libgii-devel 1.0.2 10mdv2009.0 i586 libmesagl1-devel 7.0.4 1mdv2009.0 i586 libmesaglu1-devel 7.0.4 1mdv2009.0 i586 libnas-devel 1.9.1 1mdv2009.0 i586 libslang-devel 2.1.3 3mdv2009.0 i586 libsysfs-devel 2.1.0 9mnb2 i586 libsysfs-static-devel 2.1.0 9mnb2 i586 libxxf86dga-devel 1.0.2 3mdv2009.0 i586 24MB of additional disk space will be used. 4.9MB of packages will be retrieved. Proceed with the installation of the 18 packages? (Y/n) Y $ sudo urpmi libmesaglut3-devel To satisfy dependencies, the following packages are going to be installed: Package Version Release Arch (medium "Mandriva Linux - 2009.0 (Free) - Installer") libmesaglut3 7.0.4 1mdv2009.0 i586 (medium "Main") libmesaglut3-devel 7.0.4 1mdv2009.0 i586 libxmu6-devel 1.0.4 4mdv2009.0 i586 371KB of additional disk space will be used. 129KB of packages will be retrieved. Proceed with the installation of the 3 packages? (Y/n) Y ... $ sudo urpmi makedepend cproto
The directions use SVN trunk as the example release. The instructions presume you start in the top level SVN directory (the one that contains the arch, client, maps, server) for each phase (arch, client, maps, server)
This procedure assumes that release operations are done in the /home/devel/crossfire/rpmbuild directory.
The RPMs build in this procedure may be installed by a user without using sudo or root permissions. The RPMs will be build to install in the user’s home directory (${HOME}/usr/local/games/crossfire). This path is chosen so it is clearer how to modify the procedure to build RPMs that install into /usr/local/games/crossfire.
A key to building RPMs without using sudo or root is centered around creating a .rpmmacros file in the builder’s home directory. You only need a file like this set up if you want to build and install the rpm as a normal user. To make RPMs that use distribution defaults, make sure that ~/.rpmmacros does not exist, or that it does not conflict with the system-wide settings.
# /etc/rpm/macros # (c) GPL 2003 Tero.Karvinen at-sign iki.fi
%packager %(echo "$USER")
%_topdir /home/devel/crossfire/rpmbuild
# %_rpmtopdir %{_topdir}/%{name}/RPM
%_rpmtopdir %{_topdir}/RPM
%_builddir %{_rpmtopdir}/BUILD
%_rpmdir %{_rpmtopdir}/RPMS
%_sourcedir %{_rpmtopdir}/SOURCES
%_specdir %{_rpmtopdir}/SPECS
%_srcrpmdir %{_rpmtopdir}/SRPMS
%_tmppath %{_rpmtopdir}/TMP
%_buildroot %{_tmppath}/%{name}-root
%_datadir %(echo "$HOME")/usr/local/games/crossfire
# Build rpms in your home directory, without root priviledges
# Users can copy this file to $HOME/.rpmmacros to override
# settings, such as packager to "Firstname Lastname email".
# Example of typical directory and file hierarchy for
# rpm building:
# ~/rpmbuild/
# ~/rpmbuild/nano/ # replace nano with rpm name
# ~/rpmbuild/nano/TMP/
# ~/rpmbuild/nano/BUILD/ # user must create this dir
# and files (can be extracted from a source rpm with
# rpm2cpio *.src.rpm |cpio -dvi
# ~/rpmbuild/nano/nano-1.2.tar.gz
# ~/rpmbuild/nano/nano.spec
# Then you can build your rpm with
# rm -rf TMP/* BUILD/* ; rpmbuild -ba *.spec 2>&1 |tee rpmbuild.log
# For more information, see www.iki.fi/karvinen
Create the base workspace directory and make it your current working directory.
$ export RELDIR=/home/devel/crossfire/rpmbuild
$ mkdir -p ${RELDIR}
$ cd ${RELDIR}
Populate the release workspace with the necessary scripts:
$ wget http://invidious.meflin.net/~kbulgrien/files/svn-co.sh $ wget http://invidious.meflin.net/~kbulgrien/files/svn-up.sh $ wget http://invidious.meflin.net/~kbulgrien/files/trunk.config.sh $ wget http://invidious.meflin.net/~kbulgrien/files/branch.config.sh $ wget http://invidious.meflin.net/~kbulgrien/files/prerelease.sh
It is only necessary to manually invoke the prerelease.sh script. The other scripts are automatically called as needed.
The built-in help for prerelease.sh shows:
Usage:
prerelease.sh \
{ --client | --server | --all } \
{ --trunk | --branch=1.xx } \
[ --name=First_I._Last ] \
[ --email=me@my.domain ] \
[ --release=y ] \
[ --maps-bz2 ]
Where:
xx is the branch number
--name
--email
Specify the RPM packager (default: user@my.domain)
Use underscores instead of spaces for --name.
--release=y
Build a release instead of a snapshot. For the first release
of a particular version, always use 0. For subsequent bugfix
re-releases, increment the release count by one.
--maps-bz2
Create a bzip2 maps tarball in addition to a gzip tarball.
An example of how to build a snapshot release follows:
$ bash prerelease.sh --trunk --client --name=First_I._Last --email=me@my.domain
Making an official release is not yet fully implemented and tested, but the primary difference is adding a –release parameter to the prerelease.sh command-line.
The client restores the window vertically offset (lower) by about the size of the window title bar. It should restore it the same place it was when saved.
* Can’t easily reproduce this one. Had just bought a permanent apartment. Saved by ‘a’pplying the bed and probably hit ‘a’ more that one once very quickly. The client crashed immediately. Had done a bunch of dropping right before. I don’t have a clue what went bad. It was an RPM build. I do not know what the 24881 means in the message below.
$ crossfire-client-gtk2 (crossfire-client-gtk2:24881): Gtk-CRITICAL **: gtk_widget_modify_fg: assertion `GTK_IS_WIDGET (widget)' failed (crossfire-client-gtk2:24881): Gtk-CRITICAL **: gtk_widget_modify_font: assertion `GTK_IS_WIDGET (widget)' failed Segmentation fault $ date Sat Dec 20 22:27:49 CST 2008 $ crossfire-client-gtk2 -loglevel 0 [ INFO ] (Client Version) GTK V2 Unix Client 2.0.r11029