add RPM package (#150)
This commit is contained in:
parent
1c23010408
commit
adbbf96733
|
@ -197,6 +197,48 @@ jobs:
|
||||||
name: Arch Linux
|
name: Arch Linux
|
||||||
path: dist/*.pkg.tar.zst
|
path: dist/*.pkg.tar.zst
|
||||||
|
|
||||||
|
rpm_fedora:
|
||||||
|
name: RPM on latest Fedora
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Fetch container image
|
||||||
|
run: |
|
||||||
|
podman pull --platform linux/amd64 docker.io/amd64/fedora:latest
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
podman run --rm -e SOURCE_DIR=/src -v $GITHUB_WORKSPACE:/src --platform linux/amd64 docker.io/amd64/fedora:latest /src/packages/fedora/01-in-docker.sh
|
||||||
|
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: RPM on latest Fedora
|
||||||
|
path: dist/*.rpm
|
||||||
|
|
||||||
|
rpm_opensuse:
|
||||||
|
name: RPM on openSUSE Tumbleweed
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Fetch container image
|
||||||
|
run: |
|
||||||
|
podman pull --platform linux/amd64 docker.io/opensuse/tumbleweed:latest
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
podman run --rm -e SOURCE_DIR=/src -v $GITHUB_WORKSPACE:/src --platform linux/amd64 docker.io/opensuse/tumbleweed:latest /src/packages/opensuse/01-in-docker.sh
|
||||||
|
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: RPM on openSUSE Tumbleweed
|
||||||
|
path: dist/*.rpm
|
||||||
|
|
||||||
macos_x86_64:
|
macos_x86_64:
|
||||||
name: macOS x86_64
|
name: macOS x86_64
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
48
BUILD.md
48
BUILD.md
|
@ -335,6 +335,54 @@ Enter `RedPandaIDE` to launch RedPanda C++.
|
||||||
|
|
||||||
Note that makepkg checks out HEAD of the repo, so any change should be committed before building.
|
Note that makepkg checks out HEAD of the repo, so any change should be committed before building.
|
||||||
|
|
||||||
|
## Fedora
|
||||||
|
|
||||||
|
1. Install dependency:
|
||||||
|
```bash
|
||||||
|
sudo dnf install \
|
||||||
|
gcc gcc-c++ rpm-build rpmdevtools git \
|
||||||
|
glibc-static libstdc++-static libasan \
|
||||||
|
qt5-qtbase-devel qt5-qtsvg-devel qt5-qttools-devel
|
||||||
|
|
||||||
|
rpmdev-setuptree # first time only
|
||||||
|
```
|
||||||
|
2. Build the package:
|
||||||
|
```bash
|
||||||
|
./packages/fedora/buildrpm.sh
|
||||||
|
```
|
||||||
|
3. Install the package:
|
||||||
|
```bash
|
||||||
|
sudo dnf install ~/rpmbuild/RPMS/$(uname -m)/redpanda-cpp-git-*.rpm
|
||||||
|
```
|
||||||
|
4. Run Red Panda C++:
|
||||||
|
```bash
|
||||||
|
RedPandaIDE
|
||||||
|
```
|
||||||
|
|
||||||
|
## openSUSE
|
||||||
|
|
||||||
|
1. Install dependency:
|
||||||
|
```bash
|
||||||
|
sudo zypper in \
|
||||||
|
gcc gcc-c++ rpm-build rpmdevtools git \
|
||||||
|
glibc-devel-static \
|
||||||
|
libqt5svg5-dev qtbase5-dev qtbase5-dev-tools qttools5-dev-tools
|
||||||
|
|
||||||
|
rpmdev-setuptree # first time only
|
||||||
|
```
|
||||||
|
2. Build the package:
|
||||||
|
```bash
|
||||||
|
./packages/opensuse/buildrpm.sh
|
||||||
|
```
|
||||||
|
3. Install the package:
|
||||||
|
```bash
|
||||||
|
sudo zypper --no-gpg-checks in ~/rpmbuild/RPMS/$(uname -m)/redpanda-cpp-git-*.rpm
|
||||||
|
```
|
||||||
|
4. Run Red Panda C++:
|
||||||
|
```bash
|
||||||
|
RedPandaIDE
|
||||||
|
```
|
||||||
|
|
||||||
## Linux AppImage
|
## Linux AppImage
|
||||||
|
|
||||||
1. Install dependency: Docker or Podman.
|
1. Install dependency: Docker or Podman.
|
||||||
|
|
48
BUILD_cn.md
48
BUILD_cn.md
|
@ -335,6 +335,54 @@ Windows 宿主的额外要求:
|
||||||
|
|
||||||
注意:makepkg 签出此存储库的 HEAD,因此构建之前务必提交所有变更。
|
注意:makepkg 签出此存储库的 HEAD,因此构建之前务必提交所有变更。
|
||||||
|
|
||||||
|
## Fedora
|
||||||
|
|
||||||
|
1. 安装依赖包:
|
||||||
|
```bash
|
||||||
|
sudo dnf install \
|
||||||
|
gcc gcc-c++ rpm-build rpmdevtools git \
|
||||||
|
glibc-static libstdc++-static libasan \
|
||||||
|
qt5-qtbase-devel qt5-qtsvg-devel qt5-qttools-devel
|
||||||
|
|
||||||
|
rpmdev-setuptree # 仅第一次
|
||||||
|
```
|
||||||
|
2. 构建 rpm 包:
|
||||||
|
```bash
|
||||||
|
./packages/fedora/buildrpm.sh
|
||||||
|
```
|
||||||
|
3. 安装 rpm 包:
|
||||||
|
```bash
|
||||||
|
sudo dnf install ~/rpmbuild/RPMS/$(uname -m)/redpanda-cpp-git-*.rpm
|
||||||
|
```
|
||||||
|
4. 运行小熊猫 C++:
|
||||||
|
```bash
|
||||||
|
RedPandaIDE
|
||||||
|
```
|
||||||
|
|
||||||
|
## openSUSE
|
||||||
|
|
||||||
|
1. 安装依赖包:
|
||||||
|
```bash
|
||||||
|
sudo zypper in \
|
||||||
|
gcc gcc-c++ rpm-build rpmdevtools git \
|
||||||
|
glibc-devel-static \
|
||||||
|
libqt5svg5-dev qtbase5-dev qtbase5-dev-tools qttools5-dev-tools
|
||||||
|
|
||||||
|
rpmdev-setuptree # 仅第一次
|
||||||
|
```
|
||||||
|
2. 构建 rpm 包:
|
||||||
|
```bash
|
||||||
|
./packages/opensuse/buildrpm.sh
|
||||||
|
```
|
||||||
|
3. 安装 rpm 包:
|
||||||
|
```bash
|
||||||
|
sudo zypper --no-gpg-checks in ~/rpmbuild/RPMS/$(uname -m)/redpanda-cpp-git-*.rpm
|
||||||
|
```
|
||||||
|
4. 运行小熊猫 C++:
|
||||||
|
```bash
|
||||||
|
RedPandaIDE
|
||||||
|
```
|
||||||
|
|
||||||
## Linux AppImage
|
## Linux AppImage
|
||||||
|
|
||||||
1. 安装依赖包:Docker 或 Podman。
|
1. 安装依赖包:Docker 或 Podman。
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -xeuo pipefail
|
||||||
|
|
||||||
|
dnf install -y \
|
||||||
|
gcc gcc-c++ rpm-build rpmdevtools git \
|
||||||
|
glibc-static libstdc++-static libasan \
|
||||||
|
qt5-qtbase-devel qt5-qtsvg-devel qt5-qttools-devel
|
||||||
|
rpmdev-setuptree
|
||||||
|
|
||||||
|
cd $SOURCE_DIR
|
||||||
|
./packages/fedora/buildrpm.sh
|
||||||
|
|
||||||
|
mkdir -p $SOURCE_DIR/dist
|
||||||
|
cp ~/rpmbuild/RPMS/$(uname -m)/redpanda-cpp-git-*.rpm $SOURCE_DIR/dist/
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -xeuo pipefail
|
||||||
|
|
||||||
|
SPECDIR=$(rpm --eval %{_specdir})
|
||||||
|
BUILDDIR=$(rpm --eval %{_builddir})/redpanda-cpp-git
|
||||||
|
VERSION=$(git describe --long --tags --always | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')
|
||||||
|
|
||||||
|
sed -s "s/__VERSION__/$VERSION/g" packages/fedora/redpanda-cpp-git.spec.in >$SPECDIR/redpanda-cpp-git.spec
|
||||||
|
|
||||||
|
[[ -d $BUILDDIR ]] && rm -rf $BUILDDIR
|
||||||
|
|
||||||
|
rpmbuild --define "_sourcedir $(pwd)" -bb $SPECDIR/redpanda-cpp-git.spec
|
|
@ -0,0 +1,44 @@
|
||||||
|
Name: redpanda-cpp-git
|
||||||
|
Version: __VERSION__
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: A fast, lightweight, open source, and cross platform C++ IDE
|
||||||
|
License: GPLv3+
|
||||||
|
URL: https://github.com/royqh1979/RedPanda-CPP
|
||||||
|
|
||||||
|
BuildRequires: gcc gcc-c++
|
||||||
|
BuildRequires: qt5-qtbase-devel qt5-qtsvg-devel qt5-qttools-devel
|
||||||
|
Requires: gcc gcc-c++
|
||||||
|
Requires: glibc-static libstdc++-static libasan
|
||||||
|
Requires: qt5-qtbase qt5-qtsvg
|
||||||
|
|
||||||
|
%description
|
||||||
|
A lightweight but powerful C/C++ IDE
|
||||||
|
|
||||||
|
Red Panda C++ (Old name Red Panda Dev-C++ 7) is a full featured C/C++ IDE.
|
||||||
|
It's the succesor of Red Panda Dev-C++ 6, which is developed by Delphi 7 and
|
||||||
|
can only running under Windows.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
mkdir -p %{name}
|
||||||
|
cd %{name}
|
||||||
|
qmake-qt5 \
|
||||||
|
PREFIX=/usr \
|
||||||
|
XDG_ADAPTIVE_ICON=ON \
|
||||||
|
"%{_sourcedir}/Red_Panda_CPP.pro"
|
||||||
|
make %{_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
cd %{name}
|
||||||
|
make INSTALL_ROOT="%{buildroot}" install
|
||||||
|
|
||||||
|
%files
|
||||||
|
/usr/bin/RedPandaIDE
|
||||||
|
/usr/libexec/RedPandaCPP/*
|
||||||
|
/usr/share/RedPandaCPP/*
|
||||||
|
/usr/share/doc/RedPandaCPP/*
|
||||||
|
/usr/share/applications/redpandaide.desktop
|
||||||
|
/usr/share/icons/hicolor/scalable/apps/redpandaide.svg
|
||||||
|
|
||||||
|
%changelog
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -xeuo pipefail
|
||||||
|
|
||||||
|
DISTRO_ID=$(grep ^ID= /etc/os-release | cut -d= -f2- | tr -d '"')
|
||||||
|
VERSION_ID=$(grep ^VERSION_ID= /etc/os-release | cut -d= -f2- | tr -d '"')
|
||||||
|
|
||||||
|
zypper in -y \
|
||||||
|
gcc gcc-c++ rpm-build rpmdevtools git \
|
||||||
|
glibc-devel-static \
|
||||||
|
libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qttools-devel
|
||||||
|
rpmdev-setuptree
|
||||||
|
|
||||||
|
cd $SOURCE_DIR
|
||||||
|
./packages/opensuse/buildrpm.sh
|
||||||
|
|
||||||
|
file=$(ls ~/rpmbuild/RPMS/$(uname -m)/redpanda-cpp-git-*.rpm)
|
||||||
|
basename=$(basename $file)
|
||||||
|
|
||||||
|
mkdir -p $SOURCE_DIR/dist
|
||||||
|
cp $file $SOURCE_DIR/dist/${basename/.rpm/.$DISTRO_ID$VERSION_ID.rpm}
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -xeuo pipefail
|
||||||
|
|
||||||
|
SPECDIR=$(rpm --eval %{_specdir})
|
||||||
|
BUILDDIR=$(rpm --eval %{_builddir})/redpanda-cpp-git
|
||||||
|
VERSION=$(git describe --long --tags --always | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')
|
||||||
|
|
||||||
|
sed -s "s/__VERSION__/$VERSION/g" packages/opensuse/redpanda-cpp-git.spec.in >$SPECDIR/redpanda-cpp-git.spec
|
||||||
|
|
||||||
|
[[ -d $BUILDDIR ]] && rm -rf $BUILDDIR
|
||||||
|
|
||||||
|
rpmbuild --define "_sourcedir $(pwd)" -bb $SPECDIR/redpanda-cpp-git.spec
|
|
@ -0,0 +1,44 @@
|
||||||
|
Name: redpanda-cpp-git
|
||||||
|
Version: __VERSION__
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: A fast, lightweight, open source, and cross platform C++ IDE
|
||||||
|
License: GPLv3+
|
||||||
|
URL: https://github.com/royqh1979/RedPanda-CPP
|
||||||
|
|
||||||
|
BuildRequires: gcc gcc-c++
|
||||||
|
BuildRequires: libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qttools-devel
|
||||||
|
Requires: gcc gcc-c++
|
||||||
|
Requires: glibc-devel-static
|
||||||
|
Requires: libQt5Core5 libQt5Gui5 libQt5Svg5
|
||||||
|
|
||||||
|
%description
|
||||||
|
A lightweight but powerful C/C++ IDE
|
||||||
|
|
||||||
|
Red Panda C++ (Old name Red Panda Dev-C++ 7) is a full featured C/C++ IDE.
|
||||||
|
It's the succesor of Red Panda Dev-C++ 6, which is developed by Delphi 7 and
|
||||||
|
can only running under Windows.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
mkdir -p %{name}
|
||||||
|
cd %{name}
|
||||||
|
qmake-qt5 \
|
||||||
|
PREFIX=/usr \
|
||||||
|
XDG_ADAPTIVE_ICON=ON \
|
||||||
|
"%{_sourcedir}/Red_Panda_CPP.pro"
|
||||||
|
make %{_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
cd %{name}
|
||||||
|
make INSTALL_ROOT="%{buildroot}" install
|
||||||
|
|
||||||
|
%files
|
||||||
|
/usr/bin/RedPandaIDE
|
||||||
|
/usr/libexec/RedPandaCPP/*
|
||||||
|
/usr/share/RedPandaCPP/*
|
||||||
|
/usr/share/doc/RedPandaCPP/*
|
||||||
|
/usr/share/applications/redpandaide.desktop
|
||||||
|
/usr/share/icons/hicolor/scalable/apps/redpandaide.svg
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue