[Pkg-mozext-commits] [requestpolicy] 60/280: add a "sign" target to the Makefile
David Prévot
taffit at moszumanska.debian.org
Sat May 2 20:29:59 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 54dedeca65cd9a747853a2f55a47f1322b16dd2a
Author: Martin Kimmerle <dev at 256k.de>
Date: Sat Dec 20 21:50:02 2014 +0100
add a "sign" target to the Makefile
---
Makefile | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 58e1301..6c94460 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,7 @@ jar_file := $(build_path)chrome/$(extension_name).jar
# the path of the target XPI file
xpi_file := $(dist_path)$(extension_name).xpi
+signed_xpi_file := $(dist_path)$(extension_name)-signed.xpi
# collect files that are part of the source code
source_files := $(shell find $(source_dirname) -type f -regex ".*\.jsm?") \
@@ -49,7 +50,9 @@ deleted_files :=
empty_dirs :=
ifneq "$(wildcard $(build_path))" ""
# files that have been deleted but still exist in the build directory.
-deleted_files := $(shell find $(build_path) -type f | grep -F -v $(addprefix -e ,$(all_files)))
+deleted_files := $(shell find $(build_path) -type f | \
+ grep -v "META-INF" | \
+ grep -F -v $(addprefix -e ,$(all_files)))
# empty directories. -mindepth 1 to exclude the build directory itself.
empty_dirs := $(shell find $(build_path) -mindepth 1 -type d -empty)
endif
@@ -57,6 +60,7 @@ endif
+
#
# define targets
#
@@ -75,6 +79,12 @@ all: $(xpi_file)
build: $(build_path)
$(build_path): $(all_files) $(deleted_files) $(empty_dirs)
+$(build_path)/META-INF/: $(build_path) $(all_files)
+ mkdir -p $(build_path)/META-INF
+ signtool -d .signing \
+ -k "Open Source Developer, Martin Kimmerle's Unizeto Technologies S.A. ID" \
+ $(build_path)
+
# create the dist directory
$(dist_path):
@@ -93,6 +103,16 @@ $(xpi_file): $(build_path) $(all_files) | $(dist_path)
$(ZIP) $(abspath $(xpi_file)) $(patsubst $(build_path)%,%,$(all_files))
@echo "Creating XPI file: Done!"
+.PHONY: sign
+sign $(signed_xpi_file): $(build_path)/META-INF/ | $(dist_path)
+ @rm -f $(signed_xpi_file)
+ @cd $(build_path) && \
+ $(ZIP) $(abspath $(signed_xpi_file)) \
+ META-INF/zigbert.rsa && \
+ $(ZIP) -r -D $(abspath $(signed_xpi_file)) \
+ $(patsubst $(build_path)%,%,$(all_files)) META-INF \
+ -x META-INF/zigbert.rsa
+
# ___________________
# processing of files
#
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list