aports/testing/sciteco/APKBUILD
Celeste 417346e3ce testing/sciteco: new aport
https://rhaberkorn.github.io/sciteco/
Advanced TECO dialect and interactive screen editor
2024-12-29 08:21:09 +00:00

112 lines
2.5 KiB
Text

# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=sciteco
pkgver=2.3.0
pkgrel=0
pkgdesc="Advanced TECO dialect and interactive screen editor"
url="https://rhaberkorn.github.io/sciteco/"
arch="all"
license="GPL-3.0-or-later"
depends="$pkgname-common=$pkgver-r$pkgrel"
makedepends="
bash
glib-dev
groff
gtk+3.0-dev
ncurses-dev
xvfb-run
"
subpackages="
$pkgname-common::noarch
$pkgname-doc
$pkgname-gtk
"
source="https://github.com/rhaberkorn/sciteco/releases/download/v$pkgver/sciteco-$pkgver.tar.gz"
prepare() {
default_prepare
update_config_sub
# after update_config_sub, using cp -r instead of cp -a
# will cause the build to depend on automake & autoconf
cp -a "$builddir" "$builddir-gtk"
}
_configure() {
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
"$@"
}
build() {
export CFLAGS="${CFLAGS//-Os/-O3} -flto=auto"
export CXXFLAGS="${CXXFLAGS//-Os/-O3} -flto=auto"
_configure \
--with-interface=ncurses
# shell needs to support $'\e', otherwise there will
# be unterminated command errors while building docs
make SHELL=bash
cd "$builddir-gtk"
_configure \
--with-interface=gtk \
--program-prefix=g
xvfb-run -a make SHELL=bash
}
check() {
make -j1 SHELL=bash check
xvfb-run -a make -C "$builddir-gtk" -j1 SHELL=bash check
}
package() {
xvfb-run -a make -C "$builddir-gtk" DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" install
rm -v "$pkgdir"/usr/share/sciteco/sciteco-*.png
local size; for size in 16 32 48 256; do
install -Dvm644 ico/sciteco-$size.png \
"$pkgdir"/usr/share/icons/hicolor/"$size"x"$size"/apps/sciteco.png
ln -sv ../icons/hicolor/"$size"x"$size"/apps/sciteco.png \
"$pkgdir"/usr/share/sciteco/sciteco-$size.png
done
install -Dvm644 src/sciteco.desktop \
-t "$pkgdir"/usr/share/applications/
}
common() {
pkgdesc="$pkgdesc (common files)"
depends=
amove \
usr/share/sciteco/lib \
usr/share/sciteco/sample.teco_ini \
usr/share/sciteco/sciteco.tmac
}
gtk() {
pkgdesc="$pkgdesc (graphical variant)"
amove \
usr/bin/ggrosciteco.tes \
usr/bin/gsciteco \
usr/bin/gtedoc.tes \
usr/share/applications/ \
usr/share/icons/hicolor/ \
usr/share/sciteco/fallback.css \
usr/share/sciteco/sciteco-*.png
}
sha512sums="
788c10a804663ca35c36ed1ab1b98e8975e44d2593a8bdf2ed0b3cf4815b843837a223899138fa26128865bd70dcc5e6e369ac1f69b74ad0ac6a6b8585e97229 sciteco-2.3.0.tar.gz
"