From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- community/xmoto/PKGBUILD | 42 +++++++++++++++++++++++++++++++++++++++++ community/xmoto/libpng-14.patch | 11 +++++++++++ community/xmoto/xmoto.desktop | 13 +++++++++++++ community/xmoto/xmoto.install | 15 +++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 community/xmoto/PKGBUILD create mode 100644 community/xmoto/libpng-14.patch create mode 100644 community/xmoto/xmoto.desktop create mode 100644 community/xmoto/xmoto.install (limited to 'community/xmoto') diff --git a/community/xmoto/PKGBUILD b/community/xmoto/PKGBUILD new file mode 100644 index 000000000..3a51a3c78 --- /dev/null +++ b/community/xmoto/PKGBUILD @@ -0,0 +1,42 @@ +# $Id: PKGBUILD 64796 2010-01-22 08:19:26Z eric $ +# Maintainer: Ronald van Haren +# Contributor: Travis Willard +# Contributor: Denis (dtonator@gmail.com) + +pkgname=xmoto +pkgver=0.5.5 +pkgrel=1 +pkgdesc="A challenging 2D motocross platform game, where physics play an important role." +arch=('i686' 'x86_64') +url="http://xmoto.tuxfamily.org" +license=('GPL') +depends=('bzip2' 'libjpeg' 'libpng' 'lua' 'sdl_mixer' 'ode=0.11.1' 'curl' + 'mesa' 'sqlite3' 'sdl_ttf' 'desktop-file-utils' 'sdl_net' 'libxdg-basedir') +install=xmoto.install +source=("http://download.tuxfamily.org/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}-src.tar.gz" + "libpng-14.patch") +sha1sums=('4deb6f27fc8100cd66e1d655da7ca0e94dacf198' + '005015ecbd2dcedcc865dd085e1d8c49d96270fd') +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + patch -Np1 -i ${srcdir}/libpng-14.patch + + # build and install + ./configure LDFLAGS="-L/usr/lib" --prefix=/usr --disable-sdltest + + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} mangdir=/usr/share/man/man6 install + + # install desktop file + install -Dm0644 ${srcdir}/${pkgname}-${pkgver}/extra/xmoto.desktop \ + ${pkgdir}/usr/share/applications/xmoto.desktop + + # install icon for desktop file + install -Dm0644 ${srcdir}/${pkgname}-${pkgver}/extra/xmoto.xpm \ + ${pkgdir}/usr/share/pixmaps/xmoto.xpm +} diff --git a/community/xmoto/libpng-14.patch b/community/xmoto/libpng-14.patch new file mode 100644 index 000000000..6e4eb2cd8 --- /dev/null +++ b/community/xmoto/libpng-14.patch @@ -0,0 +1,11 @@ +--- xmoto-0.5.3/src/image/tim_png.cpp.old 2010-05-19 21:13:09.401802546 +0200 ++++ xmoto-0.5.3/src/image/tim_png.cpp 2010-05-19 21:15:13.008451656 +0200 +@@ -166,7 +166,7 @@ + png_set_palette_to_rgb(PngPtr); + + if(nColorType==PNG_COLOR_TYPE_GRAY && nBitDepth<8) +- png_set_gray_1_2_4_to_8(PngPtr); ++ png_set_expand_gray_1_2_4_to_8(PngPtr); + + if(png_get_valid(PngPtr,InfoPtr,PNG_INFO_tRNS)) + png_set_tRNS_to_alpha(PngPtr); diff --git a/community/xmoto/xmoto.desktop b/community/xmoto/xmoto.desktop new file mode 100644 index 000000000..5ae6fe226 --- /dev/null +++ b/community/xmoto/xmoto.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Icon=/usr/share/xmoto/xmoto_icone_x.ico +Exec=/usr/bin/xmoto +Terminal=false +StartupNotify=false + +Name=XMoto +GenericName=Game +Comment=is a 2D physics-based motocross game. + +Categories=Game; diff --git a/community/xmoto/xmoto.install b/community/xmoto/xmoto.install new file mode 100644 index 000000000..52399d4c1 --- /dev/null +++ b/community/xmoto/xmoto.install @@ -0,0 +1,15 @@ +post_install() { + /usr/bin/update-desktop-database +} + +post_upgrade() { + /usr/bin/update-desktop-database +} + +post_remove() { + /usr/bin/update-desktop-database +} + +op=$1 +shift +$op $* -- cgit v1.2.3-54-g00ecf