新增rpm包自动构建工程

This commit is contained in:
gfdgd xi 2024-02-02 13:49:01 +08:00
parent 586b6efb59
commit b0e62a888c
4 changed files with 51 additions and 13 deletions

29
.github/workflows/auto-building-rpm.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Auto Building Wine Runnerrpm
run-name: ${{ github.actor }} Auto Building Wine Runnerrpm 🚀
on:
push:
workflow_dispatch:
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- name: Building RPM
env:
GUSER: ${{ secrets.GUSER }}
PASSWORD: ${{ secrets.PASSWORD }}
UPLOADURL: ${{ secrets.UPLOADURL }}
run: |
# 配置环境
sudo apt update
sudo apt install git dpkg-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qt5-qmake rpm -y
git clone https://github.com/gfdgd-xi/deep-wine-runner
cd deep-wine-runner
make package-rpm
mv spark-deepin-wine-runner*.rpm /home/runner/spark-deepin-wine-runner.rpm
- name: upload result
uses: actions/upload-artifact@v1
with:
name: spark-deepin-wine-runner.deb
path: /home/runner/spark-deepin-wine-runner.rpm

View File

@ -18,9 +18,16 @@ clean:
#package-rpm:
package-rpm:
sudo rpmbuild -bb rpm/spark-deepin-wine-runner.spec
sudo cp /root/rpmbuild/RPMS/x86_64/spark-deepin-wine-runner-*.rpm .
sudo rm -rf /root/rpmbuild/
sudo rm -rf /tmp/deep-wine-runner-builder-source
mkdir /tmp/deep-wine-runner-builder-source -pv
cp * /tmp/deep-wine-runner-builder-source -rv
cp rpm/spark-deepin-wine-runner.spec /tmp/spark-deepin-wine-runner.spec
bash builddeb/ChangeDebVersion.sh
sudo rpmbuild -bb /tmp/spark-deepin-wine-runner.spec --target noarch
sudo bash -c 'cp /root/rpmbuild/RPMS/noarch/spark-deepin-wine-runner-*.rpm .'
sudo rm -rf /root/rpmbuild/
sudo rm -rf /tmp/deep-wine-runner-builder-source
package-pkg:
#sudo debtap -u
@ -35,7 +42,6 @@ package-deb:
mkdir deb/opt/apps/deepin-wine-runner/LANG -pv
cp -rv helperset deb/opt/apps/deepin-wine-runner/
#cp -rv VM-source/VirtualMachine VM
cp -rv VM-source/deepin-wine-runner.svg VM
cp -rv VM-source/Windows7X64Auto.iso VM
cp -rv VM-source/Windows7X86Auto.iso VM

View File

@ -3,5 +3,10 @@
cd `dirname $0`
export PROGRAMVERSION=`python3 GetProgramVersion.py`
export SIZE=`du /tmp/spark-deepin-wine-runner-builder/ | tail -n1 | awk '{print $1}'`
sed -i "s%@@VERSION@@%$PROGRAMVERSION%g" /tmp/spark-deepin-wine-runner-builder/DEBIAN/control
sed -i "s%@@SIZE@@%$SIZE%g" /tmp/spark-deepin-wine-runner-builder/DEBIAN/control
if [[ -f /tmp/spark-deepin-wine-runner-builder/DEBIAN/control ]]; then
sed -i "s%@@VERSION@@%$PROGRAMVERSION%g" /tmp/spark-deepin-wine-runner-builder/DEBIAN/control
sed -i "s%@@SIZE@@%$SIZE%g" /tmp/spark-deepin-wine-runner-builder/DEBIAN/control
fi
if [[ -f /tmp/spark-deepin-wine-runner.spec ]]; then
sed -i "s%@@VERSION@@%$PROGRAMVERSION%g" /tmp/spark-deepin-wine-runner.spec
fi

View File

@ -1,7 +1,8 @@
Summary: 它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装、创建、分区等操作也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低)。
Name: spark-deepin-wine-runner
Version: 3.6.1
Release: 200
Version: @@VERSION@@
Release: 0
BuildArch: noarch
License: GPLv3+
AutoReqProv: no
URL: https://gitee.com/gfdgd-xi/deep-wine-runner
@ -14,7 +15,6 @@ Requires: aria2
Requires: curl
Requires: unrar
Requires: unzip
Requires: python3-pyqt6
Requires: python3-psutil
Requires: python3-requests
Requires: deepin-terminal
@ -29,9 +29,9 @@ Requires: zenity
Requires: tree
Requires: dpkg
Requires: fakeroot
Requires: python3-pyqt6-webengine
Requires: qemu
%define _binaries_in_noarch_packages_terminate_build 0
%define __os_install_post %{nil}
%description
Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作且安装过程较为繁琐对小白不友好。于是该运行器为了解决该痛点内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。
@ -41,12 +41,10 @@ Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程
%prep
%build
git clone https://gitlink.org.cn/gfdgd_xi/deep-wine-runner --depth=1 | true
cd deep-wine-runner
git pull
cd /tmp/deep-wine-runner-builder-source
make package-deb -j4
%install
cd deep-wine-runner
cd /tmp/deep-wine-runner-builder-source
dpkg -x spark-deepin-wine-runner.deb ~/rpmbuild/BUILDROOT/*
chmod 0755 -Rv ~/rpmbuild/BUILDROOT/*/opt
chmod 777 -Rv ~/rpmbuild/BUILDROOT/*/opt/apps/deepin-wine-runner