Initial commit of Python Syndicate debian packaging scripts

This commit is contained in:
Tony Garnock-Jones 2024-03-29 13:20:47 +01:00
commit cbb1d652ee
5 changed files with 69 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/build.python/
/*.deb

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
PYTHON_PACKAGEVERSION := $(shell ../syndicate-py/print-package-version)
all: python3-syndicate_$(PYTHON_PACKAGEVERSION)_all.deb
python3-syndicate_%_all.deb:
./build-python-deb
clean:
rm -f *.deb
rm -rf build.*

37
build-python-deb Executable file
View File

@ -0,0 +1,37 @@
#!/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 ..
)

14
debian/control vendored Normal file
View File

@ -0,0 +1,14 @@
Source: syndicate-py
Section: python
Priority: optional
Maintainer: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
Build-Depends: debhelper-compat (= 12), python3, dh-python, pybuild-plugin-pyproject, python3-preserves
Standards-Version: 3.9.3
Homepage: https://syndicate-lang.org/
Vcs-Git: https://git.syndicate-lang.org/syndicate-lang/syndicate-py.git
Vcs-Browser: https://git.syndicate-lang.org/syndicate-lang/syndicate-py
Package: python3-syndicate
Architecture: all
Depends: ${python3:Depends}, python3-preserves
Description: Python implementation of the Syndicated Actor Model

6
debian/rules vendored Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
export PYBUILD_NAME=syndicate
%:
dh $@ --with python3 --buildsystem=pybuild