RedPanda-CPP/packages/archlinux/PKGBUILD.in

55 lines
1.5 KiB
Bash

_pkgname=RedPanda-CPP
pkgname=${_pkgname,,}-git
pkgver=__VERSION__
pkgrel=1
pkgdesc='A fast, lightweight, open source, and cross platform C++ IDE (development version)'
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64' 'riscv64')
url="https://github.com/royqh1979/$_pkgname"
license=('GPL3')
depends=(qt5-base qt5-svg gcc gdb astyle)
makedepends=(qt5-tools imagemagick librsvg)
optdepends=(
'clang: C/C++ compiler (alternative)'
)
conflicts=("${_pkgname,,}")
provides=("${_pkgname,,}")
source=(
"$_pkgname.tar.gz"
'compiler_hint.lua'
)
sha256sums=(
'SKIP'
'SKIP'
)
prepare() {
sed -i '/CONFIG += ENABLE_LUA_ADDON/ { s/^#\s*// }' RedPanda-CPP/RedPandaIDE/RedPandaIDE.pro
}
build() {
mkdir redpanda-build
cd redpanda-build
qmake \
PREFIX='/usr' \
LIBEXECDIR='/usr/lib' \
"$srcdir/$_pkgname/Red_Panda_CPP.pro"
make
}
package() {
local _libexecdir="$pkgdir/usr/lib/RedPandaCPP"
install -Dm644 "compiler_hint.lua" "$_libexecdir/compiler_hint.lua"
cd redpanda-build
make INSTALL_ROOT="$pkgdir" install
for size in 16 22 24 32 36 48 64 72 96 128 192 256 512; do
mkdir -p "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps"
magick convert \
-background none \
"$pkgdir/usr/share/icons/hicolor/scalable/apps/redpandaide.svg" \
-resize ${size}x${size} \
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/redpandaide.png"
done
}