summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergii Fesenko2022-08-29 19:08:01 +0300
committerSergii Fesenko2022-08-29 19:08:01 +0300
commit591f72e1528b8e65738ed713b079cebb4b191b7f (patch)
tree368a51fa1e9f8005106a3ad3f7101b17eb872695
parente3a3517a71bfd5fb906109fc1ab95dd999cfe46a (diff)
downloadaur-591f72e1528b8e65738ed713b079cebb4b191b7f.tar.gz
do not rely on git tags for versioning
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD40
2 files changed, 31 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 97e290b160fc..248129f97db4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = lite-xl-git
- pkgdesc = A lightweight text editor written in Lua
- pkgver = 2.0.4.r512.g16fcb2e7
+ pkgdesc = A lightweight text editor written in Lua (master branch)
+ pkgver = v2.1.0.r1967.c25f83da
pkgrel = 1
url = https://lite-xl.github.io/
arch = x86_64
@@ -13,7 +13,7 @@ pkgbase = lite-xl-git
depends = hicolor-icon-theme
provides = lite-xl
conflicts = lite-xl
- source = git+https://github.com/lite-xl/lite-xl
+ source = lite-xl::git+https://github.com/lite-xl/lite-xl
sha256sums = SKIP
pkgname = lite-xl-git
diff --git a/PKGBUILD b/PKGBUILD
index 8bc4105f6d7b..adeaf8d5b42d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,35 +2,51 @@
# PKGBUILD based on the one from https://aur.archlinux.org/packages/lite-xl
pkgname=lite-xl-git
-_pkgname=lite-xl
-pkgver=2.0.4.r512.g16fcb2e7
+_pkgname=${pkgname%-git}
+pkgver=v2.1.0.r1967.c25f83da
pkgrel=1
-pkgdesc='A lightweight text editor written in Lua'
+pkgdesc='A lightweight text editor written in Lua (master branch)'
arch=('x86_64')
url="https://lite-xl.github.io/"
license=('MIT')
-depends=('lua' 'sdl2' 'freetype2' 'pcre2' 'hicolor-icon-theme')
-makedepends=('meson>=0.58')
+depends=(
+ 'lua'
+ 'sdl2'
+ 'freetype2'
+ 'pcre2'
+ 'hicolor-icon-theme'
+)
+makedepends=('meson>=0.58' 'jq')
provides=("$_pkgname")
conflicts=("$_pkgname")
-source=("git+https://github.com/lite-xl/lite-xl")
+source=("${_pkgname}::git+https://github.com/lite-xl/lite-xl")
sha256sums=('SKIP')
pkgver() {
- cd "${srcdir}/${_pkgname}"
- git describe --tags --long --exclude 'testing*' | sed 's/^v//; s/\([^-]*-g\)/r\1/; s/-/./g'
+ cd "${_pkgname}"
+
+ # tags are not correct for 2.1.0, so try to reconstruct version
+ V=$(meson introspect --projectinfo _build | jq -r '.version')
+ CNT=$(git rev-list --count HEAD)
+ H=$(git rev-parse --short HEAD)
+ echo v${V}.r${CNT}.${H}
+
+ # git describe --tags --long --exclude 'testing*' | sed 's/^v//; s/\([^-]*-g\)/r\1/; s/-/./g'
}
+prepare() {
+ cd "${_pkgname}"
+ arch-meson _build
+}
build() {
cd "${_pkgname}"
- arch-meson build
- meson compile -C build
+ meson compile -C _build
}
package() {
- cd "$_pkgname"
- DESTDIR="$pkgdir" meson install --skip-subprojects -C build
+ cd "${_pkgname}"
+ DESTDIR="$pkgdir" meson install --skip-subprojects -C _build
mkdir -p "$pkgdir/usr/share/licenses/$pkgname/"
ln -s "/usr/share/doc/lite-xl/licenses.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"