Commit 8dd09b21 authored by Rafaël Carré's avatar Rafaël Carré

cleanup packaging rules

add phony targets
do not clean files/directories automatically
remove useless comments/messages
use a timestamp to not run make install each time a win32 package is created
parent 66971620
...@@ -654,14 +654,6 @@ VLC.app: vlc $(top_builddir)/src/.libs/libvlccore.dylib $(top_builddir)/lib/.lib ...@@ -654,14 +654,6 @@ VLC.app: vlc $(top_builddir)/src/.libs/libvlccore.dylib $(top_builddir)/lib/.lib
done done
printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
###############################################################################
# Building architecture-specific binary packages
###############################################################################
# XXX: this rule is probably only useful to you if you have exactly
# the same setup as the maintaner(s).
#
############################################################################ ############################################################################
## Win ## ## Win ##
############################################################################ ############################################################################
...@@ -679,19 +671,14 @@ include extras/package/npapi.am ...@@ -679,19 +671,14 @@ include extras/package/npapi.am
endif endif
endif endif
package-win-install:
$(MAKE) install
touch $@
#Win-common is for win32 and wince #Win-common is for win32 and wince
package-win-common: install build-npapi package-win-common: package-win-install build-npapi
# Check that tmp isn't in the way mkdir -p "$(win32_debugdir)"
@if test -e "$(win32_destdir)"; then \ mkdir -p "$(win32_destdir)"
echo "Error: please remove $(win32_destdir), it is in the way"; \
false; \
elif test -e "$(win32_debugdir)"; then \
echo "Error: please remove $(win32_debugdir), it is in the way"; \
false; \
else \
echo "Debug dir OK."; mkdir -p "$(win32_debugdir)"; \
echo "Dest dir OK."; mkdir -p "$(win32_destdir)"; \
fi
# Executables, major libs+manifests # Executables, major libs+manifests
find $(destdir) -maxdepth 4 \( -name "*$(LIBEXT)" -o -name "*$(EXEEXT)" \) -exec cp {} "$(win32_destdir)/" \; find $(destdir) -maxdepth 4 \( -name "*$(LIBEXT)" -o -name "*$(EXEEXT)" \) -exec cp {} "$(win32_destdir)/" \;
...@@ -709,7 +696,7 @@ package-win-common: install build-npapi ...@@ -709,7 +696,7 @@ package-win-common: install build-npapi
cp $(srcdir)/share/icons/vlc.ico $(win32_destdir) cp $(srcdir)/share/icons/vlc.ico $(win32_destdir)
# Locales # Locales
-cp -r $(destdir)/share/locale $(win32_destdir) cp -r $(destdir)/share/locale $(win32_destdir)
# Plugins # Plugins
cp -r $(destdir)/lib/vlc/plugins $(win32_destdir) cp -r $(destdir)/lib/vlc/plugins $(win32_destdir)
...@@ -770,7 +757,7 @@ endif ...@@ -770,7 +757,7 @@ endif
find $(win32_destdir) -type f \( -name '*$(LIBEXT)' -print -o -name '*$(EXEEXT)' -print \) -exec $(top_srcdir)/extras/package/win32/peflags.pl {} \; find $(win32_destdir) -type f \( -name '*$(LIBEXT)' -print -o -name '*$(EXEEXT)' -print \) -exec $(top_srcdir)/extras/package/win32/peflags.pl {} \;
find $(win32_destdir)/plugins/ -type f \( -name '*.a' -or -name '*.la' \) -exec rm -rvf {} \; find $(win32_destdir)/plugins/ -type f \( -name '*.a' -or -name '*.la' \) -exec rm -rvf {} \;
package-win-base: package-win-common package-win-strip: package-win-common
find $(win32_destdir) -type f \( -name '*$(LIBEXT)' -or -name '*$(EXEEXT)' \) | while read i; \ find $(win32_destdir) -type f \( -name '*$(LIBEXT)' -or -name '*$(EXEEXT)' \) | while read i; \
do if test -n "$$i" ; then \ do if test -n "$$i" ; then \
$(OBJCOPY) --only-keep-debug "$$i" "$$i.dbg"; \ $(OBJCOPY) --only-keep-debug "$$i" "$$i.dbg"; \
...@@ -780,7 +767,7 @@ package-win-base: package-win-common ...@@ -780,7 +767,7 @@ package-win-base: package-win-common
fi ; \ fi ; \
done done
package-win32-webplugin-common: package-win-base package-win32-webplugin-common: package-win-strip
mkdir -p "$(win32_xpi_destdir)/plugins" mkdir -p "$(win32_xpi_destdir)/plugins"
find $(destdir) -maxdepth 4 -name "*$(LIBEXT)" -exec cp {} "$(win32_xpi_destdir)/" \; find $(destdir) -maxdepth 4 -name "*$(LIBEXT)" -exec cp {} "$(win32_xpi_destdir)/" \;
cp $(top_builddir)/npapi-vlc/npapi/npvlc.dll.manifest "$(win32_xpi_destdir)/plugins" cp $(top_builddir)/npapi-vlc/npapi/npvlc.dll.manifest "$(win32_xpi_destdir)/plugins"
...@@ -798,7 +785,7 @@ package-win32-crx: package-win32-webplugin-common ...@@ -798,7 +785,7 @@ package-win32-crx: package-win32-webplugin-common
crxmake --pack-extension "$(win32_xpi_destdir)" \ crxmake --pack-extension "$(win32_xpi_destdir)" \
--extension-output "$(win32_destdir)/vlc-$(VERSION).crx" --ignore-file install.rdf --extension-output "$(win32_destdir)/vlc-$(VERSION).crx" --ignore-file install.rdf
package-win32-base-exe: package-win-base package-win32-exe: package-win-strip
# Script installer # Script installer
cp "$(top_builddir)/extras/package/win32/vlc.win32.nsi" "$(win32_destdir)/" cp "$(top_builddir)/extras/package/win32/vlc.win32.nsi" "$(win32_destdir)/"
cp "$(top_builddir)/extras/package/win32/spad.nsi" "$(win32_destdir)/" cp "$(top_builddir)/extras/package/win32/spad.nsi" "$(win32_destdir)/"
...@@ -824,131 +811,65 @@ package-win32-base-exe: package-win-base ...@@ -824,131 +811,65 @@ package-win32-base-exe: package-win-base
eval "$$MAKENSIS $(win32_destdir)/spad.nsi"; \ eval "$$MAKENSIS $(win32_destdir)/spad.nsi"; \
eval "$$MAKENSIS $(win32_destdir)/vlc.win32.nsi" eval "$$MAKENSIS $(win32_destdir)/vlc.win32.nsi"
package-win32-base-zip: package-win-base package-win32-zip: package-win-strip
# Create package
rm -f -- vlc-$(VERSION)-win32.zip rm -f -- vlc-$(VERSION)-win32.zip
zip -r -9 vlc-$(VERSION)-win32.zip vlc-$(VERSION) zip -r -9 vlc-$(VERSION)-win32.zip vlc-$(VERSION)
package-win32-base-debug-zip: package-win-common package-win32-debug-zip: package-win-common
# Create package
rm -f -- vlc-$(VERSION)-win32-debug.zip rm -f -- vlc-$(VERSION)-win32-debug.zip
zip -r -9 vlc-$(VERSION)-win32-debug.zip vlc-$(VERSION) zip -r -9 vlc-$(VERSION)-win32-debug.zip vlc-$(VERSION)
package-win32-base-7zip: package-win-base package-win32-7zip: package-win-strip
# Create package
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32.7z vlc-$(VERSION) 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32.7z vlc-$(VERSION)
package-win32-base-debug-7zip: package-win-common package-win32-debug-7zip: package-win-common
# Create package
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32-debug.7z vlc-$(VERSION) 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32-debug.7z vlc-$(VERSION)
package-win32-cleanup: package-win32-cleanup:
rm -Rf $(win32_destdir) $(win32_debugdir) rm -Rf $(win32_destdir) $(win32_debugdir)
package-win32-exe: package-win-base package-win32-base-exe package-win32-cleanup package-win32: package-win32-zip package-win32-7zip package-win32-exe package-win32-xpi
package-win32-zip: package-win32-base-zip package-win32-cleanup
package-win32-debug-zip: package-win32-base-debug-zip package-win32-cleanup
package-win32-7zip: package-win32-base-7zip package-win32-cleanup
package-win32-debug-7zip: package-win32-base-debug-7zip package-win32-cleanup package-win32-debug: package-win32-debug-zip package-win32-debug-7zip
package-win32-no-clean: package-win32-base-zip package-win32-base-7zip package-win32-base-exe package-win32-xpi
package-win32: package-win32-no-clean package-win32-cleanup
package-win32-debug: package-win32-base-debug-zip package-win32-base-debug-7zip package-win32-cleanup
####### #######
# WinCE # WinCE
####### #######
package-wince-base: package-win-base package-wince: package-win-strip
package-wince-base-zip: package-wince-base
# Create package
rm -f -- vlc-$(VERSION)-wince.zip rm -f -- vlc-$(VERSION)-wince.zip
zip -r -9 vlc-$(VERSION)-wince.zip vlc-$(VERSION) zip -r -9 vlc-$(VERSION)-wince.zip vlc-$(VERSION)
package-wince: package-wince-base-zip package-win32-cleanup .PHONY: package-win-install package-win-common package-win-strip package-win32-webplugin-common package-win32-xpi package-win32-crx package-win32-exe package-win32-zip package-win32-debug-zip package-win32-7zip package-win32-debug-7zip package-win32-cleanup package-win32 package-win32-debug package-wince
######################################################################### #########################################################################
## MacOS X ## ## MacOS X ##
######################################################################### #########################################################################
package-macosx: VLC-release.app ChangeLog package-macosx: VLC-release.app ChangeLog
# Check that the temporary location isn't in the way mkdir -p "$(top_builddir)/vlc-$(VERSION)/"
@if test -e "$(top_builddir)/vlc-$(VERSION)/"; then \
rm -Rf "$(top_builddir)/vlc-$(VERSION)/" ; \
fi
echo "Create package directory: vlc-$(VERSION)/";
mkdir -p "$(top_builddir)/vlc-$(VERSION)/";
# Copy relevant files
@if test -e "$(top_builddir)/VLC-release.app/"; then \ @if test -e "$(top_builddir)/VLC-release.app/"; then \
cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \ cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \
else \ else \
cp -R "$(top_builddir)/VLC.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \ cp -R "$(top_builddir)/VLC.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \
fi fi
mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies/ && \ mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies/
mkdir -p $(top_builddir)/vlc-$(VERSION)/.background/ && \ for i in AUTHORS COPYING README THANKS NEWS; do \
cp $(srcdir)/AUTHORS $(srcdir)/COPYING $(srcdir)/README $(srcdir)/THANKS $(srcdir)/NEWS $(top_builddir)/vlc-$(VERSION)/Goodies/ && \ cp $(srcdir)/$$i $(top_builddir)/vlckit-$(VERSION)/Goodies/; \
cp -R $(srcdir)/extras/package/macosx/Delete_Preferences.app $(top_builddir)/vlc-$(VERSION)/Goodies/Delete\ VLC\ Preferences.app && \ done
cp $(srcdir)/extras/package/macosx/README.MacOSX.rtf $(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf && \ cp $(top_builddir)/ChangeLog $(top_builddir)/vlc-$(VERSION)/Goodies/
cp -R $(srcdir)/extras/package/macosx/Delete_Preferences.app $(top_builddir)/vlc-$(VERSION)/Goodies/Delete\ VLC\ Preferences.app
cp $(srcdir)/extras/package/macosx/README.MacOSX.rtf $(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf
mkdir -p $(top_builddir)/vlc-$(VERSION)/.background/
cp $(srcdir)/extras/package/macosx/Resources/about_bg.png $(top_builddir)/vlc-$(VERSION)/.background/background.png cp $(srcdir)/extras/package/macosx/Resources/about_bg.png $(top_builddir)/vlc-$(VERSION)/.background/background.png
cp -L $(top_builddir)/ChangeLog $(top_builddir)/vlc-$(VERSION)/Goodies/ $(LN_S) /Applications $(top_builddir)/vlc-$(VERSION)/
rm -f "$(top_builddir)/vlc-$(VERSION)-rw.dmg"
# Place a link to the application folder hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" "$(top_builddir)/vlc-$(VERSION)-rw.dmg" -scrub
$(LN_S) /Applications $(top_builddir)/vlc-$(VERSION)/Applications
# Create disk image (temporarily taken from the 0.8.6-bugfix branch to provide reliable NBs)
echo "Creating disk image"
rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" \
"$(top_builddir)/vlc-$(VERSION).dmg" -scrub
echo "Disk image creation completed:"
ls -la "$(top_builddir)/vlc-$(VERSION).dmg" ; echo
# Create disk image
# echo "Creating disk image"
# rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
# hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" \
# "$(top_builddir)/vlc-$(VERSION).dmg" -format UDRW \
# -scrub -imagekey zlib-level=9 -attach
# Make sure the root window of the dmg will pop up when the dmg is mounted.
# Note: We dont mount in /Volumes to be sure we won't collide with an other
# finder mounted dmg with the same name.
# echo "Make sure the root window of the dmg will pop up when the dmg is mounted"
# mkdir -p $(top_builddir)/vlcmnt
# hdiutil attach -nokernel -readwrite -noverify -noautoopen -private "$(top_builddir)/vlc-$(VERSION).dmg" -mountpoint "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
# bless --folder "$(top_builddir)/vlcmnt/vlc-$(VERSION)/" --openfolder "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
# sleep 1 # Make sure operation completes
# cd "$(srcdir)"
# Unmount the image now
# hdiutil detach "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
# rm -R $(top_builddir)/vlcmnt
# Make sure the image is not writable # Make sure the image is not writable
# Note: We can't directly create a read only dmg as we do the bless stuff # Note: We can't directly create a read only dmg as we do the bless stuff
echo "Make the disk image read-only"
mv "$(top_builddir)/vlc-$(VERSION).dmg" "$(top_builddir)/vlc-$(VERSION)-rw.dmg"
hdiutil convert "$(top_builddir)/vlc-$(VERSION)-rw.dmg" -format UDBZ -o "$(top_builddir)/vlc-$(VERSION).dmg" hdiutil convert "$(top_builddir)/vlc-$(VERSION)-rw.dmg" -format UDBZ -o "$(top_builddir)/vlc-$(VERSION).dmg"
rm "$(top_builddir)/vlc-$(VERSION)-rw.dmg" ls -l "$(top_builddir)/vlc-$(VERSION).dmg"
# We are done
echo "Disk image creation completed:"
ls -la "$(top_builddir)/vlc-$(VERSION).dmg" ; echo
# Clean up
rm -Rf "$(top_builddir)/vlc-$(VERSION)"
package-macosx-zip: VLC-release.app package-macosx-zip: VLC-release.app
rm -Rf $(top_builddir)/vlc-$(VERSION)
mkdir -p $(top_builddir)/vlc-$(VERSION) mkdir -p $(top_builddir)/vlc-$(VERSION)
cp -R $(top_builddir)/VLC-release.app $(top_builddir)/vlc-$(VERSION)/VLC.app cp -R $(top_builddir)/VLC-release.app $(top_builddir)/vlc-$(VERSION)/VLC.app
mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies
...@@ -960,28 +881,18 @@ package-macosx-zip: VLC-release.app ...@@ -960,28 +881,18 @@ package-macosx-zip: VLC-release.app
cp $(srcdir)/extras/package/macosx/README.MacOSX.rtf \ cp $(srcdir)/extras/package/macosx/README.MacOSX.rtf \
$(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf $(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf
zip -r -y -9 $(top_builddir)/vlc-$(VERSION).zip $(top_builddir)/vlc-$(VERSION) zip -r -y -9 $(top_builddir)/vlc-$(VERSION).zip $(top_builddir)/vlc-$(VERSION)
rm -Rf $(top_builddir)/vlc-$(VERSION)
package-macosx-framework-zip: package-macosx-framework-zip:
rm -Rf $(top_builddir)/vlckit-$(VERSION)
mkdir -p $(top_builddir)/vlckit-$(VERSION) mkdir -p $(top_builddir)/vlckit-$(VERSION)
cp -R $(srcdir)/projects/macosx/framework/build/Debug/VLCKit.framework \ cp -R $(srcdir)/projects/macosx/framework/build/Debug/VLCKit.framework $(top_builddir)/vlckit-$(VERSION)/
$(top_builddir)/vlckit-$(VERSION)/VLCKit.framework
mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies
for i in AUTHORS COPYING ChangeLog README THANKS NEWS; do \ for i in AUTHORS COPYING ChangeLog README THANKS NEWS; do \
cp $(srcdir)/$$i $(top_builddir)/vlckit-$(VERSION)/Goodies; \ cp $(srcdir)/$$i $(top_builddir)/vlckit-$(VERSION)/Goodies; \
done done
zip -r -y -9 $(top_builddir)/vlckit-$(VERSION).zip $(top_builddir)/vlckit-$(VERSION) zip -r -y -9 $(top_builddir)/vlckit-$(VERSION).zip $(top_builddir)/vlckit-$(VERSION)
rm -Rf $(top_builddir)/vlc-$(VERSION)
package-translations: package-translations:
@if test -e "$(srcdir)/vlc-translations-$(VERSION)"; then \ mkdir -p "$(srcdir)/vlc-translations-$(VERSION)"
echo "Error: please remove $(srcdir)/vlc-translations-$(VERSION), it is in the way"; \
false; \
else \
echo "OK."; mkdir -p "$(srcdir)/vlc-translations-$(VERSION)"; \
fi
# Copy translations
cat $(top_srcdir)/po/LINGUAS | while read i; do \ cat $(top_srcdir)/po/LINGUAS | while read i; do \
cp "$(srcdir)/po/$${i}.po" \ cp "$(srcdir)/po/$${i}.po" \
"$(srcdir)/vlc-translations-$(VERSION)/$${i}.po" \ "$(srcdir)/vlc-translations-$(VERSION)/$${i}.po" \
...@@ -1002,6 +913,7 @@ package-translations: ...@@ -1002,6 +913,7 @@ package-translations:
$(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \ $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
| GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
.PHONY: package-macosx package-macosx-zip package-macosx-framework-zip package-translations
############################################################################### ###############################################################################
# PO translation files update # PO translation files update
############################################################################### ###############################################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment