python3-webengine-gtk3/build.sh

28 lines
635 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
find usr -type d -name __pycache__ | xargs rm -rf
2023-08-31 16:57:55 +08:00
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 ..
2023-09-11 14:31:18 +08:00
sudo chown -R root:root unpack/
2023-08-31 16:57:55 +08:00
dpkg-deb -b unpack/ "python3-webengine-gtk3-${version}.deb"
sudo rm -rf unpack