From a928a9640f7b82e6f0734845cc80273f620b79a6 Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Tue, 16 Sep 2014 12:01:18 +0200 Subject: Makefile.am: change android apk name If no name is specified, it'll use the name of the first activity of the AndroidManifest.xml. And we don't want the apk to be called Settings.apk. --- Makefile.am | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 39ac7fef5..abf039b68 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,7 @@ AM_CPPFLAGS += -I$(srcdir)/src $(GLIB_CFLAGS) $(BOOST_CPPFLAGS) AM_CPPFLAGS += -DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"' +APK_NAME = mpd if ANDROID else bin_PROGRAMS = src/mpd @@ -273,7 +274,7 @@ libmain_a_CPPFLAGS = $(AM_CPPFLAGS) -Iandroid/build/include src_mpd_LDADD += libandroid.a libjava.a -all-local: android/build/bin/Main-debug.apk +all-local: android/build/bin/$(APK_NAME)-debug.apk clean-local: rm -rf android/build @@ -286,7 +287,7 @@ android/build/build.xml: android/AndroidManifest.xml ln -s $(abs_srcdir)/android/AndroidManifest.xml $(abs_srcdir)/android/custom_rules.xml android/build ln -s $(abs_srcdir)/android/src android/build/src/org/musicpd ln -s $(abs_srcdir)/android/res/values $(abs_srcdir)/android/res/layout android/build/res - $(ANDROID_SDK)/tools/android update project --path android/build --target android-17 + $(ANDROID_SDK)/tools/android update project --path android/build --target android-17 --name $(APK_NAME) android/build/bin/classes/org/musicpd/Bridge.class: android/src/Bridge.java android/build/build.xml cd android/build && ant compile-jni-classes @@ -310,18 +311,18 @@ APK_DEPS = android/build/res/drawable/icon.png \ $(wildcard $(srcdir)/android/src/*.java) \ android/build/build.xml -android/build/bin/Main-debug.apk: $(APK_DEPS) +android/build/bin/$(APK_NAME)-debug.apk: $(APK_DEPS) cd android/build && ant nodeps debug -android/build/bin/Main-release-unsigned.apk: $(APK_DEPS) +android/build/bin/$(APK_NAME)-release-unsigned.apk: $(APK_DEPS) cd android/build && ant nodeps release -android/build/bin/Main-release-unaligned.apk: android/build/bin/Main-release-unsigned.apk +android/build/bin/$(APK_NAME)-release-unaligned.apk: android/build/bin/$(APK_NAME)-release-unsigned.apk jarsigner -digestalg SHA1 -sigalg MD5withRSA -storepass:env ANDROID_KEYSTORE_PASS -keystore $(ANDROID_KEYSTORE) -signedjar $@ $< $(ANDROID_KEY_ALIAS) ANDROID_SDK_BUILD_TOOLS_VERSION = 20.0.0 -android/build/bin/Main.apk: android/build/bin/Main-release-unaligned.apk +android/build/bin/$(APK_NAME).apk: android/build/bin/$(APK_NAME)-release-unaligned.apk $(ANDROID_SDK)/build-tools/$(ANDROID_SDK_BUILD_TOOLS_VERSION)/zipalign -f 4 $< $@ endif -- cgit v1.2.3