summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedict Etzel2015-06-08 19:45:56 +0200
committerBenedict Etzel2015-06-08 19:45:56 +0200
commite885938edba66f9267b05d7c913de4d4b7506f2f (patch)
tree8f7e911091ca13e25b91bf9a0435be6ac8f190f4
downloadaur-e885938edba66f9267b05d7c913de4d4b7506f2f.tar.gz
Initial import
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD50
-rw-r--r--directories.patch29
-rw-r--r--openclonk.install11
-rw-r--r--sdlfix.patch35
5 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c260ea6412fd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = openclonk
+ pkgdesc = Multiplayer-action-tactic-skill game
+ pkgver = 6.0
+ pkgrel = 3
+ url = http://openclonk.org
+ install = openclonk.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = cmake
+ makedepends = boost
+ makedepends = imagemagick
+ makedepends = mesa
+ depends = freetype2
+ depends = gtk2
+ depends = glew
+ depends = sdl_mixer
+ depends = libxpm
+ depends = hicolor-icon-theme
+ depends = libupnp
+ conflicts = clonk_rage
+ source = http://openclonk.org/builds/release/6.0/openclonk-6.0-src.tar.bz2
+ source = directories.patch
+ source = sdlfix.patch
+ md5sums = 3e0dd1c5f60df0d37dbbb12b7ef5c38b
+ md5sums = 55e35baf307d699a704e9d939d8402fb
+ md5sums = 50b727b8d372be91adce1d0460bf0081
+
+pkgname = openclonk
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..804089e40c23
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Benedict Etzel <developer@beheh.de>
+# Contributor: Jonathan Steel <mail at jsteel dot org>
+# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Wesley <rudirennsau at hotmail dot com>
+
+pkgname=openclonk
+pkgver=6.0
+pkgrel=3
+_orig=$pkgname-release-$pkgver-src
+pkgdesc='Multiplayer-action-tactic-skill game'
+arch=('i686' 'x86_64')
+url='http://openclonk.org'
+license=('custom')
+depends=('freetype2' 'gtk2' 'glew' 'sdl_mixer' 'libxpm' 'hicolor-icon-theme' 'libupnp')
+makedepends=('cmake' 'boost' 'imagemagick' 'mesa')
+conflicts=('clonk_rage')
+install=$pkgname.install
+source=("http://openclonk.org/builds/release/$pkgver/$pkgname-$pkgver-src.tar.bz2" 'directories.patch' 'sdlfix.patch')
+md5sums=('3e0dd1c5f60df0d37dbbb12b7ef5c38b'
+ '55e35baf307d699a704e9d939d8402fb'
+ '50b727b8d372be91adce1d0460bf0081')
+
+prepare() {
+ cd "${srcdir}/${_orig}"
+ patch -p1 -i ../directories.patch
+ patch -p1 -i ../sdlfix.patch
+}
+
+build() {
+ cd "${srcdir}/${_orig}"
+ [[ -d build ]] && rm -rf build
+ mkdir build && cd build
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2
+ make
+}
+
+package() {
+ cd "${srcdir}/${_orig}"
+ cd build
+
+ make DESTDIR="$pkgdir" install
+
+ # licenses
+ install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
+ install -m644 ../licenses/*.txt "$pkgdir"/usr/share/licenses/$pkgname
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/directories.patch b/directories.patch
new file mode 100644
index 000000000000..5eac963dfb05
--- /dev/null
+++ b/directories.patch
@@ -0,0 +1,29 @@
+--- openclonk-release-6.0-src/CMakeLists.txt 2015-03-12 22:21:51.000000000 +0100
++++ openclonk-release-6.0-src.new/CMakeLists.txt 2015-03-15 20:57:35.333928593 +0100
+@@ -1215,7 +1215,7 @@
+ # Don't put this into CMAKE_CXX_FLAGS because otherwise it is cached,
+ # and when the path is changed both the old and new definition appears
+ # in the list of flags.
+- add_definitions("-DOC_SYSTEM_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/games/openclonk\"")
++ add_definitions("-DOC_SYSTEM_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/openclonk\"")
+ endif()
+ if(OC_CXX_FLAGS)
+ list(REMOVE_DUPLICATES OC_CXX_FLAGS)
+@@ -1537,7 +1537,7 @@
+ DEPENDS "${native_c4group}"
+ VERBATIM
+ )
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION share/games/openclonk)
++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${group} DESTINATION share/openclonk)
+ endif()
+ endforeach()
+
+@@ -1551,7 +1551,7 @@
+ install(CODE "execute_process(COMMAND update-desktop-database)")
+
+ # Install binaries
+- install(TARGETS openclonk DESTINATION games)
++ install(TARGETS openclonk DESTINATION bin)
+ install(TARGETS c4group DESTINATION bin)
+ else()
+ install(TARGETS openclonk
diff --git a/openclonk.install b/openclonk.install
new file mode 100644
index 000000000000..1a05f573e594
--- /dev/null
+++ b/openclonk.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/sdlfix.patch b/sdlfix.patch
new file mode 100644
index 000000000000..600d09c2adc0
--- /dev/null
+++ b/sdlfix.patch
@@ -0,0 +1,35 @@
+From fd6914f9cba6d7138b57c7fa6faa7437d9cbb639 Mon Sep 17 00:00:00 2001
+From: Kevin Zheng <kevinz5000@gmail.com>
+Date: Sun, 15 Mar 2015 13:18:13 -0500
+Subject: [PATCH] Fix linking with SDL
+
+---
+ CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4c5d2f3..2621a5a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -912,7 +912,6 @@ if(USE_SDL_MAINLOOP OR (Audio_TK STREQUAL "SDL_Mixer"))
+ find_package(SDL)
+ SET(HAVE_SDL ${SDL_FOUND})
+ include_directories(${SDL_INCLUDE_DIR})
+- target_link_libraries(openclonk ${SDL_LIBRARY})
+ endif()
+
+ ############################################################################
+@@ -1094,6 +1093,10 @@ target_link_libraries(openclonk
+ libmisc
+ )
+
++if (SDL_FOUND)
++ target_link_libraries(openclonk ${SDL_LIBRARY})
++endif()
++
+ if(Audio_FOUND)
+ target_link_libraries(openclonk ${Audio_LIBRARIES})
+ include_directories(${Audio_INCLUDE_DIRS})
+--
+2.1.4
+