#!/usr/bin/make -f
# debian/rules for the VideoLAN Client - uses debhelper.
# based on Joey Hess's one.
# Kludged for ipkg

# Compilation options
export CC=arm-linux-gcc
export LD=arm-linux-ld
export STRIP=arm-linux-strip
export CONFIG_FLAGS="--enable-release --prefix=/usr --disable-gtk --enable-fb --enable-sdl --disable-xvideo --disable-plugins --with-tuning=strongarm1100 --x-includes=/skiff/local/arm-linux/include --x-libraries=/skiff/local/arm-linux/lib/X11 --with-sdl-config-path=/skiff/local/bin --with-mad=/skiff/local/arm-linux"
export VIDDIR="usr/share/videolan"
export PIXDIR="usr/share/pixmaps"
export DESTDIR=/tmp/vlc
export DESTDIR=/usr/local/arm/2.95.3/arm-linux
export PKGDIR=/home/jpsaman/iPaq/packages/vlc-0.5.0

build: build-stamp
build-stamp:
	./configure --mandir=$${prefix}/share/man \
		--infodir=$${prefix}/share/info \
		$(shell echo $(CONFIG_FLAGS))

# This is ugly -- I know
	patch -p 0 < ipkg/patch

	$(MAKE)

	touch build-stamp

clean:
	rm -f build-stamp

	-$(MAKE) distclean

install: build
	mkdir -p $(PKGDIR)/usr/bin
	$(STRIP) vlc
	cp vlc $(PKGDIR)/usr/bin

install-plugins: install
	cp plugins/*.so ${PKGDIR}/usr/lib/videolan/vlc
	$(STRIP) ${PKGDIR}/usr/lib/videolan/vlc

.PHONY: build clean install