Skip to content

Instantly share code, notes, and snippets.

@lluchs
Last active January 19, 2016 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lluchs/ed798c6680f14ca837b6 to your computer and use it in GitHub Desktop.
Save lluchs/ed798c6680f14ca837b6 to your computer and use it in GitHub Desktop.
openclonk PKGBUILD
# Generated by mksrcinfo v8
# Tue Jan 19 15:49:56 UTC 2016
pkgbase = openclonk
pkgdesc = Multiplayer-action-tactic-skill game
pkgver = 7.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 = gtk2
depends = glew
depends = sdl_mixer
depends = libxpm
depends = hicolor-icon-theme
depends = libupnp
optdepends = openclonk-music: proprietary music package
conflicts = clonk_rage
source = http://openclonk.org/builds/release/7.0/openclonk-7.0-src.tar.bz2
source = directories.patch
md5sums = 96303965e696ac284f054ce58ee51fa9
md5sums = ba6ceecd5b2d3983d94e7d3aa24df5fd
pkgname = openclonk
diff -aur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2016-01-15 21:56:57.000000000 +0100
+++ b/CMakeLists.txt 2016-01-17 20:48:52.194153030 +0100
@@ -100,7 +100,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(APPLE)
@@ -1461,7 +1461,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()
@@ -1475,7 +1475,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
post_install() {
gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}
# 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>
# Contributor: Lukas Werling <lukas.werling@gmail.com>
pkgname=openclonk
pkgver=7.0
pkgrel=3
_orig=$pkgname-$pkgver-src
pkgdesc='Multiplayer-action-tactic-skill game'
arch=('i686' 'x86_64')
url='http://openclonk.org'
license=('custom')
depends=('gtk2' 'glew' 'sdl_mixer' 'libxpm' 'hicolor-icon-theme' 'libupnp')
makedepends=('cmake' 'boost' 'imagemagick' 'mesa')
optdepends=('openclonk-music: proprietary music package')
conflicts=('clonk_rage')
install=$pkgname.install
source=("http://openclonk.org/builds/release/$pkgver/$pkgname-$pkgver-src.tar.bz2" 'directories.patch')
md5sums=('96303965e696ac284f054ce58ee51fa9'
'ba6ceecd5b2d3983d94e7d3aa24df5fd')
prepare() {
cd "${srcdir}/${_orig}"
patch -p1 -i ../directories.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
# Replace the music packet with unpacked music to allow adding music.
rm "$pkgdir/usr/share/openclonk/Music.ocg"
install -Dm644 ../planet/Music.ocg/* -t "$pkgdir/usr/share/openclonk/Music.ocg"
# licenses
install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
install -m644 ../licenses/*.txt "$pkgdir"/usr/share/licenses/$pkgname
}
# vim: ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment