deb-packs/picom/package.sh

78 lines
2.3 KiB
Bash
Raw Normal View History

2024-08-30 10:47:47 +08:00
#!/bin/bash
app_name="picom-git"
tmp_dir="/tmp/${app_name}_tmp"
version="11.2"
release="v${version}"
deb_arch="amd64"
if [ -d "./unpack" ]; then
sudo rm -rf ./unpack
fi
if [ -f "./${app_name}_${version}.deb" ]; then
rm "./${app_name}_${version}.deb"
fi
# 创建临时待打包目录
echo "创建待打包目录..."
mkdir -p "./unpack/DEBIAN"
mkdir -p "./unpack/usr/bin"
mkdir -p "./unpack/usr/share/applications"
mkdir -p "./unpack/usr/share/doc/picom"
mkdir -p "./unpack/usr/share/man/man1"
source_dir=/data/docker/picom
echo "复制编译好的文件..."
cp -v "${source_dir}/build/src/picom" ./unpack/usr/bin/
cp -v "${source_dir}/bin/picom-trans" ./unpack/usr/bin/
cp -v "${source_dir}/build/man/picom.1" ./unpack/usr/share/man/man1/
cp -v "${source_dir}/build/man/picom-trans.1" ./unpack/usr/share/man/man1/
cp -v "${source_dir}/picom.desktop" ./unpack/usr/share/applications/
cp -v "${source_dir}/picom.sample.conf" ./unpack/usr/share/doc/picom/
echo "复制完成, 计算文件md5..."
cd ./unpack
strip -s usr/bin/picom
find usr/ -type f | xargs md5sum > DEBIAN/md5sums
echo """
Package: ${app_name}
Version: ${version}
Section: X11
Installed-Size: ${size[0]}
Architecture: ${deb_arch}
Depends: python3, libc6 (>= 2.33), libconfig9, libdbus-1-3 (>= 1.9.14), libev4 (>= 1:4.04), libgl1, libpcre3, libpixman-1-0 (>= 0.25.2), libx11-6, libx11-xcb1 (>= 2:1.7.5), libxcb-composite0, libxcb-damage0, libxcb-glx0, libxcb-image0 (>= 0.2.1), libxcb-present0, libxcb-randr0 (>= 1.10), libxcb-render-util0, libxcb-render0 (>= 1.12), libxcb-shape0, libxcb-sync1, libxcb-xfixes0, libxcb-xinerama0, libxcb1 (>= 1.9.2), libxcb-dpms0
Breaks: picom
Replaces: picom
Provides: picom
Maintainer: Yutent <yutent.io@gmail.com>
Priority: optional
Homepage: https://github.com/yshui/picom
Description: lightweight compositor for X11
picom is a compositor for X11, based on xcompmgr. In addition to shadows,
fading and translucency, picom implements window frame opacity control,
inactive window transparency, and shadows on argb windows.
.
picom is a fork of compton as it seems to have become unmaintained.
""" > DEBIAN/control
echo '计算文件md5完成, 打包中...'
cd ..
sudo chown -R root:root unpack
dpkg-deb -b ./unpack "./${app_name}-${deb_arch}_${version}.deb"
sudo rm -rf ./unpack
echo "打包完成 :)"