diff options
author | Benjamin Drung <bdrung@ubuntu.com> | 2009-12-02 23:16:01 +0100 |
---|---|---|
committer | Benjamin Drung <bdrung@ubuntu.com> | 2009-12-02 23:16:01 +0100 |
commit | 1b00495bcee19050cb2fcc1e5a62959b3fdda4af (patch) | |
tree | cc02292efa9a98c1304b9ff86501f637065c4b10 /src/xpi.mk | |
parent | c7a8e554a65537c2766db569456b089c18a36389 (diff) |
- correct permissions of installed files and add
MOZ_XPI_PRESERVE_PERMISSIONS to disable this behaviour (Closes: #556741)
- update src/xpi.mk
Diffstat (limited to 'src/xpi.mk')
-rw-r--r-- | src/xpi.mk | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -66,6 +66,12 @@ # stripped prefixes is used. This value is used to determine # xpi:Provides. # +# MOZ_XPI_PRESERVE_PERMISSIONS (OPTIONAL): +# if defined (set to 1), the permission of the installed files +# will not be changed. If not defined or set to $(null), the +# permission of the files will be set to 644 and the permissions +# of scripts (files containing a shebang) will be set to 755. +# # Deprecated variables: # # MOZ_XPI_MOZILLA_DIRS /deprecated/ (OPTIONAL/NODEFAULT - see "Note:"): @@ -184,6 +190,10 @@ ifeq ($(origin MOZ_XPI_DOCUMENTED_LICENSE_FILES),undefined) cd $(install_dir) && find \( -iname copying -o -iname gpl.txt -o -iname licen[cs]e -o -iname licen[cs]e.txt \) -printf "xpi.mk: deleted %p\n" -delete endif endif +ifeq (,$(MOZ_XPI_PRESERVE_PERMISSIONS)) + find $(install_dir) -type d -exec chmod 755 {} \; + cd $(install_dir) && find * -type f | while read fn; do head -n1 "$$fn" | grep -q "^\#\!" && echo "xpi.mk: Made $$fn executable." && chmod 755 "$$fn" || chmod 644 "$$fn"; done +endif touch $@ installlinks-%-stamp: $(patsubst %,install-%-stamp,$(XPI_BASE_FILE)) |