mirror of
https://github.com/xxh/xxh
synced 2024-11-21 19:33:04 +00:00
Build scripts
This commit is contained in:
parent
b902a94193
commit
62c218f6fc
9 changed files with 103 additions and 0 deletions
2
appimage/entrypoint.sh
Normal file
2
appimage/entrypoint.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
#! /bin/bash
|
||||
{{ python-executable }} "${APPDIR}/opt/python{{ python-version }}/bin/xxh" "$@"
|
2
appimage/pre-requirements.txt
Normal file
2
appimage/pre-requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
pexpect>=4.8.0
|
||||
pyyaml
|
16
appimage/xxh.appdata.xml
Normal file
16
appimage/xxh.appdata.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>xxh</id>
|
||||
<metadata_license>BSD</metadata_license>
|
||||
<project_license>BSD</project_license>
|
||||
<name>xxh</name>
|
||||
<summary>xxh on Python {{ python-fullversion }}</summary>
|
||||
<description>
|
||||
<p>Bring your favorite shell wherever you go through the ssh.</p>
|
||||
</description>
|
||||
<launchable type="desktop-id">xxh.desktop</launchable>
|
||||
<url type="homepage">https://github.com/xxh/xxh</url>
|
||||
<provides>
|
||||
<binary>python{{ python-version }}</binary>
|
||||
</provides>
|
||||
</component>
|
8
appimage/xxh.desktop
Normal file
8
appimage/xxh.desktop
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=xxh
|
||||
Exec=xxh
|
||||
Comment=xxh on Python {{ python-fullversion }}
|
||||
Icon=python
|
||||
Categories=System;
|
||||
Terminal=true
|
15
portable-musl-alpine/Setup.local
Normal file
15
portable-musl-alpine/Setup.local
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
*static*
|
||||
|
||||
array arraymodule.c # array objects
|
||||
cmath cmathmodule.c _math.c # -lm # complex math library functions
|
||||
math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
|
||||
_struct _struct.c # binary structure packing/unpacking
|
||||
_random _randommodule.c # Random number generator
|
||||
_datetime _datetimemodule.c # datetime accelerator
|
||||
binascii binascii.c
|
||||
select selectmodule.c
|
||||
termios termios.c
|
||||
fcntl fcntlmodule.c
|
||||
resource resource.c
|
||||
_posixsubprocess _posixsubprocess.c
|
5
xxh-appimage-build.xsh
Normal file
5
xxh-appimage-build.xsh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env xonsh
|
||||
|
||||
mkdir -p build
|
||||
docker build . -f xxh-appimage.Dockerfile -t tmp/xxh-appimage
|
||||
docker run --rm -it -v $PWD/build:/result tmp/xxh-appimage
|
13
xxh-appimage.Dockerfile
Normal file
13
xxh-appimage.Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
|||
FROM python:3.8-slim-buster
|
||||
|
||||
RUN apt update && apt install -y git file && pip install git+https://github.com/niess/python-appimage
|
||||
|
||||
ADD . /xxh
|
||||
RUN mkdir -p /result
|
||||
|
||||
WORKDIR /xxh/appimage
|
||||
RUN echo '/xxh' > requirements.txt && cat pre-requirements.txt >> requirements.txt
|
||||
|
||||
WORKDIR /xxh
|
||||
RUN python -m python_appimage build app /xxh/appimage
|
||||
CMD cp xxh-*.AppImage /result
|
5
xxh-portable-musl-alpine-build.xsh
Executable file
5
xxh-portable-musl-alpine-build.xsh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env xonsh
|
||||
|
||||
mkdir -p build
|
||||
docker build . -f xxh-portable-musl-alpine.Dockerfile -t tmp/xxh-portable-musl-alpine #--no-cache --force-rm
|
||||
docker run --rm -v $PWD/build:/result tmp/xxh-portable-musl-alpine
|
37
xxh-portable-musl-alpine.Dockerfile
Normal file
37
xxh-portable-musl-alpine.Dockerfile
Normal file
|
@ -0,0 +1,37 @@
|
|||
FROM alpine
|
||||
VOLUME /result
|
||||
|
||||
ADD . /xxh
|
||||
|
||||
ENV PYTHON_VER 3.8.2
|
||||
ENV PYTHON_LIB_VER 3.8
|
||||
|
||||
RUN apk update && apk add --update musl-dev gcc python3-dev py3-pip chrpath git vim mc wget make openssh-client
|
||||
RUN pip3 install -U pip
|
||||
RUN pip3 install -U "https://github.com/Nuitka/Nuitka/archive/factory.zip"
|
||||
RUN pip3 install pexpect pyyaml
|
||||
|
||||
RUN mkdir /build /package
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN wget https://www.python.org/ftp/python/$PYTHON_VER/Python-$PYTHON_VER.tgz && tar -xzf Python-$PYTHON_VER.tgz
|
||||
WORKDIR Python-$PYTHON_VER
|
||||
RUN cp /xxh/portable-musl-alpine/Setup.local Modules/
|
||||
RUN ./configure LDFLAGS="-static" --disable-shared
|
||||
RUN make LDFLAGS="-static" LINKFORSHARED=" "
|
||||
RUN cp libpython$PYTHON_LIB_VER.a /usr/lib
|
||||
|
||||
RUN echo 'Add xxh'
|
||||
|
||||
WORKDIR /xxh
|
||||
#RUN git clone --depth 1 https://github.com/xxh/xxh
|
||||
ENV LDFLAGS "-static -l:libpython3.8.a"
|
||||
RUN nuitka3 --python-flag=no_site --python-flag=no_warnings --show-progress --standalone --follow-imports xxh
|
||||
RUN ls -la
|
||||
|
||||
WORKDIR xxh.dist
|
||||
RUN ./xxh -V
|
||||
RUN cp xxh /xxh/xxh_xxh/xxh.*sh /xxh/xxh_xxh/*.xxhc /package
|
||||
WORKDIR /package
|
||||
CMD tar -zcf /result/xxh-portable-musl-alpine-`uname`-`uname -m`.tar.gz * && ls -sh1 /result
|
Loading…
Reference in a new issue