Template
1
0
Fork 0
mirror of https://aur.archlinux.org/ocp-git.git synced 2024-12-26 22:16:55 -05:00
ocp-git/PKGBUILD
Ossi Saukko 9967d9fa24 Update to 0.2.1.r380.1c5c7b1
The Open Cubic Player has replaced the libsidplay with the local fork of
libsidplayfp. Therefore, libsidplay is not optional dependency anymore,
but we do have two new make depends needed to build the Open Cubic
Player. The new configuration file seems to support GCC up to version
10, and therefore we do not need the patching for configure script
anymore.
2020-02-27 16:22:17 +02:00

55 lines
1.6 KiB
Bash

# Maintainer: Ossi Saukko <osaukko at gmail dot com>
_name=ocp
pkgname=ocp-git
pkgver=0.2.1.r380.1c5c7b1
pkgrel=1
pkgdesc="Open Cubic Player (GIT Version)"
arch=('i686' 'x86_64')
url="http://stian.cubic.org/project-ocp.php"
license=('GPL')
depends=('hicolor-icon-theme'
'libxpm'
'libxxf86vm')
optdepends=('adplug: for OPL formats support'
'alsa-lib: for ALSA output'
'flac: for FLAC audio support'
'libmad: for MPEG audio support'
'libvorbis: for Vorbis audio support'
'sdl: for SDL user interface support'
'sdl2: for SDL2 user interface support')
makedepends=('git'
'libsidplayfp'
'xa')
provides=("${_name}=${pkgver}")
conflicts=("${_name}")
install=$pkgname.install
source=("${_name}::git://github.com/mywave82/opencubicplayer.git")
md5sums=('SKIP')
pkgver() {
cd "${srcdir}/${_name}"
printf "%s.r%s.%s" "$(grep \^AC_INIT configure.ac|cut -d, -f2|xargs)" \
"$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "${srcdir}/${_name}"
git submodule init
git submodule update
# If both SDL and SDL2 are installed, then disable SDL.
# Otherwise there are functions with similar names and linking fails.
CONFIG="--prefix=/usr --sysconfdir=/etc --with-timidity-default-path=/etc/timidity++/"
if [ -f /usr/include/SDL/SDL.h ] && [ -f /usr/include/SDL2/SDL.h ]
then
CONFIG="${CONFIG} --without-sdl"
fi
./configure ${CONFIG}
make
}
package() {
cd "${srcdir}/${_name}"
make DESTDIR="${pkgdir}" install
}