dbeaver/dbeaver.spec

107 lines
3.3 KiB
RPMSpec
Raw Normal View History

Name: dbeaver
Version: 22.2.1
Release: 1mamba
Summary: Free universal database tool and SQL client
Group: Graphical Desktop/Applications/Utilities
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://dbeaver.io/
Source: https://github.com/dbeaver/dbeaver.git/%{version}/dbeaver-%{version}.tar.bz2
Source1: dbeaver.sh
Source2: io.dbeaver.DBeaver.desktop
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: apache-maven
BuildRequires: javapackages
Requires: java-runtime
%description
Free universal database tool and SQL client.
%debug_package
%define _build_id_links none
%global __requires_exclude_from ^%{_datadir}/dbeaver/.*|%{_libdir}/dbeaver/.*$
%global __provides_exclude_from ^%{_datadir}/dbeaver/.*|%{_libdir}/dbeaver/.*$
%prep
%setup -q
#-D -T
#:<< _EOF
export MAVEN_OPTS="-Xmx2048m"
mvn --batch-mode validate
%build
#:<< _EOF
mvn --batch-mode package
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd product/community
# 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" \
%{buildroot}%{_datadir}/icons/hicolor/${_size}x${_size}/apps/dbeaver.png
done
# Initially install everything into /usr/lib/dbeaver
install -m 755 -d %{buildroot}%{_libdir}
cp -r target/products/org.jkiss.dbeaver.core.product/linux/gtk/%{_target_cpu}/dbeaver %{buildroot}%{_libdir}
# Move shared data to /usr/share/dbeaver
install -m 755 -d %{buildroot}%{_datadir}/%{name}
for _file in configuration features p2 .eclipseproduct artifacts.xml dbeaver.ini readme.txt
do
mv %{buildroot}%{_libdir}/dbeaver/${_file} %{buildroot}%{_datadir}/%{name}
ln -s /usr/share/%{name}/${_file} %{buildroot}%{_libdir}/dbeaver/${_file}
done
# Install icons
install -m 755 -d %{buildroot}%{_datadir}/pixmaps
mv %{buildroot}%{_libdir}/dbeaver/dbeaver.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
mv %{buildroot}%{_libdir}/dbeaver/icon.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
# Install executable script into /usr/bin
install -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
# Install application launcher into /usr/share/applications
install -D -m0755 -t %{buildroot}%{_datadir}/applications %{SOURCE2}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/dbeaver
%dir %{_libdir}/dbeaver
%{_libdir}/dbeaver/.eclipseproduct
%{_libdir}/dbeaver/artifacts.xml
%{_libdir}/dbeaver/configuration
%{_libdir}/dbeaver/dbeaver
%{_libdir}/dbeaver/dbeaver.ini
%{_libdir}/dbeaver/features
%{_libdir}/dbeaver/licenses
%{_libdir}/dbeaver/p2
%{_libdir}/dbeaver/readme.txt
%dir %{_libdir}/dbeaver/plugins
%{_libdir}/dbeaver/plugins/*
%dir %{_datadir}/dbeaver
%{_datadir}/dbeaver/*
%{_datadir}/dbeaver/.eclipseproduct
%{_datadir}/applications/io.dbeaver.DBeaver.desktop
%{_datadir}/icons/hicolor/*/apps/dbeaver.png
%{_datadir}/pixmaps/dbeaver.png
%{_datadir}/pixmaps/dbeaver.xpm
%doc LICENSE.md
%changelog
* Mon Sep 26 2022 Automatic Build System <autodist@mambasoft.it> 22.2.1-1mamba
- automatic version update by autodist
* Sat Sep 10 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 22.2.0-1mamba
- package created using the webbuild interface