makedeb


gzdoom 4.6.1-1


Feature centric port for all Doom engine games

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for gzdoom.

# Maintainer: Tobias Zindl <zie.develop@gmail.com>
# Maintainer: Jan Cholasta <grubber at grubber cz>
# Contributor: Christoph Zeiler <rabyte*gmail>

pkgname=gzdoom
pkgver=4.6.1
pkgrel=1
pkgdesc='Feature centric port for all Doom engine games'
arch=('i686' 'x86_64')
url='http://www.zdoom.org/'
license=('BSD' 'GPL3' 'LGPL3')
depends=('libgtk-3-0'
         'hicolor-icon-theme'
         'libgl1'
         'libjpeg8'
         'libopenal1'
         'libsdl2-2.0-0'
         'zmusic>=1.1.8')
makedepends=('g++' 'make' 'cmake' 'libsdl2-dev' 'git' 'zlib1g-dev' 'libbz2-dev' 'libjpeg-dev' 'libfluidsynth-dev' 'libgme-dev' 'libopenal-dev' 'libmpg123-dev' 'libsndfile1-dev' 'libgtk-3-dev' 'timidity' 'nasm' 'libgl1-mesa-dev' 'tar' 'libsdl1.2-dev' 'libglew-dev')
source=("gzdoom::git://github.com/coelckers/gzdoom.git#tag=g${pkgver}"
        'gzdoom.desktop'
        '0001-Fix-file-paths.patch')
ptdepends=('blasphemer: Blasphemer (free Heretic) game data'
           'freedm: FreeDM game data'
           'freedoom: Freedoom: Phase 1 & Phase 2 game data'
        )
sha256sums=('SKIP'
            '59122e670f72aa2531aff370e7aaab2d886a7642e79e91f27a533d3b4cad4f6d'
            '9b6c37c6fc90080ceb4162673f23187210b083af7cd61294ece2711790eac186')

prepare() {
    cd gzdoom
    git submodule update --init
    patch -i "$srcdir"/0001-Fix-file-paths.patch -p 1
}

build() {
    cd gzdoom
    mkdir -p build
    cmake -B build \
          -D CMAKE_BUILD_TYPE=Release \
          -D CMAKE_CXX_FLAGS="${CXXFLAGS} -ffile-prefix-map=\"$PWD\"=. -DSHARE_DIR=\\\"/usr/share/gzdoom\\\"" \
          -D DYN_GTK=OFF \
          -D DYN_OPENAL=OFF
    make -C build
}

package() {
    cd gzdoom
    install build/gzdoom -t "$pkgdir"/usr/bin -D
    install build/{game_support,gzdoom}.pk3 -t "$pkgdir"/usr/lib/gzdoom -D -m 644
    desktop-file-install "$srcdir"/gzdoom.desktop --dir="$pkgdir"/usr/share/applications
    install docs/{console,rh-log,skins}.* -t "$pkgdir"/usr/share/doc/gzdoom -D -m 644
    install build/{brightmaps,game_widescreen_gfx,lights}.pk3 -t "$pkgdir"/usr/share/gzdoom -D -m 644
    install build/soundfonts/gzdoom.sf2 -t "$pkgdir"/usr/share/gzdoom/soundfonts -D -m 644
    install build/fm_banks/* -t "$pkgdir"/usr/share/gzdoom/fm_banks -D -m 644
    install src/posix/zdoom.xpm "$pkgdir"/usr/share/icons/hicolor/256x256/apps/gzdoom.xpm -D -m 644
    install docs/licenses/{bsd,fxaa,gdtoa,README}.* -t "$pkgdir"/usr/share/licenses/$pkgname -D -m 644
}