altosdroid: Automatically sign the released version if the key is available
authorKeith Packard <keithp@keithp.com>
Sat, 13 Sep 2014 22:23:40 +0000 (15:23 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 13 Sep 2014 22:23:40 +0000 (15:23 -0700)
Look in ~/altusmetrumllc for release.keystore and Passphrase and
enable building and signing of the release binary.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid/Makefile.am
configure.ac

index d5784483e74663a869df6a1cdb3611563537bb2a..59704aada74d7e7662b1fdf8f40d6702df9e9e98 100644 (file)
@@ -1,5 +1,8 @@
 if ANDROID
 if ANDROID
-all_target=bin/AltosDroid-debug.apk bin/AltosDroid-release-unsigned.apk
+all_target=bin/AltosDroid-debug.apk
+if ANDROID_RELEASE
+all_target+=bin/AltosDroid-release.apk
+endif
 else
 all_target=
 endif
 else
 all_target=
 endif
@@ -76,7 +79,8 @@ bin/AltosDroid-release-unsigned.apk: $(SRC) $(ALTOSLIB) $(SUPPORT_V4) $(GOOGLE_P
 
 bin/AltosDroid-release.apk: bin/AltosDroid-release-unsigned.apk
        jarsigner -sigalg SHA1withDSA -digestalg SHA1 \
 
 bin/AltosDroid-release.apk: bin/AltosDroid-release-unsigned.apk
        jarsigner -sigalg SHA1withDSA -digestalg SHA1 \
-          -keystore release.keystore \
+          -keystore ~/altusmetrumllc/release.keystore \
+          -storepass:file ~/altusmetrumllc/Passphrase \
           -signedjar bin/AltosDroid-release-signed.apk \
           bin/AltosDroid-release-unsigned.apk AltosDroid
        $(ZIPALIGN) -f 4 \
           -signedjar bin/AltosDroid-release-signed.apk \
           bin/AltosDroid-release-unsigned.apk AltosDroid
        $(ZIPALIGN) -f 4 \
index b945832f480c29ee0ded6d63c80544a1e0a54125..a38ef092b7626958864019f300fa4ef616be97f1 100644 (file)
@@ -144,13 +144,18 @@ if test "x$ANDROID_SDK" != "xno"; then
        fi
 fi
 
        fi
 fi
 
+ANDROID_RELEASE=no
 if test "x$ANDROID_SDK" != "xno"; then
        HAVE_ANDROID_SDK="yes"
 if test "x$ANDROID_SDK" != "xno"; then
        HAVE_ANDROID_SDK="yes"
+       if test -f "$HOME/altusmetrumllc/release.keystore" -a -f "$HOME/altusmetrumllc/Passphrase"; then
+               ANDROID_RELEASE=yes
+       fi
 else
        HAVE_ANDROID_SDK="no"
 fi
 
 AM_CONDITIONAL([ANDROID], [test x$ANDROID_SDK != xno])
 else
        HAVE_ANDROID_SDK="no"
 fi
 
 AM_CONDITIONAL([ANDROID], [test x$ANDROID_SDK != xno])
+AM_CONDITIONAL([ANDROID_RELEASE], [test x$ANDROID_RELEASE = xyes])
 
 AC_SUBST(ANDROID_SDK)
 
 
 AC_SUBST(ANDROID_SDK)
 
@@ -563,6 +568,7 @@ echo "    CC1111 support..............: ${HAVE_SDCC}"
 echo "    AVR compiler................: ${AVR_CC} ${AVR_OBJCOPY}"
 echo "    AVR support.................: ${HAVE_AVR_CC}"
 echo "    Android support.............: ${HAVE_ANDROID_SDK}"
 echo "    AVR compiler................: ${AVR_CC} ${AVR_OBJCOPY}"
 echo "    AVR support.................: ${HAVE_AVR_CC}"
 echo "    Android support.............: ${HAVE_ANDROID_SDK}"
+echo "    Android release support.....: ${ANDROID_RELEASE}"
 echo "    STlink support..............: ${HAVE_STLINK}"
 echo "    Local pdclib................: ${HAVE_PDCLIB}"
 echo "    i386 and amd64 libaltos.....: ${MULTI_ARCH}"
 echo "    STlink support..............: ${HAVE_STLINK}"
 echo "    Local pdclib................: ${HAVE_PDCLIB}"
 echo "    i386 and amd64 libaltos.....: ${MULTI_ARCH}"