Polished redeclipse build. Now it uses system Enet. It also includes .desktop...

Polished redeclipse build. Now it uses system Enet. It also includes .desktop file, for desktop integration. Icon was also changed, now including a real high-quality PNG icon.
parent c3a1a9a0
......@@ -5,42 +5,55 @@
pkgname=redeclipse
pkgver=1.1
pkgrel=1
pkgdesc="A single-player and multi-player first-person ego-shooter, built as a total conversion of Cube Engine 2"
arch=('i686' 'x86_64')
url="http://redeclipse.net"
license=('CCPL-by-sa' 'ZLIB')
depends=('sdl_image' 'libgl' 'sdl_mixer')
makedepends=('mesa')
source=("http://downloads.sourceforge.net/$pkgname/${pkgname}_${pkgver}_linux_bsd.tar.bz2")
md5sums=('8d8aa038c7c866bced43b110333b37d7')
pkgrel=2
pkgdesc='A first-person shooter, built as a total conversion of Cube Engine 2.'
arch=(i686 x86_64)
url=http://redeclipse.net
license=(CCPL-by-sa ZLIB)
depends=(enet libgl mesa sdl sdl_image sdl_mixer zlib)
source=(http://downloads.sourceforge.net/$pkgname/${pkgname}_${pkgver}_linux_bsd.tar.bz2
system-libs.diff
http://imagecdn.maketecheasier.com/2011/04/red-eclipse-logo.png)
md5sums=('e1330a858944e3bdb98fd15e07025d5f'
'f34900e6c8247754800d8fba0600dfb7'
'813971d2496132781ff0f8bf55e0cd2d')
build() {
cd $srcdir/$pkgname/src
# Patches.
patch -uN Makefile $srcdir/system-libs.diff
# Compilation.
make
}
package() {
cd $srcdir/$pkgname
install -d $pkgdir/usr/{share/$pkgname,}/bin
sed -i "s|RE_DATA=.|RE_DATA=/usr/share/$pkgname|" $pkgname.sh
# Game.
install -d $pkgdir/usr/share/$pkgname/bin
install -m755 src/re{server,client} $pkgdir/usr/share/$pkgname/bin/
cp -rf data/ $pkgdir/usr/share/$pkgname
# Execution script.
cat <<EOF > $pkgdir/usr/bin/$pkgname
#!/bin/sh
cd /usr/share/$pkgname
exec bin/reclient -r "\$@"
EOF
chmod 755 $pkgdir/usr/bin/$pkgname
install -d $pkgdir/usr/bin
echo '#!/bin/sh' > $pkgdir/usr/bin/$pkgname
echo "cd /usr/share/$pkgname" >> $pkgdir/usr/bin/$pkgname
echo 'exec bin/reclient -r "$@"' >> $pkgdir/usr/bin/$pkgname
chmod +x $pkgdir/usr/bin/$pkgname
# Desktop integration file.
sed -i \
-e 's/Version=1\.1/Version=1\.0/' \
-e 's|Icon=redeclipse|Icon=/usr/share/pixmaps/redeclipse|' \
-e 's/a\./a/' \
src/install/nix/$pkgname.desktop
install -Dm644 src/install/nix/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
# Icon.
install -Dm644 src/redeclipse.ico $pkgdir/usr/share/pixmaps/$pkgname.png
install -Dm644 $srcdir/red-eclipse-logo.png $pkgdir/usr/share/pixmaps/$pkgname.png
# License.
install -Dm644 license.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
md5sums=('e1330a858944e3bdb98fd15e07025d5f')
--- Makefile.old 2011-07-31 21:38:04.000000000 +0200
+++ Makefile 2011-07-31 21:50:43.000000000 +0200
@@ -5,7 +5,7 @@
PLATFORM= $(shell uname -s)
PLATFORM_SUFFIX=_native
-INCLUDES= -Ishared -Iengine -Igame -Ienet/include
+INCLUDES= -Ishared -Iengine -Igame -I/usr/share/enet/include
STRIP=
ifeq (,$(findstring -g,$(CXXFLAGS)))
@@ -22,7 +22,7 @@
CLIENT_LIBS= -mwindows -Llib -lSDL -lSDL_image -lSDL_mixer -lzdll -lopengl32 -lenet -lws2_32 -lwinmm
else
CLIENT_INCLUDES= -DINTERFACE -DIRC $(INCLUDES) -I/usr/X11R6/include `sdl-config --cflags`
-CLIENT_LIBS= -Lenet/.libs -lenet -L/usr/X11R6/lib -lX11 `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL
+CLIENT_LIBS= -lenet -L/usr/X11R6/lib -lX11 `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL
endif
ifeq ($(PLATFORM),Linux)
CLIENT_LIBS+= -lrt
@@ -92,7 +92,7 @@
SERVER_LIBS= -mwindows -Llib -lzdll -lenet -lws2_32 -lwinmm
else
SERVER_INCLUDES= -DSTANDALONE -DMASTERSERVER -DIRC $(INCLUDES)
-SERVER_LIBS= -Lenet/.libs -lenet -lz
+SERVER_LIBS= -lenet -lz
endif
SERVER_OBJS= \
shared/crypto-standalone.o \
@@ -157,13 +157,13 @@
$(STRIP) ../bin/reserver.exe
endif
else
-client: libenet $(CLIENT_OBJS)
+client: $(CLIENT_OBJS)
$(CXX) $(CXXFLAGS) -o reclient $(CLIENT_OBJS) $(CLIENT_LIBS)
ifneq (,$(STRIP))
$(STRIP) reclient
endif
-server: libenet $(SERVER_OBJS)
+server: $(SERVER_OBJS)
$(CXX) $(CXXFLAGS) -o reserver $(SERVER_OBJS) $(SERVER_LIBS)
ifneq (,$(STRIP))
$(STRIP) reserver
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment