]> git.pld-linux.org Git - packages/intellij-idea-ultimate.git/blob - intellij-idea-ultimate.spec
23c872f4605c0caccb2aef42c09ea85a5bc049ae
[packages/intellij-idea-ultimate.git] / intellij-idea-ultimate.spec
1 %define         product idea
2 %define         proddir %{product}-IU
3 Summary:        IntelliJ IDEA - The Most Intelligent Java IDE
4 Name:           intellij-idea-ultimate
5 Version:        2020.3.2
6 Release:        1
7 License:        IntelliJ IDEA Commercial
8 Group:          Development/Tools
9 Source0:        http://download.jetbrains.com/idea/ideaIU-%{version}.tar.gz
10 # NoSource0-md5:        abf6c3e932bb5c085168eebc8a7eead1
11 NoSource:       0
12 Source1:        %{product}.desktop
13 Patch0:         xdg-paths.patch
14 URL:            http://www.jetbrains.org/
15 BuildRequires:  desktop-file-utils
16 BuildRequires:  rpm-javaprov
17 BuildRequires:  rpmbuild(macros) >= 1.752
18 Requires:       %{name}-libs = %{version}-%{release}
19 Requires:       desktop-file-utils
20 Requires:       jre >= 1.8
21 %ifarch %{x8664}
22 Suggests:       %{name}-jre = %{version}-%{release}
23 %endif
24 Suggests:       java-jdbc-mysql
25 Suggests:       jdk >= 1.6
26 Suggests:       open
27 Suggests:       python
28 Conflicts:      intellij-idea
29 Conflicts:      java-jdbc-mysql < 5.1.22
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 # disable debuginfo package, not useful
33 %define         _enable_debug_packages  0
34
35 # don't strip fsnotifier, it's size is checked for "outdated binary"
36 # https://bugs.archlinux.org/task/34703
37 # http://git.jetbrains.org/?p=idea/community.git;a=blob;f=platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java;h=004311b96a35df1ffc2c87baba78a8b2a8809f7d;hb=376b939fd6d6ec4c12191a5f90503d9d62c501da#l173
38 %define         _noautostrip    .*/fsnotifier.*
39
40 # use /usr/lib, 64bit files do not conflict with 32bit files (64 suffix)
41 # this allows to install both arch files and to use 32bit jdk on 64bit os
42 %define         _appdir         %{_prefix}/lib/%{proddir}
43
44 # rpm5 is so damn slow, so i use this for development:
45 %define         _noautoreqfiles .*\.jar
46
47 %define         _noautoreq_java         ClassDataVersion
48
49 %description
50 IntelliJ IDEA is a code-centric IDE focused on developer productivity.
51 The editor deeply understands your code and knows its way around the
52 codebase, makes great suggestions right when you need them, and is
53 always ready to help you shape your code.
54
55 %package libs
56 Summary:        Libraries for IntelliJ IDEA
57 Group:          Libraries/Java
58 %{?noarchpackage}
59
60 %description libs
61 Libraries for IntelliJ IDEA.
62
63 %package jre
64 Summary:        Bundled JRE recommended for running IntelliJ IDEA
65 Group:          Libraries/Java
66 Requires:       %{name} = %{version}-%{release}
67
68 %description jre
69 Bundled JRE recommended for running IntelliJ IDEA.
70
71 %prep
72 %setup -qc
73 mv %{proddir}-*/* .
74 %patch0 -p1
75
76 # keep only single arch files (don't want to pull 32bit deps by default),
77 # if you want to mix, install rpm from both arch
78 %ifarch %{ix86}
79 rm bin/%{product}64.vmoptions
80 rm bin/fsnotifier64
81 %endif
82 %ifarch %{x8664}
83 rm bin/%{product}.vmoptions
84 rm bin/fsnotifier
85 %endif
86 chmod a+rx bin/*.so bin/fsnotifier*
87 mv bin/%{product}.png .
88
89 # cleanup backups after patching
90 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
91
92 grep -r '#!.*env bash' -l plugins/Kotlin/kotlinc/bin | xargs %{__sed} -i -e '1 s,#!.*env bash.*,#!/bin/bash,'
93 grep -r '#!.*env python' -l bin | xargs %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python},'
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}}
98 cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test
99 cp -a$l bin build.txt help lib license plugins $RPM_BUILD_ROOT%{_appdir}
100 %ifarch %{x8664}
101 cp -a$l jbr $RPM_BUILD_ROOT%{_appdir}
102 %endif
103 cp -p %{product}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{product}.png
104 ln -s %{_pixmapsdir}/%{product}.png $RPM_BUILD_ROOT%{_appdir}/bin/%{product}.png
105 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop
106 ln -s %{_appdir}/bin/%{product}.sh $RPM_BUILD_ROOT%{_bindir}/%{product}
107 %ifnarch aarch64
108 rm -r $RPM_BUILD_ROOT%{_appdir}/lib/pty4j-native/linux/aarch64
109 %endif
110 %ifnarch %{ix86} %{x8664}
111 rm -r $RPM_BUILD_ROOT%{_appdir}/lib/pty4j-native/linux/x86*
112 %endif
113 rm -r $RPM_BUILD_ROOT%{_appdir}/lib/pty4j-native/linux/{mips64el,ppc64le}
114
115 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %post
121 %update_desktop_database
122
123 %postun
124 %update_desktop_database
125
126 # base package contains arch specific files
127 %files
128 %defattr(644,root,root,755)
129 %doc Install-Linux-tar.txt
130 %attr(755,root,root) %{_bindir}/%{product}
131 %dir %{_appdir}/bin
132 %{_appdir}/bin/%{product}*.vmoptions
133 %{_appdir}/bin/%{product}.png
134 %{_appdir}/bin/%{product}.properties
135 %{_appdir}/bin/%{product}.svg
136 %{_appdir}/bin/appletviewer.policy
137 %{_appdir}/bin/log.xml
138 %attr(755,root,root) %{_appdir}/bin/%{product}.sh
139 %attr(755,root,root) %{_appdir}/bin/format.sh
140 %attr(755,root,root) %{_appdir}/bin/inspect.sh
141 %attr(755,root,root) %{_appdir}/bin/fsnotifier*
142 %attr(755,root,root) %{_appdir}/bin/ltedit.sh
143 %attr(755,root,root) %{_appdir}/bin/printenv.py
144 %attr(755,root,root) %{_appdir}/bin/restart.py
145 %ifarch %{x8664}
146 %attr(755,root,root) %{_appdir}/bin/libdbm64.so
147 %endif
148 %{_desktopdir}/%{product}.desktop
149 %{_pixmapsdir}/%{product}.png
150
151 # this package contains arch independant files
152 %files libs
153 %defattr(644,root,root,755)
154 %dir %{_appdir}
155 %{_appdir}/build.txt
156 %{_appdir}/lib
157 %{_appdir}/license
158 %{_appdir}/plugins
159 %{_appdir}/help
160
161 %ifarch %{x8664}
162 %files jre
163 %defattr(644,root,root,755)
164 %dir %{_appdir}/jbr
165 %dir %{_appdir}/jbr/bin
166 %attr(755,root,root) %{_appdir}/jbr/bin/jaotc
167 %attr(755,root,root) %{_appdir}/jbr/bin/java
168 %attr(755,root,root) %{_appdir}/jbr/bin/javac
169 %attr(755,root,root) %{_appdir}/jbr/bin/jdb
170 %attr(755,root,root) %{_appdir}/jbr/bin/jfr
171 %attr(755,root,root) %{_appdir}/jbr/bin/jhsdb
172 %attr(755,root,root) %{_appdir}/jbr/bin/jjs
173 %attr(755,root,root) %{_appdir}/jbr/bin/jrunscript
174 %attr(755,root,root) %{_appdir}/jbr/bin/keytool
175 %attr(755,root,root) %{_appdir}/jbr/bin/pack200
176 %attr(755,root,root) %{_appdir}/jbr/bin/rmid
177 %attr(755,root,root) %{_appdir}/jbr/bin/rmiregistry
178 %attr(755,root,root) %{_appdir}/jbr/bin/serialver
179 %attr(755,root,root) %{_appdir}/jbr/bin/unpack200
180 %{_appdir}/jbr/conf
181 %{_appdir}/jbr/include
182 %{_appdir}/jbr/legal
183 %{_appdir}/jbr/lib
184 %{_appdir}/jbr/release
185 %endif
This page took 0.061326 seconds and 2 git commands to generate.