From b24e660ff979b227d89f0e13bd819c6eafd55b76 Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 30 Aug 2024 10:47:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0picom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- picom/package.sh | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 picom/package.sh diff --git a/picom/package.sh b/picom/package.sh new file mode 100755 index 0000000..680a983 --- /dev/null +++ b/picom/package.sh @@ -0,0 +1,78 @@ +#!/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 +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 "打包完成 :)" \ No newline at end of file