forked from ports/contrib
wesnoth-server: contrib -> romster
This commit is contained in:
parent
617ad2b861
commit
4bf0124dd8
@ -1,13 +0,0 @@
|
||||
drwxr-xr-x root/root etc/
|
||||
drwxr-xr-x root/root etc/rc.d/
|
||||
-rwxr-xr-x root/root etc/rc.d/wesnoth
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr----- root/wesnothd usr/bin/campaignd
|
||||
-rwxr----- root/wesnothd usr/bin/wesnothd
|
||||
drwxr-xr-x root/root usr/man/
|
||||
drwxr-xr-x root/root usr/man/man6/
|
||||
-rw-r--r-- root/root usr/man/man6/wesnothd.6.gz
|
||||
drwxr-xr-x root/root var/
|
||||
drwxr-xr-x root/root var/run/
|
||||
drwxrwx--- root/wesnothd var/run/wesnothd/
|
@ -1,2 +0,0 @@
|
||||
a2ac2d629d4e3e5fc7e7e48f935d9960 wesnoth-1.10.1.tar.bz2
|
||||
637b68da9ad8032f3219cee2c64569a9 wesnothd.rc
|
@ -1,48 +0,0 @@
|
||||
# Description: Server for Wesnoth.
|
||||
# URL: http://www.wesnoth.org/
|
||||
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
|
||||
# Packager: Danny Rawlins, monster dot romster at gmail dot com
|
||||
# Depends on: boost cmake pango sdl_image sdl_mixer sdl_net sdl_ttf lua libidn
|
||||
|
||||
name=wesnoth-server
|
||||
version=1.10.1
|
||||
release=1
|
||||
source=(http://downloads.sourceforge.net/project/wesnoth/wesnoth-${version%.*}/wesnoth-$version/wesnoth-$version.tar.bz2
|
||||
wesnothd.rc)
|
||||
|
||||
build() {
|
||||
cd wesnoth-$version
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake ../ \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DMANDIR=/usr/man \
|
||||
-DENABLE_NLS=FALSE \
|
||||
-DENABLE_CAMPAIGN_SERVER=TRUE \
|
||||
-DENABLE_SERVER=TRUE \
|
||||
-DSERVER_UID=root \
|
||||
-DSERVER_GID=wesnothd \
|
||||
-DFIFO_DIR=/var/run/wesnothd
|
||||
|
||||
make campaignd wesnothd
|
||||
make DESTDIR=$PKG install
|
||||
install -m 0755 -D $SRC/wesnothd.rc $PKG/etc/rc.d/wesnoth
|
||||
chown root:wesnothd $PKG/usr/bin/{wesnothd,campaignd}
|
||||
chmod 0740 -c $PKG/usr/bin/{wesnothd,campaignd}
|
||||
chmod 0770 -c $PKG/var/run/wesnothd
|
||||
|
||||
rm \
|
||||
$PKG/usr/bin/wesnoth \
|
||||
$PKG/usr/man/man6/wesnoth.6 \
|
||||
$PKG/usr/share/applications/{wesnoth,wesnoth_editor}.desktop
|
||||
|
||||
rm -r \
|
||||
$PKG/usr/share/doc \
|
||||
$PKG/usr/share/pixmaps \
|
||||
$PKG/usr/share/wesnoth/data \
|
||||
$PKG/usr/share/wesnoth
|
||||
|
||||
rmdir $PKG/usr/share/applications $PKG/usr/share
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
Notes:
|
||||
|
||||
See wesnoth's pre-install script to save time downloading
|
||||
a new wesnoth archive.
|
@ -1,41 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Created by Danny Rawlins, monster dot romster at gmail dot com
|
||||
|
||||
GROUP=wesnothd
|
||||
USER=wesnothd
|
||||
USER_COMMENT="Wesnoth game server"
|
||||
USER_HOME=/var/empty
|
||||
USER_SHELL=/bin/sh
|
||||
|
||||
if [ ! $(id -u) = 0 ]; then
|
||||
echo "ERROR: you need to be root to run this!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $GROUP ]; then
|
||||
if ! getent group $GROUP > /dev/null; then
|
||||
/usr/sbin/groupadd $GROUP
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Group: $GROUP added."
|
||||
fi
|
||||
else
|
||||
echo "Group: $GROUP already exists! Skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! getent passwd $USER > /dev/null; then
|
||||
/usr/sbin/useradd -g $GROUP -c "$USER_COMMENT" -d $USER_HOME -s $USER_SHELL $USER
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User: $USER added."
|
||||
/usr/bin/passwd -l $USER > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Locked: $USER account."
|
||||
fi
|
||||
else
|
||||
echo "ERROR: unable to lock $USER account."
|
||||
/usr/sbin/userdel $USER
|
||||
fi
|
||||
else
|
||||
echo "User: $USER already exists! Skipping."
|
||||
fi
|
||||
|
@ -1,40 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/wesnoth: start/stop wesnothd daemon
|
||||
#
|
||||
|
||||
# User settings here
|
||||
DAEMON=wesnothd
|
||||
RUN_AS_USER=wesnothd
|
||||
|
||||
RETVAL=0
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
echo -n "Starting $DAEMON..."
|
||||
su $RUN_AS_USER -c /usr/bin/$DAEMON > /dev/null & RETVAL=$?
|
||||
if [ $RETVAL = 0 ]; then
|
||||
echo " done."
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down $DAEMON..."
|
||||
killall -q /usr/bin/$DAEMON
|
||||
RETVAL=$?
|
||||
echo " done."
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 2
|
||||
$0 start
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
||||
# End of file
|
Loading…
x
Reference in New Issue
Block a user