diff options
Diffstat (limited to 'tools/signapk/test/run')
-rwxr-xr-x | tools/signapk/test/run | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/signapk/test/run b/tools/signapk/test/run new file mode 100755 index 0000000..4e24625 --- /dev/null +++ b/tools/signapk/test/run @@ -0,0 +1,30 @@ +#!/usr/bin/make -f + +package := NotePad.apk + +all: out/signed-$(package) + +clean: + rm -rf out + +.PHONY: FORCE + +DSAPARAM := out/dsaparam +$(DSAPARAM): + mkdir -p $(dir $@) + umask 0077 && openssl dsaparam -out $@ 1024 + +%.pem: $(DSAPARAM) FORCE + mkdir -p $(dir $@) + umask 0077 && openssl gendsa -out $@.pk~ $(DSAPARAM) + umask 0077 && openssl pkcs8 -topk8 -nocrypt \ + -in $@.pk~ -out $@.pk + umask 0077 && openssl req -new -x509 -key $@.pk -out $@ -days 1095 \ + -subj "/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com" + +cert := out/key1.pem +out/signed-$(package): $(package) $(cert) + mkdir -p $(dir $@) + SIGNAPK_DEBUG=1 \ + signapk -input $< -output $@ \ + -key $(cert).pk -cert $(cert) -tempdir out |