2015-05-27 04:46:14 +02:00
|
|
|
# Template file for 'dumb'
|
|
|
|
pkgname=dumb
|
|
|
|
version=1.0
|
2015-12-03 16:37:08 +01:00
|
|
|
revision=2
|
2015-05-28 09:22:15 +02:00
|
|
|
create_wrksrc=yes
|
|
|
|
wrksrc=sources
|
|
|
|
|
|
|
|
_library_wrksrc=${pkgname}-${version}/${pkgname}
|
|
|
|
_example_wrksrc=${pkgname}-0.9.3/examples
|
|
|
|
build_wrksrc=${_library_wrksrc}/cmake
|
|
|
|
|
2015-05-27 04:46:14 +02:00
|
|
|
build_style=cmake
|
|
|
|
configure_args="-DBUILD_SHARED_LIBS:BOOL=ON"
|
|
|
|
short_desc="IT, XM, S3M and MOD player library"
|
|
|
|
maintainer="beefcurtains <beefcurtains@users.noreply.github.com>"
|
|
|
|
license="BSD"
|
|
|
|
homepage="http://${pkgname}.sourceforge.net/"
|
2015-05-28 09:22:15 +02:00
|
|
|
distfiles="
|
|
|
|
https://github.com/kode54/${pkgname}/archive/${version}.tar.gz
|
|
|
|
${SOURCEFORGE_SITE}/${pkgname}/${pkgname}/0.9.3/${pkgname}-0.9.3.tar.gz
|
|
|
|
"
|
|
|
|
checksum="
|
|
|
|
09ea62fd01f6e71cb28a8a8c1c1e356e7eb38f5e003b684e12eb1944c6d35fa5
|
|
|
|
8d44fbc9e57f3bac9f761c3b12ce102d47d717f0dd846657fb988e0bb5d1ea33
|
|
|
|
"
|
2015-05-27 04:46:14 +02:00
|
|
|
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
i686*|x86_64*)
|
|
|
|
CFLAGS="-D_USE_SSE -msse"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2015-12-03 16:37:08 +01:00
|
|
|
pre_configure() {
|
|
|
|
sed -i ${wrksrc}/${_library_wrksrc}/cmake/CMakeLists.txt \
|
|
|
|
-e '/^set(CMAKE_C_FLAGS /s|-Wall|${CMAKE_C_FLAGS} -Wall|' \
|
2015-12-03 16:51:31 +01:00
|
|
|
-e '/^set(CMAKE_C_FLAGS /s| -D_USE_SSE -msse||' \
|
2015-12-03 16:37:08 +01:00
|
|
|
-e '/^add_library(dumb ${SOURCES})/a set_target_properties(dumb PROPERTIES VERSION 1.0)'
|
|
|
|
sed -i ${wrksrc}/${_example_wrksrc}/dumb2wav.c \
|
|
|
|
-e '/.*dumb_load_mod(fn/s|)|,0)|'
|
2015-05-28 09:22:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
post_build() {
|
|
|
|
( set -x
|
|
|
|
${CC} ${wrksrc}/${_example_wrksrc}/dumb2wav.c \
|
|
|
|
${CFLAGS} ${CPPFLAGS} -I../../include \
|
|
|
|
${LDFLAGS} -L. -ldumb -lm -o dumb2wav )
|
|
|
|
}
|
|
|
|
|
2015-05-27 04:46:14 +02:00
|
|
|
pre_install() {
|
2015-05-28 09:22:15 +02:00
|
|
|
vbin build/dumb2wav
|
2015-05-27 04:46:14 +02:00
|
|
|
vdoc ../readme.txt
|
|
|
|
vdoc ../release.txt
|
|
|
|
vlicense ../licence.txt
|
|
|
|
}
|
|
|
|
|
|
|
|
dumb-devel_package() {
|
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/*.so"
|
|
|
|
vmove usr/include
|
|
|
|
}
|
|
|
|
}
|