File ugene.spec of Package UGENE
#
# spec file for package ugene
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: ugene
Version: 49.1
Release: 0
Summary: Integrated bioinformatics toolkit
#The entire source code is GPL-2.0+ except some plugins that are licensed differently
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND ISC AND BSD-3-Clause AND SUSE-Public-Domain AND SUSE-NonFree
Group: Productivity/Scientific/Other
URL: http://ugene.net
Source0: https://github.com/ugeneunipro/ugene/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source100: %{name}-rpmlintrc
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: glu-devel
BuildRequires: hicolor-icon-theme
BuildRequires: procps-devel
BuildRequires: update-desktop-files
BuildRequires: zlib-devel >= 1.2.8
BuildRequires: libqt5-linguist >= 5.15
BuildRequires: libqt5-qtbase-devel >= 5.15
BuildRequires: libqt5-qtscript-devel >= 5.15
BuildRequires: libqt5-qtsvg-devel >= 5.15
BuildRequires: libqt5-qtwebsockets-devel >= 5.15
BuildRequires: libXtst-devel
# x86 broken: https://github.com/ugeneunipro/ugene/issues/780
# aarch64 fails due to GLES
ExclusiveArch: x86_64
%description
Unipro UGENE is a cross-platform visual environment for DNA and protein
sequence analysis. UGENE integrates the most important bioinformatics
computational algorithms and provides an easy-to-use GUI for performing
complex analysis of the genomic data. One of the main features of UGENE
is a designer for custom bioinformatics workflows.
%prep
%autosetup -p1 -N
%build
%{qmake5} . -r PREFIX=%{_libdir}/ugene
%make_jobs
# qmake project files are broken, see https://github.com/ugeneunipro/ugene/issues/683
%{qmake5} . -r PREFIX=%{_libdir}/ugene
%make_jobs
%install
%{qmake5_install}
# Clean up unnecessary files
find %{buildroot}/%{_libdir} -iname lib\*.a -ls -delete
rm %{buildroot}/%{_libdir}/ugene/*.xpm
rm %{buildroot}/%{_libdir}/ugene/ugene
for dir in %{_datadir}/applications %{_mandir}/man1 %{_bindir} \
%{_datadir}/icons/hicolor/32x32/mimetypes \
%{_datadir}/icons/hicolor/48x48/apps \
%{_datadir}/mime/packages
do
mkdir -p %{buildroot}${dir}
done
mv %{buildroot}/%{_libdir}/ugene/*desktop %{buildroot}%{_datadir}/applications/
mv %{buildroot}/%{_libdir}/ugene/*.1.* %{buildroot}%{_mandir}/man1/
mv %{buildroot}/%{_libdir}/ugene/application*.png %{buildroot}%{_datadir}/icons/hicolor/32x32/mimetypes/
mv %{buildroot}/%{_libdir}/ugene/ugene*.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/
mv %{buildroot}/%{_libdir}/ugene/application*.xml %{buildroot}%{_datadir}/mime/packages/
for f in ugenem ugeneui ugenecl ; do
ln -s %{_libdir}/ugene/$f %{buildroot}/%{_bindir}/$f
done
%suse_update_desktop_file -r %{name} "Qt Science Chemistry"
sed -i -e '/Exec/ s/ugene -ui/ugeneui/' %{buildroot}%{_datadir}/applications/*desktop
find %{buildroot}%{_libdir}/ugene/data -type f -exec chmod -x '{}' \;
%fdupes %{buildroot}
%files
%license LICENSE.txt LICENSE.3rd_party.txt
%{_bindir}/*
%{_libdir}/%{name}
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/*/mimetypes/*.png
%{_datadir}/mime/packages/*
%{_mandir}/man1/*
%changelog