diff --git a/YML.md b/YML.md index 0ecfd1d5..a851ef6c 100644 --- a/YML.md +++ b/YML.md @@ -172,6 +172,7 @@ This downloads the payload application, JabRef, and the required JRE which requi The script could also be used to fetch pre-built Debian packages from a GitHub release page, or to override the version of a package. +Use `post_script` instead of `script` if you need this to run _after_ the other ingredient processing has taken place. ### Script section diff --git a/pkg2appimage b/pkg2appimage index 7458c891..83e8b80e 100755 --- a/pkg2appimage +++ b/pkg2appimage @@ -242,6 +242,11 @@ if [ ! -z "${_ingredients_dist}" ] ; then $dltool -c -i- <<<"$URLS" fi +if [ ! -z "${_ingredients_post_script[0]}" ] ; then + # Execute extra steps defined in recipe + shell_execute $YAMLFILE _ingredients_post_script +fi + mkdir -p ./$APP.AppDir/ cd ./$APP.AppDir/ diff --git a/recipes/0ad.yml b/recipes/0ad.yml index 99f14320..c1feacec 100644 --- a/recipes/0ad.yml +++ b/recipes/0ad.yml @@ -3,7 +3,7 @@ app: 0ad ingredients: dist: trusty sources: - - deb http://ftp.fau.de/ubuntu/ trusty main universe + - deb http://cn.archive.ubuntu.com/ubuntu/ trusty main universe ppas: - wfg/0ad @@ -11,3 +11,8 @@ ingredients: script: - find usr/lib/games/0ad/ -type f -iname '*.so.*' -exec mv {} usr/lib/ \; - mv usr/games/* usr/bin/ + - mkdir -p usr/bin/share + - mv usr/share/games usr/bin/share + - sed -i -e 's#/usr#././#g' usr/bin/pyrogenesis + - sed -i '1a HERE=$(cd "$(dirname "$0")";pwd) && cd $HERE' usr/bin/0ad + - ln -s usr/lib/x86_64-linux-gnu/libmozjs-38.so.0.0.0 usr/lib/x86_64-linux-gnu/libjs.so.0 diff --git a/recipes/FreeCAD-asm3.yml b/recipes/FreeCAD-asm3.yml new file mode 100644 index 00000000..54211e9b --- /dev/null +++ b/recipes/FreeCAD-asm3.yml @@ -0,0 +1,54 @@ +app: FreeCAD-asm3 +binpatch: true + +ingredients: + dist: trusty + sources: + - deb http://archive.ubuntu.com/ubuntu/ trusty main universe + ppas: + - freecad-maintainers/freecad-daily + packages: + - freecad-daily + # - calculix-ccx + - appmenu-qt + pretend: + - libfontconfig1 2.11.0-0ubuntu4 + script: + - rm -f freecad-daily*amd64.deb + # try to restore the original package to prevent repeated download + - ! test -f tmp/freecad-daily*.deb || mv tmp/freecad-daily*.deb . + post_script: + - mkdir -p tmp + # save the original package for future redo + - mv freecad-daily*.deb tmp/ + # replace the freecad deb package with our custom build + - cp $HOME/pbuilder/trusty_result/freecad-daily*amd64.deb . + +script: + # install asm3 + - dir=$PWD + - cd ./usr/lib/freecad-daily/Ext/freecad + - rm -rf asm3 + - git clone https://github.com/realthunder/FreeCAD_assembly3.git asm3 + - cd asm3 + - git submodule update --init py_slvs + # generate version as asm3-- + - gitdate=`date -d "$(git show -s --format=%aI)" +%Y%m%d%H%M` + - debdate=`date -r $dir/../freecad-daily*.deb +%Y%m%d%H%M` + - [ $debdate -lt $gitdate ] || gitdate=$debdate + - echo "asm3-$(git show -s --format=%h)-$gitdate" > $dir/../VERSION + - rm -rf `find -name '.git*'` + - cd $dir + # resume setup just like FreeCAD-nightly + - cp ./usr/share/applications/freecad-daily.desktop . + - ln -s freecad-daily.desktop freecad-asm3.desktop + - sed -i -e 's@FreeCAD Daily@FreeCAD@g' freecad-daily.desktop + - sed -i -e 's@/usr/bin/@@g' freecad-daily.desktop + - sed -i -e 's@Path=@# Path=@g' freecad-daily.desktop + # - sed -i -e 's@Icon=freecad@Icon=freecad-daily@g' freecad-daily.desktop + - cp ./usr/share/icons/hicolor/64x64/apps/freecad-daily.png . + - # Dear upstream developers, please use relative rather than absolute paths + - # then binary patching like this will become unneccessary + - find usr/ -type f -exec sed -i -e "s@/usr/lib/freecad-daily@././/lib/freecad-daily@g" {} \; + - find usr/ -type f -exec sed -i -e "s@/usr/share/freecad-daily@././/share/freecad-daily@g" {} \; + - ( cd ./usr/lib/freecad-daily/ ; ln -s ../../share/ . ) # Why? diff --git a/recipes/FreeCAD-nightly.yml b/recipes/FreeCAD-nightly.yml index 924bf535..ff687ba0 100644 --- a/recipes/FreeCAD-nightly.yml +++ b/recipes/FreeCAD-nightly.yml @@ -23,6 +23,8 @@ script: - sed -i -e 's@Path=@# Path=@g' freecad-daily.desktop # - sed -i -e 's@Icon=freecad@Icon=freecad-daily@g' freecad-daily.desktop - cp ./usr/share/icons/hicolor/64x64/apps/freecad-daily.png . + - mv ./usr/lib/lapack/*.so* ./usr/lib/ + - mv ./usr/lib/libblas/*.so* ./usr/lib/ - # Dear upstream developers, please use relative rather than absolute paths - # then binary patching like this will become unneccessary - find usr/ -type f -exec sed -i -e "s@/usr/lib/freecad-daily@././/lib/freecad-daily@g" {} \; diff --git a/recipes/OpenTTD.yml b/recipes/OpenTTD.yml new file mode 100644 index 00000000..fe9da4bc --- /dev/null +++ b/recipes/OpenTTD.yml @@ -0,0 +1,38 @@ +app: openttd + +ingredients: + script: + - #please modify the version of openttd if it will be updated by up-stream! + - DLD='http://binaries.openttd.org/releases/1.7.1/openttd-1.7.1-linux-generic-amd64.tar.gz' + - wget -c $DLD + - wget -c 'http://binaries.openttd.org/extra/opengfx/0.5.2/opengfx-0.5.2-all.zip' + - wget -c 'http://binaries.openttd.org/extra/opensfx/0.2.3/opensfx-0.2.3-all.zip' + - wget -c 'http://binaries.openttd.org/extra/openmsx/0.3.1/openmsx-0.3.1-all.zip' + - echo $DLD | cut -d '-' -f2 > VERSION + - tar -zxvf openttd*tar.gz + - find . -name '*.zip' -exec unzip {} \; + - find -maxdepth 1 -name "*.tar" | xargs -i tar xvf {} ; + - find -maxdepth 2 -name "*.txt" -exec rm {} \; + + +script: + - cp -r ../openttd-*/* usr/bin/ + - cp -r ../opengfx-*/* ../opensfx-*/* ../openmsx-*/* usr/bin/baseset/ + - find . -name openttd.128.png -exec cp {} openttd.png \; + - cat > usr/bin/OpenTTD <<"EOF" + - #!/bin/bash + - HERE=$(cd "$(dirname "$0")";pwd) + - cd "$HERE" + - "$HERE/openttd" "$@" + - EOF + - chmod +x usr/bin/OpenTTD + - cat > openttd.desktop < VERSION + - tar -jxvf t-engine4-*.tar.bz2 + + +script: + - cp -r ../t-engine4-*/* usr/bin/ + - wget -c 'https://te4.org/images/awards/voratun_donator.png' -O 'tales-of-majeyal.png' + - ln -s "/tmp/tmp.tales-of-majeyal.te4_log_web.txt" "usr/bin/te4_log_web.txt" + - cat > usr/bin/tales-of-majeyal <<"EOF" + - #!/bin/bash + - HERE=$(cd "$(dirname "$0")";pwd) + - cd "$HERE" + - if [ ! -f "$HOME/.t-engine/te4_log_web.txt" ];then + - mkdir -p "$HOME/.t-engine/" + - touch "$HOME/.t-engine/te4_log_web.txt" + - ln -s "$HOME/.t-engine/te4_log_web.txt" "/tmp/tmp.tales-of-majeyal.te4_log_web.txt" + - fi + - "$HERE/t-engine" "$@" + - rm "/tmp/tmp.tales-of-majeyal.te4_log_web.txt" + - EOF + - chmod +x usr/bin/tales-of-majeyal + - cat > tales-of-majeyal.desktop <