38 lines
905 B
Plaintext
38 lines
905 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
set -e
|
||
|
|
||
|
PYTHON_PACKAGEVERSION=$(../syndicate-py/print-package-version)
|
||
|
DIRTY=
|
||
|
if ! (cd ../syndicate-py && git diff-index --quiet HEAD --)
|
||
|
then
|
||
|
DIRTY=+
|
||
|
fi
|
||
|
GITSUFFIX=$(cd ../syndicate-py && 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 ../syndicate-py && . ./.envrc && make build-only)
|
||
|
|
||
|
rm -rf build.python
|
||
|
mkdir build.python
|
||
|
|
||
|
(
|
||
|
cd build.python
|
||
|
tar -zxvf ../../syndicate-py/dist/syndicate-py-${PYTHON_PACKAGEVERSION}.tar.gz
|
||
|
(
|
||
|
cd syndicate-py-${PYTHON_PACKAGEVERSION}
|
||
|
cp -a ../../debian .
|
||
|
cat > ./debian/changelog <<EOF
|
||
|
syndicate-py (${VERSION}) UNRELEASED; urgency=low
|
||
|
|
||
|
* Unofficial debian packaging of Python Syndicate
|
||
|
|
||
|
-- Tony Garnock-Jones <tonyg@leastfixedpoint.com> $(date --rfc-email)
|
||
|
EOF
|
||
|
|
||
|
dpkg-buildpackage
|
||
|
)
|
||
|
cp *.deb ..
|
||
|
)
|