git » kimageannotator.git » commit 2c10232

upgpkg: 0.7.0-2: Add cmake symlinks for backwards compatibility

author Antonio Rojas
2024-01-16 22:24:46 UTC
committer Antonio Rojas
2024-01-16 22:24:46 UTC
parent ce220cb082de04993bf1a84b5384d0601cf99e82

upgpkg: 0.7.0-2: Add cmake symlinks for backwards compatibility

.SRCINFO +2 -1
PKGBUILD +7 -1

diff --git a/.SRCINFO b/.SRCINFO
index 5513289..129539b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
 pkgbase = kimageannotator
 	pkgdesc = Tool for annotating images
 	pkgver = 0.7.0
-	pkgrel = 1
+	pkgrel = 2
 	url = https://github.com/ksnip/kImageAnnotator
 	arch = x86_64
 	license = LGPL-3.0-only
@@ -25,6 +25,7 @@ pkgname = kimageannotator-qt5
 	depends = kcolorpicker-qt5
 	depends = qt5-base
 	depends = qt5-svg
+	conflicts = kimageannotator
 	replaces = kimageannotator
 
 pkgname = kimageannotator-qt6
diff --git a/PKGBUILD b/PKGBUILD
index 5607edd..958db44 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@ pkgbase=kimageannotator
 pkgname=(kimageannotator-qt5
          kimageannotator-qt6)
 pkgver=0.7.0
-pkgrel=1
+pkgrel=2
 pkgdesc='Tool for annotating images'
 arch=(x86_64)
 url='https://github.com/ksnip/kImageAnnotator'
@@ -40,9 +40,15 @@ package_kimageannotator-qt5() {
   depends+=(kcolorpicker-qt5
             qt5-base
             qt5-svg)
+  conflicts=(kimageannotator)
   replaces=(kimageannotator)
 
   DESTDIR="$pkgdir" cmake --install build5
+# Symlinks for backwards compatibility
+  mkdir -p "$pkgdir"/usr/lib/cmake/kImageAnnotator
+  ln -sr "$pkgdir"/usr/lib/cmake/kImageAnnotator-Qt5/kImageAnnotator-Qt5Config.cmake "$pkgdir"/usr/lib/cmake/kImageAnnotator/kImageAnnotatorConfig.cmake
+  ln -sr "$pkgdir"/usr/lib/cmake/kImageAnnotator-Qt5/kImageAnnotator-Qt5Config-version.cmake "$pkgdir"/usr/lib/cmake/kImageAnnotator/kImageAnnotatorConfig-version.cmake
+  ln -sr "$pkgdir"/usr/lib/cmake/kImageAnnotator-Qt5/kImageAnnotator-targets* "$pkgdir"/usr/lib/cmake/kImageAnnotator/
 }
 
 package_kimageannotator-qt6() {