diff --git extras/package/macosx/package.mak extras/package/macosx/package.mak
index 40e4fe5..0f381dd 100644
--- extras/package/macosx/package.mak
+++ extras/package/macosx/package.mak
@@ -26,10 +26,10 @@ VLC.app: VLC-tmp
+ rm -Rf "$(top_builddir)/tmp" "$@"
$(AM_V_GEN)for i in src lib share; do \
- (cd $$i && $(MAKE) $(AM_MAKEFLAGS) install $(silentstd)); \
+ (cd $$i && $(MAKE) $(AM_MAKEFLAGS) install $(silentstd) DESTDIR=$(abs_top_builddir)/tmp/destdir); \
- rm -Rf "$(top_builddir)/tmp" "$@"
mkdir -p "$(top_builddir)/tmp/extras/package/macosx"
cd $(srcdir)/extras/package/macosx; cp -R Resources README.MacOSX.rtf $(abs_top_builddir)/tmp/extras/package/macosx/
mkdir -p $(abs_top_builddir)/tmp/extras/package/macosx/vlc.xcodeproj/
@@ -49,7 +49,7 @@ VLC-tmp: vlc
cp -R $(top_builddir)/tmp/build/Default/VLC.bundle $@
mkdir -p $@/Contents/Frameworks && cp -R $(CONTRIB_DIR)/Growl.framework $@/Contents/Frameworks/
mkdir -p $@/Contents/MacOS/share/locale/
- cp -r "$(prefix)/lib/vlc/lua" "$(prefix)/share/vlc/lua" $@/Contents/MacOS/share/
+ cp -r "$(top_builddir)/tmp/destdir$(prefix)/lib/vlc/lua" "$(top_builddir)/tmp/destdir$(prefix)/share/vlc/lua" $@/Contents/MacOS/share/
mkdir -p $@/Contents/MacOS/include/
(cd "$(prefix)/include" && $(AMTAR) -c --exclude "plugins" vlc) | $(AMTAR) -x -C $@/Contents/MacOS/include/
$(INSTALL) -m 644 $(srcdir)/share/vlc512x512.png $@/Contents/MacOS/share/vlc512x512.png