]>
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 | |
3f2198a3 | 5 | Version: 2020.1.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 |
3f2198a3 | 10 | # NoSource0-md5: d0431fd46c26e0d870a399b4940b6e17 |
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 | ||
47 | %description | |
48 | IntelliJ IDEA is a code-centric IDE focused on developer productivity. | |
49 | The editor deeply understands your code and knows its way around the | |
50 | codebase, makes great suggestions right when you need them, and is | |
51 | always ready to help you shape your code. | |
52 | ||
53 | %package libs | |
54 | Summary: Libraries for IntelliJ IDEA | |
55 | Group: Libraries/Java | |
56 | %if "%{_rpmversion}" >= "5" | |
57 | BuildArch: noarch | |
58 | %endif | |
59 | ||
60 | %description libs | |
61 | Libraries for IntelliJ IDEA. | |
62 | ||
5a014b00 JP |
63 | %package jre |
64 | Summary: Bundled JRE recommended for running IntelliJ IDEA | |
65 | Group: Libraries/Java | |
49dcdda8 | 66 | Requires: %{name} = %{version}-%{release} |
5a014b00 JP |
67 | |
68 | %description jre | |
69 | Bundled JRE recommended for running IntelliJ IDEA. | |
70 | ||
7975955d | 71 | %prep |
4063f81f ER |
72 | %setup -qc |
73 | mv %{proddir}-*/* . | |
7975955d ER |
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 | |
7975955d ER |
81 | %endif |
82 | %ifarch %{x8664} | |
83 | rm bin/%{product}.vmoptions | |
84 | rm bin/fsnotifier | |
7975955d ER |
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 | ||
3fc6b8ae JP |
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 | ||
7975955d ER |
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 | |
dd418331 | 99 | cp -a$l bin build.txt help lib license plugins $RPM_BUILD_ROOT%{_appdir} |
2da89e54 | 100 | %ifarch %{x8664} |
6d118083 | 101 | cp -a$l jbr $RPM_BUILD_ROOT%{_appdir} |
2da89e54 | 102 | %endif |
7975955d ER |
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} | |
cece62b6 | 107 | rm -r $RPM_BUILD_ROOT%{_appdir}/lib/pty4j-native/linux/ppc64le |
7975955d ER |
108 | |
109 | desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop | |
110 | ||
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %post | |
115 | %update_desktop_database | |
116 | ||
117 | %postun | |
118 | %update_desktop_database | |
119 | ||
120 | # base package contains arch specific files | |
121 | %files | |
122 | %defattr(644,root,root,755) | |
123 | %doc Install-Linux-tar.txt | |
124 | %attr(755,root,root) %{_bindir}/%{product} | |
125 | %dir %{_appdir}/bin | |
126 | %{_appdir}/bin/%{product}*.vmoptions | |
127 | %{_appdir}/bin/%{product}.png | |
128 | %{_appdir}/bin/%{product}.properties | |
dd418331 | 129 | %{_appdir}/bin/%{product}.svg |
7975955d ER |
130 | %{_appdir}/bin/appletviewer.policy |
131 | %{_appdir}/bin/log.xml | |
132 | %attr(755,root,root) %{_appdir}/bin/%{product}.sh | |
bdc3065e | 133 | %attr(755,root,root) %{_appdir}/bin/format.sh |
7975955d ER |
134 | %attr(755,root,root) %{_appdir}/bin/inspect.sh |
135 | %attr(755,root,root) %{_appdir}/bin/fsnotifier* | |
bdc3065e JP |
136 | %attr(755,root,root) %{_appdir}/bin/printenv.py |
137 | %attr(755,root,root) %{_appdir}/bin/restart.py | |
dd418331 JP |
138 | %ifarch %{x8664} |
139 | %attr(755,root,root) %{_appdir}/bin/libdbm64.so | |
140 | %endif | |
7975955d ER |
141 | %{_desktopdir}/%{product}.desktop |
142 | %{_pixmapsdir}/%{product}.png | |
143 | ||
144 | # this package contains arch independant files | |
145 | %files libs | |
146 | %defattr(644,root,root,755) | |
147 | %dir %{_appdir} | |
dd418331 | 148 | %{_appdir}/build.txt |
7975955d ER |
149 | %{_appdir}/lib |
150 | %{_appdir}/license | |
151 | %{_appdir}/plugins | |
152 | %{_appdir}/help | |
5a014b00 | 153 | |
2da89e54 | 154 | %ifarch %{x8664} |
5a014b00 JP |
155 | %files jre |
156 | %defattr(644,root,root,755) | |
6d118083 JP |
157 | %dir %{_appdir}/jbr |
158 | %dir %{_appdir}/jbr/bin | |
159 | %attr(755,root,root) %{_appdir}/jbr/bin/jaotc | |
160 | %attr(755,root,root) %{_appdir}/jbr/bin/java | |
161 | %attr(755,root,root) %{_appdir}/jbr/bin/javac | |
162 | %attr(755,root,root) %{_appdir}/jbr/bin/jdb | |
17fe1af5 | 163 | %attr(755,root,root) %{_appdir}/jbr/bin/jfr |
3fc6b8ae | 164 | %attr(755,root,root) %{_appdir}/jbr/bin/jhsdb |
6d118083 JP |
165 | %attr(755,root,root) %{_appdir}/jbr/bin/jjs |
166 | %attr(755,root,root) %{_appdir}/jbr/bin/jrunscript | |
167 | %attr(755,root,root) %{_appdir}/jbr/bin/keytool | |
168 | %attr(755,root,root) %{_appdir}/jbr/bin/pack200 | |
169 | %attr(755,root,root) %{_appdir}/jbr/bin/rmid | |
170 | %attr(755,root,root) %{_appdir}/jbr/bin/rmiregistry | |
171 | %attr(755,root,root) %{_appdir}/jbr/bin/serialver | |
172 | %attr(755,root,root) %{_appdir}/jbr/bin/unpack200 | |
173 | %{_appdir}/jbr/conf | |
174 | %{_appdir}/jbr/include | |
175 | %{_appdir}/jbr/legal | |
176 | %{_appdir}/jbr/lib | |
177 | %{_appdir}/jbr/release | |
2da89e54 | 178 | %endif |