%global appname idea %global desc A cross-platform IDE for C and C++ %global dir %{appname}-%{VERSION} # disable debuginfo subpackage %global debug_package %{nil} # Disable build-id symlinks to avoid conflicts %global _build_id_links none # don't strip bundled binaries because pycharm checks length (!!!) of binary fsnotif # and if you strip debug stuff from it, it will complain %global __strip /bin/true # dont repack jars %global __jar_repack %{nil} # disable rpath checks %define __brp_check_rpaths %{nil} # do not automatically detect and export provides and dependencies on bundled libraries and executables %global __provides_exclude_from %{_javadir}/%{name}/bin/.*|%{_javadir}/%{name}/lib/.*|%{_javadir}/%{name}/plugins/.* %global __requires_exclude_from %{_javadir}/%{name}/bin/.*|%{_javadir}/%{name}/lib/.*|%{_javadir}/%{name}/plugins/.* Name: intellij-idea-ultimate Version: 2024.3.1 Release: 1%?dist Summary: %{desc} License: Proprietary URL: https://jetbrains.com/%{appname} Source0: https://download.jetbrains.com/idea/ideaIU-%{version}.tar.gz Source1: https://download.jetbrains.com/idea/ideaIU-%{version}-aarch64.tar.gz Source2: %{name}.desktop BuildRequires: python3-rpm-macros BuildRequires: python3 BuildRequires: javapackages-filesystem BuildRequires: /usr/bin/desktop-file-validate BuildRequires: /usr/bin/rsvg-convert Requires: java-jbr %description %{desc} %prep mkdir %{dir} if [[ $(arch) == "x86_64" ]] then tar -xvf %{SOURCE0} -C %{dir} --strip-components=1 else tar -xvf %{SOURCE1} -C %{dir} --strip-components=1 fi %py3_shebang_fix %{dir} %install mkdir -p %{buildroot}%{_javadir}/%{name} cp -ar %{dir}/{bin,lib,plugins,modules,jdk-shared-indexes,build.txt,product-info.json} %{buildroot}%{_javadir}/%{name}/ mkdir -p %{buildroot}%{_datadir}/{pixmaps,icons/hicolor/scalable/apps} cp %{dir}/bin/%{appname}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png cp %{dir}/bin/%{appname}.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg for size in 16 22 24 32 48 64 128 256; do dest=%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps install -d ${dest} rsvg-convert -w ${size} -h ${size} %{dir}/bin/%{appname}.svg -o ${dest}/%{name}.png chmod 0644 ${dest}/%{name}.png touch -r %{dir}/bin/%{appname}.svg ${dest}/%{name}.png done mkdir -p %{buildroot}%{_bindir} cat > %{buildroot}%{_bindir}/%{name} << EOF #!/bin/sh export $(echo "%{appname}_jdk" | tr '[:lower:]' '[:upper:]')=%{_jvmdir}/jdk-jbr exec %{_javadir}/%{name}/bin/%{appname} "\$@" EOF chmod +x %{buildroot}%{_bindir}/%{name} mkdir -p %{buildroot}%{_datadir}/applications cp %{SOURCE2} %{buildroot}%{_datadir}/applications/ %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %files %license %{dir}/license/* %{_javadir}/%{name} %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.png %{_datadir}/icons/hicolor/*/apps/%{name}.* %changelog %autochangelog