archrelease: copy trunk to community-any
[arch-community.git] / fceux / trunk / PKGBUILD
blob258e2ec99dcc176eed1a94753992e0b65560f82d
1 # Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2 # Contributor: Eric Belanger <eric@archlinux.org>
3 # Contributor: Jo Christian Bergskås <jcberg@gmail.com>
5 pkgname=fceux
6 pkgver=2.6.5
7 pkgrel=2
8 pkgdesc='Fast and ultra-compatible NES/Famicom emulator'
9 arch=(x86_64)
10 url='https://github.com/TASEmulators/fceux'
11 license=(GPL)
12 depends=(gd lua minizip qt5-base sdl2)
13 makedepends=(cmake git glu mesa-libgl ninja setconf scons)
14 optdepends=('ffmpeg: for recording')
15 source=("git+$url#commit=ea6ed69b874e3ae94072f1b4f14b9a8f0fdd774b") # tag: v2.6.5
16 b2sums=('SKIP')
18 prepare() {
19   cd $pkgname
20   sed -i 's/-interim git//g' src/version.h
21   setconf scripts/genGitHdr.sh GIT_URL "'""${source:4:34}""'"
22   setconf scripts/genGitHdr.sh GIT_REV "${source#*=}"
25 build() {
26   cmake \
27     -B build \
28     -D CMAKE_C_FLAGS="$CFLAGS -fPIC -w" \
29     -D CMAKE_CXX_FLAGS="$CXXFLAGS -fPIC -w" \
30     -D CMAKE_INSTALL_PREFIX=/usr \
31     -G Ninja \
32     -S $pkgname
33   ninja -C build
36 package() {
37   DESTDIR="$pkgdir" ninja -C build install
38   install -d "$pkgdir/usr/share/doc/$pkgname"
39   cp -r $pkgname/documentation/* "$pkgdir/usr/share/doc/$pkgname/"
40   install -Dm644 $pkgname/changelog.txt \
41     "$pkgdir/usr/share/doc/$pkgname/changelog.txt"