diff --git a/srcpkgs/klystrack/template b/srcpkgs/klystrack/template new file mode 100644 index 00000000000..38ffacaa1f6 --- /dev/null +++ b/srcpkgs/klystrack/template @@ -0,0 +1,48 @@ +# Template file for 'klystrack' +pkgname=klystrack +version=1.7.0 +revision=1 +_klystronsha=4bbadbda271da642b87b2d83cd44742f36c27da0 +wrksrc=klystrack-${version}-final +create_wrksrc=yes +hostmakedepends="SDL2-devel" +makedepends="SDL2_image-devel SDL2_mixer-devel" +short_desc="Chiptune music tracker" +maintainer="allan " +license="BSD" +homepage="http://kometbomb.github.io/klystrack/" +distfiles="https://github.com/kometbomb/klystrack/archive/${version}-final.tar.gz + https://github.com/kometbomb/klystron/archive/${_klystronsha}.tar.gz" +checksum="cc8fd6a8ee84974ee1ee576342901a0e63f311848495ae0ba504305a5ccdfb97 + 8f957d1250fa36d343d3eecd6585c5890342b0a1b3d8ecaec22217e95d1dbf96" + +do_build() { + test -d klystron || + mv klystron-${_klystronsha} klystron + cd klystrack-${version}-final + + sed -i \ + -e 's/\r$//' \ + -e "/^CFLAGS/s,\$, ${CFLAGS}," \ + -e "/^LDFLAGS/s:\$: ${LDFLAGS}:" \ + -e 's/^CC := gcc/CC := $(CC)/' \ + -e '36s/$/ -lSDL2_mixer/' \ + Makefile + sed -i \ + -e 's/\r$//' \ + -e 's/^CC = gcc/CC = $(CC)/' \ + ../klystron/Makefile + + make CC=$CC $makejobs CFG=release +} + +do_install() { + cd klystrack-${version}-final + vbin bin.release/klystrack + vmkdir usr/lib/klystrack + vcopy res usr/lib/klystrack + vcopy key usr/lib/klystrack + vmkdir usr/share/examples/klystrack + vcopy examples usr/share/examples/klystrack + vlicense linux/copyright +}