From 6f734071a1dacdc6bb906e5acfa7cb278ad46167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D1=80=D0=B0=D1=85=D0=B8=D1=9A=D0=B0=20=D0=A0?= =?UTF-8?q?=D0=B0=D0=B4=D0=B8=D1=9B?= Date: Wed, 6 Mar 2024 10:00:01 +0100 Subject: [PATCH] Add check, optdepends, checkdepends MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Страхиња Радић --- .SRCINFO | 7 ++++++- PKGBUILD | 19 ++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index fa9cdd20bc8e..94767e812409 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,10 +1,15 @@ pkgbase = sled pkgdesc = Simple text editor pkgver = 0.12.5 - pkgrel = 1 + pkgrel = 2 url = https://strahinja.srht.site/sled arch = x86_64 license = GPL3 + checkdepends = perl + checkdepends = expect + optdepends = katex: For math mode + optdepends = git: For {git-log} + optdepends = imagemagick: For img tag attributes source = sled-0.12.5.tar.gz::https://git.sr.ht/~strahinja/sled/archive/v0.12.5.tar.gz md5sums = bc71a6663167ddd41d4afabdc255e689 diff --git a/PKGBUILD b/PKGBUILD index 2328c5526639..b409a8bdb6c9 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,15 +1,26 @@ # Maintainer: Strahinya Radich pkgname=sled pkgver=0.12.5 -pkgrel=1 +pkgrel=2 pkgdesc="Simple text editor" arch=('x86_64') url="https://strahinja.srht.site/sled" license=('GPL3') source=("$pkgname-$pkgver.tar.gz::https://git.sr.ht/~strahinja/sled/archive/v$pkgver.tar.gz") md5sums=('bc71a6663167ddd41d4afabdc255e689') +optdepends=( + 'katex: For math mode' + 'git: For {git-log}' + 'imagemagick: For img tag attributes' +) +checkdepends=( + 'perl' + 'expect' +) build() { + # Might need to add --nocheck to makepkg on systems using pacman only + # for test (Alpine) cd $pkgname-v$pkgver # Example on how to apply patches: dark theme patch (uncomment last @@ -20,6 +31,12 @@ build() { # Example on how to disable configuration options: turn off wrap # (uncomment next line) #sed -i 's,^\(#define ENABLE_WRAP\),//\1,' config.h + FALLBACKVER=$pkgver-$pkgrel PREFIX="$pkgdir/usr" make -e all +} + +check() { + cd $pkgname-v$pkgrel + make test } package() {