summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorvs0uz42021-02-09 20:41:26 -0300
committervs0uz42021-02-09 20:41:26 -0300
commitdd70464daacdf6d76561016399c3813128a27b25 (patch)
tree8546af25d87f9d7702ec4f0c7d940fb838a3087a
parentb9d73d91e1d2b2f798f3aadbc39788dc1cc554bb (diff)
downloadaur-dd70464daacdf6d76561016399c3813128a27b25.tar.gz
Initial Commit
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD141
-rw-r--r--dbeaver-ce.desktop10
-rw-r--r--dbeaver-ce.hook12
-rw-r--r--dbeaver-ce.install5
-rw-r--r--dbeaver-ce.profile.gzbin0 -> 97767 bytes
-rw-r--r--dbeaver-ce.sh6
-rwxr-xr-xmksrcinfo6
-rw-r--r--packaging_steps.md8
9 files changed, 176 insertions, 50 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 049dda187a4..667d121eeca 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,34 @@
pkgbase = dbeaver-ce
- pkgdesc = DBeaver Community Edition
- pkgver = 6.3.0
- pkgrel = 6
- url = https://github.com/dbeaver/dbeaver
+ pkgdesc = Free Universal SQL Client for Developers and Database Administrators (Community Edition)
+ pkgver = 7.3.4
+ pkgrel = 1
+ url = https://dbeaver.io/
+ install = dbeaver-ce.install
arch = x86_64
- license = GPL
- depends = java-runtime>=1.8
- depends = gtk2
+ license = Apache
+ makedepends = maven
+ makedepends = java-runtime<15
+ depends = java-runtime>=11
+ depends = gtk3
depends = gtk-update-icon-cache
depends = libsecret
optdepends = dbeaver-plugin-office: export data in Microsoft Office Excel format
optdepends = dbeaver-plugin-svg-format: save diagrams in SVG format
- conflicts = dbeaver
- conflicts = dbeaver-ee
- source = dbeaver-ce-6.3.0-linux.gtk.x86_64.tar.gz::https://github.com/dbeaver/dbeaver/releases/download/6.3.0/dbeaver-ce-6.3.0-linux.gtk.x86_64.tar.gz
- source = dbeaver-ce-6.3.0-git::git+https://github.com/dbeaver/dbeaver.git#tag=6.3.0
+ noextract = dbeaver-ce-7.3.4.tar.gz
+ noextract = dbeaver-ce.desktop
+ noextract = dbeaver-ce.sh
+ noextract = dbeaver-ce.profile.gz
+ noextract = dbeaver-ce.hook
+ source = dbeaver-ce-7.3.4.tar.gz::https://github.com/serge-rider/dbeaver/archive/7.3.4.tar.gz
source = dbeaver-ce.desktop
- sha256sums = 4a086f0182d349bbcc8d9c927e293d7b937eef90b8dcffff47db41e9a6c8421e
- sha256sums = SKIP
- sha256sums = e73e524d2ce9ff9750d805ed2ef9f9bd4058910db05d5095aef275b71e4001e8
+ source = dbeaver-ce.sh
+ source = dbeaver-ce.profile.gz
+ source = dbeaver-ce.hook
+ sha256sums = 1adc7989776955d52afb5f6ff7cf4d027f2a8d7b0522ebacdaf8ece1f51db228
+ sha256sums = a53bcfa37f71e96fdc0ba3df6748d147f29fcb3bc7f35ffad9d876f3e2b072aa
+ sha256sums = ba3c2248960b2b5c6eafa227ec9bd1223e21287a991cd3b912f0b0a984666c80
+ sha256sums = 1863e74bdcf22b7328e6e8487cbebff7d5360e34bde85c1dd226b168b4737034
+ sha256sums = 131e3eb7b97723aa17c08db23a8b588fedef3d99941de1177b90ba3917459bf0
pkgname = dbeaver-ce
diff --git a/PKGBUILD b/PKGBUILD
index 96bd947b06b..b3842f780cc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,117 @@
-# Maintainer: pappy@a_s_c_e_l_i_o_n.c_o_m
+# Maintainer: Vitor Rodrigues <vitor dot rodrigues at gmail dot com>
+# Contributor: pappy@a_s_c_e_l_i_o_n.c_o_m
pkgname=dbeaver-ce
-pkgver=6.3.0
-pkgrel=6
-pkgdesc="DBeaver Community Edition"
+pkgver=7.3.4
+pkgrel=1
+pkgdesc="Free Universal SQL Client for Developers and Database Administrators (Community Edition)"
arch=('x86_64')
-url="https://github.com/dbeaver/dbeaver"
-license=("GPL")
-depends=('java-runtime>=1.8' 'gtk2' 'gtk-update-icon-cache' 'libsecret')
-conflicts=(dbeaver dbeaver-ee)
+url="https://dbeaver.io/"
+license=("Apache")
+depends=('java-runtime>=11' 'gtk3' 'gtk-update-icon-cache' 'libsecret')
+makedepends=('maven' 'java-runtime<15')
optdepends=('dbeaver-plugin-office: export data in Microsoft Office Excel format'
- 'dbeaver-plugin-svg-format: save diagrams in SVG format')
+ 'dbeaver-plugin-svg-format: save diagrams in SVG format')
+install="${pkgname}.install"
-source=("$pkgname-$pkgver-linux.gtk.x86_64.tar.gz::https://github.com/dbeaver/dbeaver/releases/download/$pkgver/$pkgname-$pkgver-linux.gtk.x86_64.tar.gz"
- "$pkgname-$pkgver-git::git+https://github.com/dbeaver/dbeaver.git#tag=$pkgver"
- dbeaver-ce.desktop)
-sha256sums=('4a086f0182d349bbcc8d9c927e293d7b937eef90b8dcffff47db41e9a6c8421e'
- 'SKIP'
- 'e73e524d2ce9ff9750d805ed2ef9f9bd4058910db05d5095aef275b71e4001e8')
+source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/serge-rider/dbeaver/archive/${pkgver}.tar.gz"
+ "${pkgname}.desktop"
+ "${pkgname}.sh"
+ "${pkgname}.profile.gz"
+ "${pkgname}.hook")
+sha256sums=('1adc7989776955d52afb5f6ff7cf4d027f2a8d7b0522ebacdaf8ece1f51db228'
+ 'a53bcfa37f71e96fdc0ba3df6748d147f29fcb3bc7f35ffad9d876f3e2b072aa'
+ 'ba3c2248960b2b5c6eafa227ec9bd1223e21287a991cd3b912f0b0a984666c80'
+ '1863e74bdcf22b7328e6e8487cbebff7d5360e34bde85c1dd226b168b4737034'
+ '131e3eb7b97723aa17c08db23a8b588fedef3d99941de1177b90ba3917459bf0')
-package() {
- pushd $srcdir/$pkgname-$pkgver-git/product/standalone
- for _size in 16 32 48 64 128 256 512; do
- install -m 644 -D icons-sources/icon_${_size}x${_size}.png \
- $pkgdir/usr/share/icons/hicolor/${_size}x${_size}/apps/$pkgname.png
- done
- for _type in xpm png; do
- install -m 644 -D icons/dbeaver.$_type \
- $pkgdir/usr/share/pixmaps/$pkgname.$_type
- done
- popd
-
- mkdir -p $pkgdir/usr/bin
- ln -s /usr/share/$pkgname/dbeaver $pkgdir/usr/bin/$pkgname
- cp -a $srcdir/dbeaver $pkgdir/usr/share/$pkgname
- chmod +x $pkgdir/usr/share/$pkgname/dbeaver
- install -m 644 -D $srcdir/dbeaver-ce.desktop $pkgdir/usr/share/applications/$pkgname.desktop
+noextract=("${source[@]%%::*}")
+
+prepare() {
+ # Decompress source
+ mkdir -p $srcdir/${pkgname}-${pkgver}
+ tar -xf "$srcdir/${pkgname}-${pkgver}.tar.gz" --strip=1 -C "$srcdir/${pkgname}-${pkgver}"
+
+ # Fix version number in profile file
+ gzip --decompress --keep --stdout "${pkgname}.profile.gz" |
+ sed "s/DBEAVER_VERSION/${pkgver}/g" |
+ gzip -9 > "${pkgname}.profile-${pkgver}.gz"
+ rm "${pkgname}.profile.gz"
+
+ # Avoid the use of any Java 15, actually incompatible with the build
+ export JAVA_HOME="/usr/lib/jvm/$(archlinux-java status | tail -n +2 | sort | cut -d ' ' -f 3 | sort -nr -k 2 -t '-' | grep -v '15-openjdk' -m 1)"
+
+ # Download dependencies during prepare FS#55873
+ # https://bugs.archlinux.org/task/55873
+ cd "${pkgname}-${pkgver}"
+ export MAVEN_OPTS="-Xmx2048m"
+ mvn --batch-mode validate
}
+build() {
+ cd "${pkgname}-${pkgver}"
+ mvn --batch-mode package
+}
+
+package() {
+ cd "${pkgname}-${pkgver}/product/standalone"
+ # Install icons into /usr/share/icons/hicolor
+ for _size in 16 32 48 64 128 256 512
+ do
+ install -m 644 -D "icons-sources/icon_${_size}x${_size}.png" \
+ "${pkgdir}/usr/share/icons/hicolor/${_size}x${_size}/apps/${pkgname}.png"
+ done
+
+ # Move into the target directory
+ cd "target/products/org.jkiss.dbeaver.core.product/linux/gtk/${CARCH}"
+
+ # Initially install everything into /usr/lib/dbeaver
+ install -m 755 -d "${pkgdir}/usr/lib"
+ cp -r "dbeaver" "${pkgdir}/usr/lib/${pkgname}"
+
+ # Move shared data to /usr/share/dbeaver
+ cd "${pkgdir}/usr/lib/${pkgname}"
+ install -m 755 -d "${pkgdir}/usr/share/${pkgname}"
+ for _file in configuration features p2 .eclipseproduct artifacts.xml dbeaver.ini readme.txt
+ do
+ mv "${_file}" "${pkgdir}/usr/share/${pkgname}"
+ ln -s "/usr/share/${pkgname}/${_file}" .
+ done
+
+ # Install additional licenses
+ install -m 755 -d "${pkgdir}/usr/share/licenses"
+ mv licenses "${pkgdir}/usr/share/licenses/${pkgname}"
+
+ # Install icons
+ install -m 755 -d "${pkgdir}/usr/share/pixmaps"
+ mv dbeaver.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ mv icon.xpm "${pkgdir}/usr/share/pixmaps/${pkgname}.xpm"
+
+ # Install executable script into /usr/bin
+ install -m 755 -d "${pkgdir}/usr/bin"
+ install -m 755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
+
+ # Install application launcher into /usr/share/applications
+ install -m 755 -d "${pkgdir}/usr/share/applications"
+ install -m 755 -t "${pkgdir}/usr/share/applications" "${srcdir}/${pkgname}.desktop"
+
+ # Clean up and install new profile
+ rm -rf "${pkgdir}/usr/share/${pkgname}/p2/org.eclipse.equinox.p2.core"
+ cd "${pkgdir}/usr/share/${pkgname}/p2/org.eclipse.equinox.p2.engine/profileRegistry/DefaultProfile.profile"
+ find . -name "*.profile.gz" -delete
+ install -m 644 "${srcdir}/${pkgname}.profile-${pkgver}.gz" "1502633007017.profile.gz"
+ cd "${pkgdir}/usr/share/${pkgname}/p2/org.eclipse.equinox.p2.engine"
+ rm -f ".settings/org.eclipse.equinox.p2.artifact.repository.prefs"
+ rm ".settings/org.eclipse.equinox.p2.metadata.repository.prefs"
+ rmdir ".settings"
+
+ # Install system hook
+ install -m 755 -d "${pkgdir}/usr/share/libalpm/hooks"
+ install -m 644 "${srcdir}/${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks"
+
+ # Create configuration file (handled by the hook)
+ cd "${pkgdir}/usr/share/${pkgname}/configuration/org.eclipse.equinox.simpleconfigurator"
+ install -m 755 -d "${pkgdir}/etc/${pkgname}/bundles.d"
+ mv "bundles.info" "${pkgdir}/etc/${pkgname}/bundles.d/00-${pkgname}.info"
+ ln -s "/etc/${pkgname}/bundles.info" .
+}
diff --git a/dbeaver-ce.desktop b/dbeaver-ce.desktop
index 96e16823daa..6502e766b4d 100644
--- a/dbeaver-ce.desktop
+++ b/dbeaver-ce.desktop
@@ -1,13 +1,15 @@
[Desktop Entry]
Version=1.0
-Exec=GTK_OVERLAY_SCROLLING=0 /usr/share/dbeaver-ce/dbeaver
Type=Application
+Categories=IDE;Development;Java;Database;
Terminal=false
+Exec=dbeaver-ce
Icon=dbeaver-ce
-Categories=IDE;Development
-Name=DBeaver Community
-GenericName=UniversaL Database Manager
+
+Name=DBeaver Community Edition
+GenericName=Universal Database Manager
Comment=Universal Database Manager and SQL Client.
+
WM_CLASS=DBeaver
StartupWMClass=DBeaver
StartupNotify=true
diff --git a/dbeaver-ce.hook b/dbeaver-ce.hook
new file mode 100644
index 00000000000..1bd9ae66841
--- /dev/null
+++ b/dbeaver-ce.hook
@@ -0,0 +1,12 @@
+[Trigger]
+Type = Path
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = etc/dbeaver-ce/bundles.d/*.info
+
+[Action]
+Description = Updating the DBeaver bundles.info database...
+When = PostTransaction
+Exec = /bin/sh -c '> /etc/dbeaver-ce/bundles.info; cat /etc/dbeaver-ce/bundles.d/*.info > /etc/dbeaver-ce/bundles.info'
+
diff --git a/dbeaver-ce.install b/dbeaver-ce.install
new file mode 100644
index 00000000000..cf32dbfc4c1
--- /dev/null
+++ b/dbeaver-ce.install
@@ -0,0 +1,5 @@
+pre_remove() {
+ # Remove bundles.info managed from the hook
+ rm /etc/dbeaver-ce/bundles.info
+}
+
diff --git a/dbeaver-ce.profile.gz b/dbeaver-ce.profile.gz
new file mode 100644
index 00000000000..54ff321abe6
--- /dev/null
+++ b/dbeaver-ce.profile.gz
Binary files differ
diff --git a/dbeaver-ce.sh b/dbeaver-ce.sh
new file mode 100644
index 00000000000..d8638ef789a
--- /dev/null
+++ b/dbeaver-ce.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Disable GTK+ Overlay scrolling
+# https://bugs.archlinux.org/task/63338
+# https://bugs.eclipse.org/bugs/show_bug.cgi?id=519728
+export GTK_OVERLAY_SCROLLING=0
+/usr/lib/dbeaver-ce/dbeaver
diff --git a/mksrcinfo b/mksrcinfo
new file mode 100755
index 00000000000..41ce36ccaac
--- /dev/null
+++ b/mksrcinfo
@@ -0,0 +1,6 @@
+#!/bin/bash
+if [[ -f .SRCINFO ]]; then
+ makepkg --printsrcinfo > .SRCINFO
+else
+ echo "No .SRCINFO file found."
+fi
diff --git a/packaging_steps.md b/packaging_steps.md
new file mode 100644
index 00000000000..96c33e46954
--- /dev/null
+++ b/packaging_steps.md
@@ -0,0 +1,8 @@
+# When new version is available do the following:
+
+## Update the PKGBUILD file
+* run `updpkgsums`
+* run `mksrcinfo`
+* run `makepkg`
+
+> Test the package by installing locally. If everything works, then commit and push.