multi version support
This commit is contained in:
parent
b4bbd7ab89
commit
85e92b99c2
|
@ -1 +1,3 @@
|
||||||
cpython
|
cpython
|
||||||
|
.git
|
||||||
|
temp
|
|
@ -0,0 +1,2 @@
|
||||||
|
/temp
|
||||||
|
/src/out/
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash -eux
|
||||||
|
|
||||||
|
VARSFILE=$1
|
||||||
|
|
||||||
|
ls -la src/$VARSFILE
|
||||||
|
|
||||||
|
time docker run -it --rm --name extbuild -e "VARSFILE=$VARSFILE" -v $PWD/src:/src extpythonbuilder
|
|
@ -1,12 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash -eux
|
||||||
|
|
||||||
# get metadata
|
# get metadata
|
||||||
cd /src
|
ln -s /src/$VARSFILE /tmp/vars.sh
|
||||||
. vars.sh
|
. /tmp/vars.sh
|
||||||
|
|
||||||
# install deps
|
# install deps
|
||||||
apt-get update
|
apt-get update
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y $CPYTHON_DEPS
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" $CPYTHON_DEPS
|
||||||
|
|
||||||
# run the build
|
# run the build
|
||||||
sudo -Hu builder /build.sh
|
sudo -Hu builder /build.sh
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash -eux
|
||||||
|
|
||||||
. /src/vars.sh
|
. /tmp/vars.sh
|
||||||
|
|
||||||
|
function template {
|
||||||
|
perl -p -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' < $1
|
||||||
|
}
|
||||||
|
|
||||||
# create build dir
|
# create build dir
|
||||||
cd /build
|
cd /build
|
||||||
|
@ -13,7 +17,14 @@ wget -qO- cpython.tar.gz $PYTHON_TARBALL | tar zxf - -C cpython/ --strip-compone
|
||||||
|
|
||||||
# get debian metadata
|
# get debian metadata
|
||||||
# todo generate the metadata here
|
# todo generate the metadata here
|
||||||
cp -r /src/debian /src/Makefile ./
|
# cp -r /src/debian /src/Makefile ./
|
||||||
|
mkdir debian
|
||||||
|
export BUILD_DATE=$(date -R)
|
||||||
|
template /src/debian/changelog | tee debian/changelog
|
||||||
|
template /src/debian/control | tee debian/control
|
||||||
|
cp /src/debian/compat debian/
|
||||||
|
cp /src/debian/rules debian/
|
||||||
|
cp /src/Makefile ./
|
||||||
|
|
||||||
# build the deb
|
# build the deb
|
||||||
time dpkg-buildpackage -us -uc -b
|
time dpkg-buildpackage -us -uc -b
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash -eux
|
||||||
|
|
||||||
|
export PYTHON_RELEASE=2.7.16
|
||||||
|
export PYTHON_MAJOR=2.7.16
|
||||||
|
# export PYTHON_TARBALL="https://github.com/python/cpython/archive/v${PYTHON_RELEASE}.tar.gz"
|
||||||
|
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
|
||||||
|
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
|
||||||
|
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash -eux
|
||||||
|
|
||||||
export PYTHON_RELEASE=3.7.3
|
export PYTHON_RELEASE=3.7.3
|
||||||
|
export PYTHON_MAJOR=3.7
|
||||||
# export PYTHON_TARBALL="https://github.com/python/cpython/archive/v${PYTHON_RELEASE}.tar.gz"
|
# export PYTHON_TARBALL="https://github.com/python/cpython/archive/v${PYTHON_RELEASE}.tar.gz"
|
||||||
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
|
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
|
||||||
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
|
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash -eux
|
||||||
|
|
||||||
|
export PYTHON_RELEASE=3.8.0a4
|
||||||
|
export PYTHON_MAJOR=3.8.0a4
|
||||||
|
# export PYTHON_TARBALL="https://github.com/python/cpython/archive/v${PYTHON_RELEASE}.tar.gz"
|
||||||
|
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
|
||||||
|
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
|
||||||
|
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"
|
|
@ -1,5 +1,5 @@
|
||||||
extpython-python3.7 (3.7.3) unstable; urgency=low
|
extpython-python${PYTHON_MAJOR} (${PYTHON_RELEASE}) unstable; urgency=low
|
||||||
|
|
||||||
* Initial release
|
* Initial release
|
||||||
|
|
||||||
-- Dave Pedu <dave@davepedu.com> Thu, 30 May 2019 08:47:19 -0800
|
-- Dave Pedu <dave@davepedu.com> ${BUILD_DATE}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Source: extpython-python3.7
|
Source: extpython-python${PYTHON_MAJOR}
|
||||||
Section: unknown
|
Section: unknown
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: ubuntu <ubuntu@unknown>
|
Maintainer: ubuntu <ubuntu@unknown>
|
||||||
|
@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 8.0.0)
|
||||||
Standards-Version: 3.9.4
|
Standards-Version: 3.9.4
|
||||||
Homepage: <insert the upstream URL, if relevant>
|
Homepage: <insert the upstream URL, if relevant>
|
||||||
|
|
||||||
Package: extpython-python3.7
|
Package: extpython-python${PYTHON_MAJOR}
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
Description: <insert up to 60 chars description>
|
Description: <insert up to 60 chars description>
|
||||||
|
|
Loading…
Reference in New Issue