Build Recipe Format

From F-Droid
Revision as of 14:05, 27 October 2013 by CiaranG (Talk | contribs) (Put that in bold to encourage the reading of it)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Build recipes have become a lot more complex since the format was originally devised. It's time to make some improvements, to improve readability and ease maintenance. The first round of changes are not necessarily the ultimate endpoint, but just a step in the right direction, allowing a smooth transition. The server code will continue to be able to read the old version, but will write the new version. The fdroiddata repo will be converted to use the new format exclusively once it's proven.

Example of old format

Build Version:0.9.1-584,11527,openttd-1.2.3.25,update=no,srclibs=OpenMSX@728325a472,buildjni=no,\
subdir=project,patch=tcl.patch,scanignore=libsdl-android/project/jni/tcl8.5/lib,\
init=\
  ln -s ../../OpenMSX openmsx && find . -name "*.so" -delete &&\
  sed -ri 's/ant debug|ant release/exit/' ../build.sh,\
prebuild=\
  export SDL_ANDROID_PORT_PATH=`readlink -f ..` && cd openmsx/build/android && ./setup_anddev.sh && \
  sed -ri 's/(debuggable)="true"/\1="false"/' AndroidManifest.xml && \
  cd openmsx && \
  declare -rx VERSION_NAME=0.9.1-584 && \
 ./launch_anddev_build.sh

Same example in new format

Build:0.9.1-584,11527
    commit=openttd-1.2.3.25
    subdir=project
    init=ln -s ../../OpenMSX openmsx && \
        find . -name "*.so" -delete && \
        sed -ri 's/ant debug|ant release/exit/' ../build.sh
    update=no
    srclibs=OpenMSX@728325a472
    patch=tcl.patch
    prebuild=export SDL_ANDROID_PORT_PATH=`readlink -f ..` && \
        cd openmsx/build/android && \
        ./setup_anddev.sh && \
        sed -ri 's/(debuggable)="true"/\1="false"/' AndroidManifest.xml && \
        cd openmsx && \
        declare -rx VERSION_NAME=0.9.1-584 && \
        ./launch_anddev_build.sh
    scanignore=libsdl-android/project/jni/tcl8.5/lib
    buildjni=no