2023-04-26 00:47:37 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
DIR=$(mktemp -d)
|
|
|
|
SRC=$(pwd)
|
|
|
|
|
2023-04-26 15:58:10 +02:00
|
|
|
echo "Making headers"
|
|
|
|
make headers
|
|
|
|
|
2023-04-26 00:47:37 +02:00
|
|
|
cd $DIR
|
|
|
|
|
|
|
|
echo "Copying python module"
|
|
|
|
cp -a $SRC/* .
|
|
|
|
mkdir -p libolm
|
|
|
|
echo "Cleaning sources"
|
|
|
|
make clean > /dev/null
|
|
|
|
cp -a $SRC/include .
|
|
|
|
echo "Copying libolm sources"
|
|
|
|
for src in cmake CMakeLists.txt common.mk include lib Makefile olm.pc.in src tests; do
|
|
|
|
cp -a $SRC/../$src libolm
|
|
|
|
done
|
|
|
|
find libolm -name \*~ -delete
|
|
|
|
find libolm -name \#\*\# -delete
|
|
|
|
|
|
|
|
echo "Building"
|
|
|
|
patch -p1 < $SRC/packaging.diff
|
2023-11-22 03:25:55 +01:00
|
|
|
python3 -m build -s
|
2023-04-26 00:47:37 +02:00
|
|
|
|
|
|
|
echo "Copying result"
|
|
|
|
mkdir -p $SRC/dist
|
|
|
|
cp dist/* $SRC/dist
|
|
|
|
|
|
|
|
echo "Cleaning up"
|
|
|
|
cd $SRC
|
|
|
|
rm -rf $DIR
|