]>
Commit | Line | Data |
---|---|---|
7975955d ER |
1 | %define product idea |
2 | %define proddir %{product}-IU | |
7975955d ER |
3 | Summary: IntelliJ IDEA - The Most Intelligent Java IDE |
4 | Name: intellij-idea-ultimate | |
623d61d3 | 5 | Version: 2020.3.1 |
e2927df0 | 6 | Release: 1 |
7975955d ER |
7 | License: IntelliJ IDEA Commercial |
8 | Group: Development/Tools | |
af1d6839 | 9 | Source0: http://download.jetbrains.com/idea/ideaIU-%{version}.tar.gz |
623d61d3 | 10 | # NoSource0-md5: 295d92ac0f5e42e6c3727379dfd58b48 |
7975955d ER |
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.596 | |
18 | Requires: %{name}-libs = %{version}-%{release} | |
19 | Requires: desktop-file-utils | |
00b4690e | 20 | Requires: jre >= 1.8 |
2da89e54 | 21 | %ifarch %{x8664} |
5a014b00 | 22 | Suggests: %{name}-jre = %{version}-%{release} |
2da89e54 | 23 | %endif |
c8f36c7d | 24 | Suggests: java-jdbc-mysql |
7975955d | 25 | Suggests: jdk >= 1.6 |
8c33db2f JP |
26 | Suggests: open |
27 | Suggests: python | |
7975955d | 28 | Conflicts: intellij-idea |
c8f36c7d | 29 | Conflicts: java-jdbc-mysql < 5.1.22 |
7975955d ER |
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 | ||
6d8f6f12 JP |
47 | %define _noautoreq_java ClassDataVersion |
48 | ||
7975955d ER |
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 | %if "%{_rpmversion}" >= "5" | |
59 | BuildArch: noarch | |
60 | %endif | |
61 | ||
62 | %description libs | |
63 | Libraries for IntelliJ IDEA. | |
64 | ||
5a014b00 JP |
65 | %package jre |
66 | Summary: Bundled JRE recommended for running IntelliJ IDEA | |
67 | Group: Libraries/Java | |
49dcdda8 | 68 | Requires: %{name} = %{version}-%{release} |
5a014b00 JP |
69 | |
70 | %description jre | |
71 | Bundled JRE recommended for running IntelliJ IDEA. | |
72 | ||
7975955d | 73 | %prep |
4063f81f ER |
74 | %setup -qc |
75 | mv %{proddir}-*/* . | |
7975955d ER |
76 | %patch0 -p1 |
77 | ||
78 | # keep only single arch files (don't want to pull 32bit deps by default), | |
79 | # if you want to mix, install rpm from both arch | |
80 | %ifarch %{ix86} | |
81 | rm bin/%{product}64.vmoptions | |
82 | rm bin/fsnotifier64 | |
7975955d ER |
83 | %endif |
84 | %ifarch %{x8664} | |
85 | rm bin/%{product}.vmoptions | |
86 | rm bin/fsnotifier | |
7975955d ER |
87 | %endif |
88 | chmod a+rx bin/*.so bin/fsnotifier* | |
89 | mv bin/%{product}.png . | |
90 | ||
91 | # cleanup backups after patching | |
92 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
93 | ||
3fc6b8ae JP |
94 | grep -r '#!.*env bash' -l plugins/Kotlin/kotlinc/bin | xargs %{__sed} -i -e '1 s,#!.*env bash.*,#!/bin/bash,' |
95 | grep -r '#!.*env python' -l bin | xargs %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python},' | |
96 | ||
7975955d ER |
97 | %install |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}} | |
100 | cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test | |
dd418331 | 101 | cp -a$l bin build.txt help lib license plugins $RPM_BUILD_ROOT%{_appdir} |
2da89e54 | 102 | %ifarch %{x8664} |
6d118083 | 103 | cp -a$l jbr $RPM_BUILD_ROOT%{_appdir} |
2da89e54 | 104 | %endif |
7975955d ER |
105 | cp -p %{product}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{product}.png |
106 | ln -s %{_pixmapsdir}/%{product}.png $RPM_BUILD_ROOT%{_appdir}/bin/%{product}.png | |
107 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop | |
108 | ln -s %{_appdir}/bin/%{product}.sh $RPM_BUILD_ROOT%{_bindir}/%{product} | |
24a949ba JP |
109 | %ifnarch aarch64 |
110 | rm -r $RPM_BUILD_ROOT%{_appdir}/lib/pty4j-native/linux/aarch64 | |
111 | %endif | |
112 | %ifnarch %{ix86} %{x8664} | |
113 | rm -r $RPM_BUILD_ROOT%{_appdir}/lib/pty4j-native/linux/x86* | |
114 | %endif | |
115 | rm -r $RPM_BUILD_ROOT%{_appdir}/lib/pty4j-native/linux/{mips64el,ppc64le} | |
7975955d ER |
116 | |
117 | desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop | |
118 | ||
119 | %clean | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %post | |
123 | %update_desktop_database | |
124 | ||
125 | %postun | |
126 | %update_desktop_database | |
127 | ||
128 | # base package contains arch specific files | |
129 | %files | |
130 | %defattr(644,root,root,755) | |
131 | %doc Install-Linux-tar.txt | |
132 | %attr(755,root,root) %{_bindir}/%{product} | |
133 | %dir %{_appdir}/bin | |
134 | %{_appdir}/bin/%{product}*.vmoptions | |
135 | %{_appdir}/bin/%{product}.png | |
136 | %{_appdir}/bin/%{product}.properties | |
dd418331 | 137 | %{_appdir}/bin/%{product}.svg |
7975955d ER |
138 | %{_appdir}/bin/appletviewer.policy |
139 | %{_appdir}/bin/log.xml | |
140 | %attr(755,root,root) %{_appdir}/bin/%{product}.sh | |
bdc3065e | 141 | %attr(755,root,root) %{_appdir}/bin/format.sh |
7975955d ER |
142 | %attr(755,root,root) %{_appdir}/bin/inspect.sh |
143 | %attr(755,root,root) %{_appdir}/bin/fsnotifier* | |
24a949ba | 144 | %attr(755,root,root) %{_appdir}/bin/ltedit.sh |
bdc3065e JP |
145 | %attr(755,root,root) %{_appdir}/bin/printenv.py |
146 | %attr(755,root,root) %{_appdir}/bin/restart.py | |
dd418331 JP |
147 | %ifarch %{x8664} |
148 | %attr(755,root,root) %{_appdir}/bin/libdbm64.so | |
149 | %endif | |
7975955d ER |
150 | %{_desktopdir}/%{product}.desktop |
151 | %{_pixmapsdir}/%{product}.png | |
152 | ||
153 | # this package contains arch independant files | |
154 | %files libs | |
155 | %defattr(644,root,root,755) | |
156 | %dir %{_appdir} | |
dd418331 | 157 | %{_appdir}/build.txt |
7975955d ER |
158 | %{_appdir}/lib |
159 | %{_appdir}/license | |
160 | %{_appdir}/plugins | |
161 | %{_appdir}/help | |
5a014b00 | 162 | |
2da89e54 | 163 | %ifarch %{x8664} |
5a014b00 JP |
164 | %files jre |
165 | %defattr(644,root,root,755) | |
6d118083 JP |
166 | %dir %{_appdir}/jbr |
167 | %dir %{_appdir}/jbr/bin | |
168 | %attr(755,root,root) %{_appdir}/jbr/bin/jaotc | |
169 | %attr(755,root,root) %{_appdir}/jbr/bin/java | |
170 | %attr(755,root,root) %{_appdir}/jbr/bin/javac | |
171 | %attr(755,root,root) %{_appdir}/jbr/bin/jdb | |
17fe1af5 | 172 | %attr(755,root,root) %{_appdir}/jbr/bin/jfr |
3fc6b8ae | 173 | %attr(755,root,root) %{_appdir}/jbr/bin/jhsdb |
6d118083 JP |
174 | %attr(755,root,root) %{_appdir}/jbr/bin/jjs |
175 | %attr(755,root,root) %{_appdir}/jbr/bin/jrunscript | |
176 | %attr(755,root,root) %{_appdir}/jbr/bin/keytool | |
177 | %attr(755,root,root) %{_appdir}/jbr/bin/pack200 | |
178 | %attr(755,root,root) %{_appdir}/jbr/bin/rmid | |
179 | %attr(755,root,root) %{_appdir}/jbr/bin/rmiregistry | |
180 | %attr(755,root,root) %{_appdir}/jbr/bin/serialver | |
181 | %attr(755,root,root) %{_appdir}/jbr/bin/unpack200 | |
182 | %{_appdir}/jbr/conf | |
183 | %{_appdir}/jbr/include | |
184 | %{_appdir}/jbr/legal | |
185 | %{_appdir}/jbr/lib | |
186 | %{_appdir}/jbr/release | |
2da89e54 | 187 | %endif |