From a69bee95cc61991614a189765605972fbaf53bbb Mon Sep 17 00:00:00 2001 From: lufebe16 Date: Thu, 24 Nov 2022 13:57:31 +0100 Subject: [PATCH] Build support for android: - added fdroid.init --- buildozer/fdroid.init | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 buildozer/fdroid.init diff --git a/buildozer/fdroid.init b/buildozer/fdroid.init new file mode 100755 index 00000000..cbc64194 --- /dev/null +++ b/buildozer/fdroid.init @@ -0,0 +1,33 @@ +#!/bin/bash +set -eux + +tmpdir=.. +cardsets_dir=PySolFC-Cardsets--Minimal-2.1.0 +cardsets_file=${cardsets_dir}.tar.xz + +echo '### prepare source' + +(cd .. && make rules && make all_games_html && make mo) + +cp -a main.py ${tmpdir} +mkdir -p ${tmpdir}/data/images/cards/bottoms/trumps-only +echo "" > ${tmpdir}/data/images/cards/bottoms/trumps-only/.keep + +echo '### prepare cardsets' + +./mkcards + +cp -a ${cardsets_dir}/* ${tmpdir}/data + +echo '### eval version' + +./version.py > ${tmpdir}/version.txt + +echo '### prepare buildozer' + +sed -r "s:#? ?source.dir =.*:source.dir = ..:" -i buildozer.spec +sed -r "s:#? ?source.exclude_dirs =.*:source.exclude_dirs = Screenshots,android,buildozer,tests:" -i buildozer.spec +sed -r "s:#? ?source.exclude_patterns =.*:source.exclude_patterns = README.*,AUTHORS.md,CONTRIBUTING.md,COPYING,MANIFEST.in,Makefile,NEWS.asciidoc,appdata.xml,pysol.py,run-tests.pl,setup.cfg,setup.py,setup_osx.py,local.properties,p4a_env_vars.txt:" -i buildozer.spec +sed -r "s:#? ?android.skip_update =.*:android.skip_update = True:" -i buildozer.spec + +echo '### end init'