python3-webengine-gtk3/build.sh

26 lines
553 B
Bash
Raw Normal View History

2023-08-31 16:57:55 +08:00
#!/bin/bash
version=$(python3 -c "import sys; sys.path.insert(0, './usr/lib/python3/dist-packages/');from webengine.gtk3 import version;print(version)")
2023-08-31 16:57:55 +08:00
if [ -d unpack ]; then
sudo rm -rf unpack
fi
mkdir -p unpack/DEBIAN
cp debian/control unpack/DEBIAN/
cp -r usr unpack/
cd unpack
2023-09-05 14:56:01 +08:00
find usr -type f | xargs md5sum > DEBIAN/md5sums
_size=$(du -d 0 usr | cut -f1)
sed -i "s/{{size}}/${_size}/" DEBIAN/control
sed -i "s/{{version}}/${version}/" DEBIAN/control
2023-08-31 16:57:55 +08:00
cd ..
dpkg-deb -b unpack/ "python3-webengine-gtk3-${version}.deb"
sudo rm -rf unpack