diff options
author | Max Kellermann <max@musicpd.org> | 2017-12-29 17:12:55 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-14 23:41:38 +0200 |
commit | 94592c14062d5afc9482d11baa401648082022c0 (patch) | |
tree | 8723d462737f883181fb1aaa3f91ee3d0add9721 /android/apk/meson.build | |
parent | 13ce142df137f346526de2a31a7ccbd59a903cdd (diff) |
build with Meson instead of autotools
So long, autotools! This is my last MPD related project to migrate
away from it. It has its strengths, but also very obvious weaknesses
and weirdnesses. Today, many of its quirks are not needed anymore,
and are cumbersome and slow. Now welcome our new Meson overlords!
Diffstat (limited to 'android/apk/meson.build')
-rw-r--r-- | android/apk/meson.build | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/android/apk/meson.build b/android/apk/meson.build new file mode 100644 index 000000000..fc9c81737 --- /dev/null +++ b/android/apk/meson.build @@ -0,0 +1,59 @@ +unsigned_apk = custom_target( + 'mpd-unsigned.apk', + output: 'mpd-unsigned.apk', + input: [mpd, classes_dex, resources_apk[0]], + command: [ + join_paths(meson.current_source_dir(), 'make-unsigned-apk.sh'), + android_abi, + get_option('android_strip'), + zip, + '@OUTPUT0@', + '@INPUT@', + ], +) + +if get_option('android_debug_keystore') != '' + debug_apk = custom_target( + 'mpd-debug.apk', + output: 'mpd-debug.apk', + input: unsigned_apk, + command: [ + jarsigner, + '-keystore', get_option('android_debug_keystore'), + '-storepass', 'android', + '-signedjar', '@OUTPUT@', + '@INPUT@', + 'androiddebugkey', + ], + build_by_default: true + ) +endif + +if get_option('android_keystore') != '' and get_option('android_keyalias') != '' and get_option('android_keypass') != '' + unaligned_apk = custom_target( + 'mpd-unaligned.apk', + output: 'mpd-unaligned.apk', + input: unsigned_apk, + command: [ + jarsigner, + '-digestalg', 'SHA1', '-sigalg', 'MD5withRSA', + '-keystore', get_option('android_keystore'), + '-storepass', get_option('android_keypass'), + '-signedjar', '@OUTPUT@', + '@INPUT@', + get_option('android_keyalias'), + ], + ) + + apk = custom_target( + 'mpd.apk', + output: 'mpd.apk', + input: unaligned_apk, + command: [ + android_zipalign, + '-f', '4', + '@INPUT@', '@OUTPUT@', + ], + build_by_default: true + ) +endif |