git » kcolorpicker.git » commit 58d1dba

upgpkg: 0.3.1-2: Keep Qt5 version

author Antonio Rojas
2024-03-01 17:52:35 UTC
committer Antonio Rojas
2024-03-01 17:52:35 UTC
parent a30461ff4993fe3ce7770871225e6d8789d58c80

upgpkg: 0.3.1-2: Keep Qt5 version

.SRCINFO +16 -4
PKGBUILD +27 -9

diff --git a/.SRCINFO b/.SRCINFO
index 510027e..358ed46 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,29 @@
 pkgbase = kcolorpicker
 	pkgdesc = Qt based Color Picker with popup menu
 	pkgver = 0.3.1
-	pkgrel = 1
+	pkgrel = 2
 	url = https://github.com/DamirPorobic/kColorPicker
 	arch = x86_64
 	license = LGPL-3.0-only
 	makedepends = cmake
+	makedepends = qt5-base
+	makedepends = qt6-base
 	depends = gcc-libs
 	depends = glibc
-	depends = qt6-base
-	conflicts = kcolorpicker-qt6
-	replaces = kcolorpicker-qt6
 	source = https://github.com/ksnip/kColorPicker/archive/v0.3.1/kcolorpicker-0.3.1.tar.gz
 	sha256sums = e78c785ec4a8a22a48a91835c97601f5704b5076b154415353b0d2697dc0b4f7
 
 pkgname = kcolorpicker
+	depends = gcc-libs
+	depends = glibc
+	depends = qt6-base
+	conflicts = kcolorpicker-qt5
+	conflicts = kcolorpicker-qt6
+	replaces = kcolorpicker-qt6
+
+pkgname = kcolorpicker-qt5
+	depends = gcc-libs
+	depends = glibc
+	depends = qt5-base
+	conflicts = kcolorpicker
+	replaces = kcolorpicker
diff --git a/PKGBUILD b/PKGBUILD
index d957928..d4fd894 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,29 @@
 # Maintainer: Antonio Rojas <arojas@archlinux.org>
 # Contributor: dracorp aka Piotr Rogoza <piotr.r.public at gmail.com>
 
-pkgname=kcolorpicker
+pkgbase=kcolorpicker
+pkgname=(kcolorpicker
+         kcolorpicker-qt5)
 pkgver=0.3.1
-pkgrel=1
+pkgrel=2
 pkgdesc='Qt based Color Picker with popup menu'
 arch=(x86_64)
 url='https://github.com/DamirPorobic/kColorPicker'
 license=(LGPL-3.0-only)
 depends=(gcc-libs
-         glibc
-         qt6-base)
-makedepends=(cmake)
-conflicts=(kcolorpicker-qt6)
-replaces=(kcolorpicker-qt6)
-source=(https://github.com/ksnip/kColorPicker/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
+         glibc)
+makedepends=(cmake
+             qt5-base
+             qt6-base)
+source=(https://github.com/ksnip/kColorPicker/archive/v$pkgver/$pkgbase-$pkgver.tar.gz)
 sha256sums=('e78c785ec4a8a22a48a91835c97601f5704b5076b154415353b0d2697dc0b4f7')
 
 build() {
+  cmake -B build5 -S kColorPicker-$pkgver \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DBUILD_SHARED_LIBS=ON
+  cmake --build build5
+
   cmake -B build -S kColorPicker-$pkgver \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DBUILD_SHARED_LIBS=ON \
@@ -25,6 +31,18 @@ build() {
   cmake --build build
 }
 
-package() {
+package_kcolorpicker-qt5() {
+  depends+=(qt5-base)
+  conflicts=(kcolorpicker)
+  replaces=(kcolorpicker)
+
+  DESTDIR="$pkgdir" cmake --install build5
+}
+
+package_kcolorpicker() {
+  depends+=(qt6-base)
+  conflicts=(kcolorpicker-qt5
+             kcolorpicker-qt6)
+  replaces=(kcolorpicker-qt6)
   DESTDIR="$pkgdir" cmake --install build
 }