38 lines
887 B
Bash
Executable File
38 lines
887 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
PYTHON_PACKAGEVERSION=$(../implementations/python/print-package-version)
|
|
DIRTY=
|
|
if ! git diff-index --quiet HEAD --
|
|
then
|
|
DIRTY=+
|
|
fi
|
|
GITSUFFIX=$(git log --date=format:%Y%m%d%H%M%S --pretty=~git%cd.%h -1)
|
|
VERSION=${PYTHON_PACKAGEVERSION}${GITSUFFIX}${DIRTY}
|
|
|
|
echo "Building deb for ${VERSION}"
|
|
(cd ../implementations/python && . ./.envrc && make build-only)
|
|
|
|
rm -rf build.python
|
|
mkdir build.python
|
|
|
|
(
|
|
cd build.python
|
|
tar -zxvf ../../implementations/python/dist/preserves-${PYTHON_PACKAGEVERSION}.tar.gz
|
|
(
|
|
cd preserves-${PYTHON_PACKAGEVERSION}
|
|
cp -a ../../python ./debian
|
|
cat > ./debian/changelog <<EOF
|
|
preserves (${VERSION}) UNRELEASED; urgency=low
|
|
|
|
* Unofficial debian packaging of Python Preserves
|
|
|
|
-- Tony Garnock-Jones <tonyg@leastfixedpoint.com> $(date --rfc-email)
|
|
EOF
|
|
|
|
dpkg-buildpackage
|
|
)
|
|
cp *.deb ..
|
|
)
|