New package: sauerbraten-2013.02.03

This commit is contained in:
Michael Aldridge 2016-12-12 18:02:51 -06:00
parent 9a40201b40
commit 16bdc360ac
6 changed files with 101 additions and 0 deletions

1
srcpkgs/sauerbraten-data Symbolic link
View file

@ -0,0 +1 @@
sauerbraten

1
srcpkgs/sauerbraten-server Symbolic link
View file

@ -0,0 +1 @@
sauerbraten

View file

@ -0,0 +1,7 @@
#!/bin/sh
SAUER_DATA=/usr/share/sauerbraten
SAUER_BIN=/usr/bin/sauer_client
SAUER_OPTIONS="-q${HOME}/.sauerbraten"
cd ${SAUER_DATA}
exec ${SAUER_BIN} ${SAUER_OPTIONS} "$@"

View file

@ -0,0 +1,6 @@
#!/bin/sh
SAUER_DATA=/etc/sauerbraten/
SAUER_SERV_BIN=/usr/bin/sauer_server
cd ${SAUER_DATA}
exec ${SAUER_SERV_BIN} "$@"

View file

@ -0,0 +1,35 @@
--- src/Makefile.orig 2017-01-12 21:54:08.156276696 -0600
+++ src/Makefile 2017-01-12 21:56:06.889752748 -0600
@@ -1,4 +1,4 @@
-CXXFLAGS= -O3 -fomit-frame-pointer
+CXXFLAGS= -O3 -fomit-frame-pointer $(CFLAGS)
override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti
PLATFORM= $(shell uname -s)
@@ -137,7 +137,7 @@
enet/Makefile:
cd enet; ./configure --enable-shared=no --enable-static=yes
-
+
libenet: enet/Makefile
$(MAKE) -C enet/ all
@@ -177,13 +177,13 @@
install: all
else
client: libenet $(CLIENT_OBJS)
- $(CXX) $(CXXFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS)
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS)
server: libenet $(SERVER_OBJS)
- $(CXX) $(CXXFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS)
-
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS)
+
master: libenet $(MASTER_OBJS)
- $(CXX) $(CXXFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS)
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS)
shared/cube2font.o: shared/cube2font.c
$(CXX) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags`

View file

@ -0,0 +1,51 @@
# Template file for 'sauerbraten'
pkgname=sauerbraten
version=2013.02.03
revision=1
wrksrc=$pkgname
build_wrksrc=src
build_style=gnu-makefile
conf_files="/etc/sauerbraten/server-init.cfg"
makedepends="SDL_image-devel SDL_mixer-devel zlib-devel"
depends="${pkgname}-data-${version}_${revision}"
short_desc="3D game engine (more powerful redesign of the Cube engine) and FPS game"
maintainer="Michael Aldridge <aldridge.mac@gmail.com>"
license="zlib"
homepage="http://sauerbraten.org"
distfiles="${SOURCEFORGE_SITE}/sauerbraten/sauerbraten_${version//./_}_collect_edition_linux.tar.bz2"
checksum=45c20521e3e56374490b2d9112a211538e801cf0161197f35476b30b7b58a78e
# Too big to store on current mirror infrastructure, and not a high
# priority package
restricted=yes
# Its only supported to build on i686 and x86_64, and enet doesn't
# cross compile
only_for_archs="x86_64"
post_install() {
vbin $wrksrc/bin_unix/native_client sauer_client
vbin ${FILESDIR}/sauerbraten
}
sauerbraten-data_package() {
noarch=yes
pkg_install() {
vmkdir usr/share/$sourcepkg
vcopy $wrksrc/data usr/share/$sourcepkg/data
vcopy $wrksrc/packages usr/share/$sourcepkg/packages
}
}
sauerbraten-server_package() {
pkg_install() {
vbin $wrksrc/bin_unix/native_server sauer_server
vmkdir etc/$sourcepkg
vcopy $wrksrc/server-init.cfg etc/$sourcepkg/server-init.cfg
vbin ${FILESDIR}/sauerbraten-server
# No service directory because this server isn't really suited
# to running for long periods of time.
}
}