### this file is sourced not run
PKGVER=1.4.23
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=mhwaveedit-$PKGVER.tar.bz2
MD5SUM=72d12ebdd38777ba597db0cf6158ceef
#SRC_URL=http://download.gna.org/mhwaveedit/$TARBALL	# it's dead
SRC_URL=http://http.debian.net/debian/pool/main/m/mhwaveedit/mhwaveedit_1.4.23.orig.tar.bz2
BUNDLE=

SLACKREQ='gtk2 alsa-lib libjack2 libsndfile libsamplerate ffmpeg'
SLACKDESC="mhwaveedit: mhwaveedit $PKGVER (Sound editor)  
mhwaveedit:  
mhwaveedit: mhWaveEdit is a graphical program for editing, playing and 
mhwaveedit: recording sound files. It is lightweight, portable, user-friendly 
mhwaveedit: and handles large files very well.  
mhwaveedit: 
mhwaveedit: 
mhwaveedit: 
mhwaveedit: 
mhwaveedit: 
mhwaveedit: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cp tmp/pkg/ladspa.h usr/include &&
	cd tmp/mhwaveedit* &&
	patch -Np1 -i ../pkg/mhwaveedit-ffmpeg.patch &&
	patch -Np1 -i ../pkg/mhwaveedit-mark-font.patch
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/mhwaveedit*
	./configure $CONFFLAGS \
	--without-portaudio --without-sdl --without-check-casts \
	--with-default-ladspa-path=/usr/$LIBDIR/ladspa:/usr/local/lib/ladspa \
	--with-default-mixerapp="defaultterm -e alsamixer" &&
	make $MAKEFLAGS && make install &&
	rm -f /usr/include/ladspa.h &&
	pkg_build_slackdesc &&
	
	# add rox mime handlers
	while read -r p; do 
		p=/etc/xdg/rox.sourceforge.net/SendTo/$p
		mkdir -p $p
		ln -sf /usr/share/applications/mhwaveedit.desktop $p/mhwaveedit
	done << "EOF"
.audio_basic
.audio_mpeg
.audio_x-aiff
.audio_x-it
.audio_x-mod
.audio_x-mp3
.audio_x-ms-wma
.audio_x-pn-realaudio
.audio_x-s3m
.audio_x-ulaw
.audio_x-wav
.audio_x-xm
.application_x-flash-video
.video_asf
.video_mp4
.video_mpeg
.video_quicktime
.video_x-ms-asf
.video_x-msvideo
.video_x-ms-wmv
.video_x-theora+ogg
EOF
}


