--- Makefile.in.orig	2008-06-19 22:39:08.000000000 +0200
+++ Makefile.in	2008-06-19 22:53:47.000000000 +0200
@@ -34,40 +34,40 @@
 	$(MAKE) -C src
 
 uadecoreinstall:	$(UADECORE)
-	mkdir -p "$(LIBDIR)" "$(PKGCONFIGDIR)"
-	chmod og+rx "$(LIBDIR)"
-	cp -f src/$(UADECORENAME) "$(LIBDIR)"/
-	chmod og+rx "$(LIBDIR)/$(UADECORENAME)"
-	install uade.pc $(PKGCONFIGDIR)/
-	chmod og+rx $(PKGCONFIGDIR)
-	chmod 644 $(PKGCONFIGDIR)/uade.pc
+	mkdir -p "$(DESTDIR)$(LIBDIR)" "$(DESTDIR)$(PKGCONFIGDIR)"
+	chmod og+rx "$(DESTDIR)$(LIBDIR)"
+	cp -f src/$(UADECORENAME) "$(DESTDIR)$(LIBDIR)"/
+	chmod og+rx "$(DESTDIR)$(LIBDIR)/$(UADECORENAME)"
+	install uade.pc $(DESTDIR)$(PKGCONFIGDIR)/
+	chmod og+rx $(DESTDIR)$(PKGCONFIGDIR)
+	chmod 644 $(DESTDIR)$(PKGCONFIGDIR)/uade.pc
 
 uade123:	
 	$(MAKE) -C src/frontends/uade123
 
 uade123install:	$(UADE123)
-	mkdir -p "$(BINDIR)" "$(MANDIR)"
-	rm -f "$(BINDIR)/$(UADE123NAME)" || true
-	cp -f src/frontends/uade123/$(UADE123NAME) "$(BINDIR)/" || true
-	chmod og+rx "$(BINDIR)/$(UADE123NAME)"
-	cp doc/uade123.1 "$(MANDIR)"/
-	chmod og+r "$(MANDIR)"/uade123.1
+	mkdir -p "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(MANDIR)"
+	rm -f "$(DESTDIR)$(BINDIR)/$(UADE123NAME)" || true
+	cp -f src/frontends/uade123/$(UADE123NAME) "$(DESTDIR)$(BINDIR)/" || true
+	chmod og+rx "$(DESTDIR)$(BINDIR)/$(UADE123NAME)"
+	cp doc/uade123.1 "$(DESTDIR)$(MANDIR)"/
+	chmod og+r "$(DESTDIR)$(MANDIR)"/uade123.1
 
 xmmsplugin:	
 	$(MAKE) -C src/frontends/xmms
 
 xmmsplugininstall:	$(XMMSPLUGIN)
-	mkdir -p "$(XMMSPLUGINDIR)" "$(BINDIR)"
-	install src/frontends/xmms/libuade2.so "$(XMMSPLUGINDIR)"
-	install contrib/uadexmmsadd "$(BINDIR)"/
+	mkdir -p "$(DESTDIR)$(XMMSPLUGINDIR)" "$(DESTDIR)$(BINDIR)"
+	install src/frontends/xmms/libuade2.so "$(DESTDIR)$(XMMSPLUGINDIR)"
+	install contrib/uadexmmsadd "$(DESTDIR)$(BINDIR)"/
 
 audaciousplugin:	
 	$(MAKE) -C src/frontends/audacious
 
 audaciousplugininstall:	$(AUDACIOUSPLUGIN)
-	mkdir -p "$(AUDACIOUSPLUGINDIR)" "$(BINDIR)"
-	install src/frontends/audacious/libuade2.so "$(AUDACIOUSPLUGINDIR)"
-	install contrib/uadexmmsadd "$(BINDIR)"/
+	mkdir -p "$(DESTDIR)$(AUDACIOUSPLUGINDIR)" "$(DESTDIR)$(BINDIR)"
+	install src/frontends/audacious/libuade2.so "$(DESTDIR)$(AUDACIOUSPLUGINDIR)"
+	install contrib/uadexmmsadd "$(DESTDIR)$(BINDIR)"/
 
 src/include/uadeconfig.h:	
 	@echo ""
@@ -82,14 +82,14 @@
 	src/frontends/uade123/$(UADE123NAME) --basedir=. -S amigasrc/score/score -P players/AbyssHighestExperience -m songs/AHX.Cruisin -u src/uadecore
 
 install:	
-	mkdir -p "$(DATADIR)/players"
-	test -e "$(DATADIR)/uade.conf" || cp -f uade.conf "$(DATADIR)/"
-	cp -f amigasrc/score/score uaerc eagleplayer.conf "$(DATADIR)/"
-	cp -rf players "$(DATADIR)/" || true
-	chmod -R og+rX "$(DATADIR)"
+	mkdir -p "$(DESTDIR)$(DATADIR)/players"
+	test -e "$(DESTDIR)$(DATADIR)/uade.conf" || cp -f uade.conf "$(DESTDIR)$(DATADIR)/"
+	cp -f amigasrc/score/score uaerc eagleplayer.conf "$(DESTDIR)$(DATADIR)/"
+	cp -rf players "$(DESTDIR)$(DATADIR)/" || true
+	chmod -R og+rX "$(DESTDIR)$(DATADIR)"
 	$(MAKE) installagain
 	$(MAKE) feinstall
-	install src/frontends/mod2ogg/mod2ogg2.sh "$(BINDIR)/"
+	install src/frontends/mod2ogg/mod2ogg2.sh "$(DESTDIR)$(BINDIR)/"
 
 installagain:	$(UADECOREINSTALL)
 	@true
