diff --git a/readme.md b/readme.md index 1180d9cef63254ac87c08cbccfdb9fc42c72ee89..7e5ff8fd1d8c8f78dae31bf20453a8c097557d27 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,34 @@ +#### 获取编译依赖 + +```shell +sudo dnf install rpm-build debootstrap dpkg -y +``` + +#### 下载 + +下载并解压到用户 Home 目录 + +##### 然后获取最新版本号 + +```shell +./rpmbuild/SPECS/get-ver.sh +``` + +##### 下载最新源码包 + +```shell +cd rpmbuild/SOURCES && ./get-tgz.sh && cd - +``` + +#### 构建 +```shell cd rpmbuild && rpmbuild -ba SPECS/bookworm-compatibility-mode.spec +``` + +#### 安装 + +```shell +cd rpmbuild/RPMS/*/ && sudo dnf install *.rpm -y +``` -# 构建之前需要先运行目录下的脚本获取相关资源 +#### 构建之前需要先运行目录下的脚本获取相关资源 diff --git a/rpmbuild/SPECS/bookworm-compatibility-mode.spec b/rpmbuild/SPECS/bookworm-compatibility-mode.spec index cabf3f6f616bb9f68e6f83442764b969b023b63f..2ef6098cc6150a41d39d7d14d4bb6b217ccc4be2 100644 --- a/rpmbuild/SPECS/bookworm-compatibility-mode.spec +++ b/rpmbuild/SPECS/bookworm-compatibility-mode.spec @@ -1,28 +1,44 @@ Name: cn.flamescion.bookworm-compatibility-mode -Version: 12.4.7 +Version: 12.4.9 Release: 1 Summary: A container app packaging and distributing solution. License: unknown URL: https://gitee.com/amber-compatability-environment/bookworm-compatibility-mode -Source0: %{version}.tar.gz +Source0: bookworm-compatibility-mode-%{version}.tar.gz BuildRequires: debootstrap, dpkg, bash, which, systemd-container Requires: bubblewrap, xdg-desktop-portal, flatpak, zenity, gcc %description -A container app packaging and distributing solution. +bwrap wrapper for install and running debs inside a bookworm container %prep %autosetup -p1 -n bookworm-compatibility-mode-%{version} %global debug_package %{nil} +%global _build_id_links none + +%pre +systemctl stop ace-auto-upgrade || true +systemctl disable ace-auto-upgrade || true %post /opt/apps/%{name}/files/bin/bookworm-init +systemctl daemon-reload +systemctl enable ace-auto-upgrade +systemctl start ace-auto-upgrade + +%preun +if [ "$1" = "0" ] +then + systemctl stop ace-auto-upgrade || true + systemctl disable ace-auto-upgrade || true +fi %postun -if [ "$1" = "0" ] || [ "$1" = "1" ]; then +if [ "$1" = "0" ] +then echo "清理卸载残留" - rm -rf /opt/apps/%{name} + rm -rf /opt/apps/%{name} || true else echo "非卸载,跳过清理" fi @@ -33,9 +49,11 @@ cp -r src/etc %{buildroot} cp -r src/usr %{buildroot} pushd %{buildroot}/opt/apps/%{name}/files -if [ "%{_target_cpu}" = "aarch64" ]; then +if [ "%{_target_cpu}" = "aarch64" ] +then bash build-container.sh arm64 -elif [ "%{_target_cpu}" = "x86_64" ]; then +elif [ "%{_target_cpu}" = "x86_64" ] +then bash build-container.sh amd64 else echo "Unsupportable arch!" @@ -45,14 +63,19 @@ popd %files %dir /opt/apps/%{name} /opt/apps/%{name}/* -/etc/X11/Xsession.d/20ACE-Bookworm -/etc/profile.d/ACE-Bookworm.sh +%attr(755,root,root) /etc/X11/Xsession.d/20ACE-Bookworm +%attr(755,root,root) /etc/profile.d/ACE-Bookworm.sh %{_bindir}/* +%attr(644,root,root) /usr/lib/systemd/system/ace-auto-upgrade.service %attr(755,root,root) /usr/lib/systemd/user-environment-generators/60-ACE-Bookworm %attr(755,root,root) /usr/share/applications/* /usr/share/icons/* /usr/share/polkit-1/actions/cn.flamescion.ace-uninstaller.policy %changelog +* Wed Feb 21 2024 懵仙兔兔 - 12.4.9-1 + - Supports rolling update function and automatically follows the latest upstream + - Added systemd dependencies and a systemd service, which will be started after installation + - Fix: WeChat Linux not running * Fri Jan 26 2024 懵仙兔兔 - 12.4.7-1 - First pello package