[arch-commits] Commit in cockpit/trunk (PKGBUILD)

Massimiliano Torromeo mtorromeo at archlinux.org
Mon Apr 6 10:05:13 UTC 2020


    Date: Monday, April 6, 2020 @ 10:05:12
  Author: mtorromeo
Revision: 612046

upgpkg: cockpit 216-2: Splitted docker and machines components

Modified:
  cockpit/trunk/PKGBUILD

----------+
 PKGBUILD |   39 ++++++++++++++++++++++++++++++++-------
 1 file changed, 32 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-06 10:04:26 UTC (rev 612045)
+++ PKGBUILD	2020-04-06 10:05:12 UTC (rev 612046)
@@ -4,9 +4,9 @@
 # Contributor: Anatol Pomozov <anatol.pomozov at gmail.com>
 
 pkgbase=cockpit
-pkgname=(cockpit cockpit-pcp cockpit-dashboard)
+pkgname=(cockpit cockpit-pcp cockpit-dashboard cockpit-docker cockpit-machines)
 pkgver=216
-pkgrel=1
+pkgrel=2
 pkgdesc='A systemd web based user interface for Linux servers'
 arch=('x86_64')
 url='https://cockpit-project.org/'
@@ -45,6 +45,8 @@
   backup=('etc/pam.d/cockpit')
   optdepends=("cockpit-pcp: reading performance metrics"
               "cockpit-dashboard: dashboard and support for connecting to remote hosts"
+              "cockpit-docker: user interface for managing docker containers"
+              "cockpit-machines: user interface for managing virtual machines"
               "udisks2: manage hard disks"
               "networkmanager: manage network connections"
               "packagekit: manage packages"
@@ -66,7 +68,8 @@
          "$pkgdir"/usr/share/metainfo/org.cockpit-project.cockpit-{selinux,sosreport}.metainfo.xml
 
   # remove plugins packaged separately
-  rm -rf "$pkgdir"/usr/share/cockpit/{pcp,dashboard} \
+  rm -rf "$pkgdir"/usr/share/cockpit/{pcp,dashboard,docker,machines} \
+         "$pkgdir"/usr/share/metainfo/org.cockpit-project.cockpit-{docker,machines}.metainfo.xml \
          "$pkgdir"/usr/lib/cockpit/cockpit-pcp \
          "$pkgdir"/var/lib/pcp
 }
@@ -84,15 +87,37 @@
   rm -rf "$pkgdir"/tmp
 }
 
-package_cockpit-dashboard() {
-  pkgdesc='Cockpit support for connecting to remote servers (through ssh), bastion hosts, and a basic dashboard.'
-  depends=(cockpit)
+_do_package_component() {
+  _component="${pkgname#cockpit-}"
 
   cd cockpit-$pkgver
   make DESTDIR="$pkgdir"/tmp install
 
   cd "$pkgdir"/tmp
-  bsdtar -cf - usr/share/cockpit/dashboard \
+  bsdtar -cf - usr/share/cockpit/$_component \
     | bsdtar -xf - -C "$pkgdir"
+
+  [ -f usr/share/metainfo/org.cockpit-project.$pkgname.metainfo.xml ] && \
+    install -Dm644 usr/share/metainfo/org.cockpit-project.$pkgname.metainfo.xml \
+      "$pkgdir"/usr/share/metainfo/org.cockpit-project.$pkgname.metainfo.xml
+
   rm -rf "$pkgdir"/tmp
 }
+
+package_cockpit-dashboard() {
+  pkgdesc='Cockpit support for connecting to remote servers (through ssh), bastion hosts, and a basic dashboard.'
+  depends=(cockpit)
+  _do_package_component
+}
+
+package_cockpit-docker() {
+  pkgdesc='Cockpit components for interacting with Docker and user interface.'
+  depends=(cockpit docker)
+  _do_package_component
+}
+
+package_cockpit-machines() {
+  pkgdesc='Cockpit components for managing virtual machines.'
+  depends=(cockpit libvirt-dbus)
+  _do_package_component
+}



More information about the arch-commits mailing list