Parametrize appimage-builder recipe,
setup environment in build.sh, start from building amd64 appimage, download appimage-builder in docker.
This commit is contained in:
parent
1753c42fd3
commit
4e20421500
|
@ -19,4 +19,7 @@ RUN apt-get update | true
|
||||||
|
|
||||||
RUN apt-get install -yq libssl-dev:armhf
|
RUN apt-get install -yq libssl-dev:armhf
|
||||||
|
|
||||||
|
RUN wget -qO appimage-builder-x86_64.AppImage \
|
||||||
|
https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
|
||||||
|
|
||||||
ADD . .
|
ADD . .
|
||||||
|
|
|
@ -1,11 +1,38 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
wget -O appimage-builder-x86_64.AppImage \
|
export APPIMAGE_EXTRACT_AND_RUN=1
|
||||||
|
BUILDER=appimage-builder-x86_64.AppImage
|
||||||
|
RECIPE=packages/AppImage/AppImageBuilder.yml
|
||||||
|
|
||||||
|
export APP_VERSION=$(python setup.py --version)
|
||||||
|
|
||||||
|
function set_sourceline {
|
||||||
|
if [ ${ARCH} == amd64 ]; then
|
||||||
|
export SOURCELINE="deb http://archive.ubuntu.com/ubuntu/ bionic main universe"
|
||||||
|
else
|
||||||
|
export SOURCELINE="deb [arch=${ARCH}] http://ports.ubuntu.com/ubuntu-ports/ bionic main universe"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -f ${BUILDER} ] || wget -qO ${BUILDER} \
|
||||||
https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage \
|
https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage \
|
||||||
&& chmod +x appimage-builder-x86_64.AppImage
|
&& chmod +x ${BUILDER}
|
||||||
|
|
||||||
APPIMAGE_EXTRACT_AND_RUN=1 ./appimage-builder-x86_64.AppImage \
|
|
||||||
--recipe packages/AppImage/AppImageBuilder.yml
|
export ARCH=amd64
|
||||||
|
export APPIMAGE_ARCH=x86_64
|
||||||
|
export RUNTIME=${APPIMAGE_ARCH}
|
||||||
|
set_sourceline
|
||||||
|
|
||||||
|
./${BUILDER} --recipe ${RECIPE} || exit 1
|
||||||
|
|
||||||
|
export ARCH=armhf
|
||||||
|
export RUNTIME=gnueabihf
|
||||||
|
export CC=arm-linux-gnueabihf-gcc
|
||||||
|
export CXX=${CC}
|
||||||
|
set_sourceline
|
||||||
|
|
||||||
|
./${BUILDER} --recipe ${RECIPE}
|
||||||
|
|
||||||
mkdir -p ../out
|
mkdir -p ../out
|
||||||
mv PyBitmessage*.AppImage ../out
|
mv PyBitmessage*.AppImage ../out
|
||||||
|
|
|
@ -2,7 +2,7 @@ version: 1
|
||||||
script:
|
script:
|
||||||
# Remove any previous build
|
# Remove any previous build
|
||||||
- rm -rf AppDir | true
|
- rm -rf AppDir | true
|
||||||
- CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-gcc python setup.py install --prefix=/usr --root=AppDir
|
- python setup.py install --prefix=/usr --root=AppDir
|
||||||
|
|
||||||
AppDir:
|
AppDir:
|
||||||
path: ./AppDir
|
path: ./AppDir
|
||||||
|
@ -11,7 +11,7 @@ AppDir:
|
||||||
id: pybitmessage
|
id: pybitmessage
|
||||||
name: PyBitmessage
|
name: PyBitmessage
|
||||||
icon: pybitmessage
|
icon: pybitmessage
|
||||||
version: 0.6.3.2
|
version: !ENV ${APP_VERSION}
|
||||||
# Set the python executable as entry point
|
# Set the python executable as entry point
|
||||||
exec: usr/bin/python
|
exec: usr/bin/python
|
||||||
# Set the application main script path as argument.
|
# Set the application main script path as argument.
|
||||||
|
@ -22,9 +22,9 @@ AppDir:
|
||||||
- sed -i "s|GTK_.*||g" AppDir/AppRun.env
|
- sed -i "s|GTK_.*||g" AppDir/AppRun.env
|
||||||
|
|
||||||
apt:
|
apt:
|
||||||
arch: armhf
|
arch: !ENV '${ARCH}'
|
||||||
sources:
|
sources:
|
||||||
- sourceline: 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic main universe'
|
- sourceline: !ENV '${SOURCELINE}'
|
||||||
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
|
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
@ -67,7 +67,7 @@ AppDir:
|
||||||
- usr/share/doc
|
- usr/share/doc
|
||||||
|
|
||||||
runtime:
|
runtime:
|
||||||
arch: [ gnueabihf ]
|
arch: [ !ENV '${RUNTIME}' ]
|
||||||
env:
|
env:
|
||||||
# Set python home
|
# Set python home
|
||||||
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
|
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
|
||||||
|
@ -77,4 +77,4 @@ AppDir:
|
||||||
PYTHONPATH: '${APPDIR}/usr/lib/python2.7/site-packages'
|
PYTHONPATH: '${APPDIR}/usr/lib/python2.7/site-packages'
|
||||||
|
|
||||||
AppImage:
|
AppImage:
|
||||||
arch: armhf
|
arch: !ENV '${APPIMAGE_ARCH}'
|
||||||
|
|
Reference in New Issue
Block a user