]>
Commit | Line | Data |
---|---|---|
7975955d ER |
1 | %define product idea |
2 | %define proddir %{product}-IU | |
3 | %include /usr/lib/rpm/macros.java | |
4 | Summary: IntelliJ IDEA - The Most Intelligent Java IDE | |
5 | Name: intellij-idea-ultimate | |
806eca2d | 6 | Version: 2018.3.1 |
e2927df0 | 7 | Release: 1 |
7975955d ER |
8 | License: IntelliJ IDEA Commercial |
9 | Group: Development/Tools | |
af1d6839 | 10 | Source0: http://download.jetbrains.com/idea/ideaIU-%{version}.tar.gz |
806eca2d | 11 | # NoSource0-md5: 3ac6dc1b30884336b8d1b51416766814 |
7975955d ER |
12 | NoSource: 0 |
13 | Source1: %{product}.desktop | |
14 | Patch0: xdg-paths.patch | |
15 | URL: http://www.jetbrains.org/ | |
16 | BuildRequires: desktop-file-utils | |
17 | BuildRequires: rpm-javaprov | |
18 | BuildRequires: rpmbuild(macros) >= 1.596 | |
19 | Requires: %{name}-libs = %{version}-%{release} | |
20 | Requires: desktop-file-utils | |
00b4690e | 21 | Requires: jre >= 1.8 |
2da89e54 | 22 | %ifarch %{x8664} |
5a014b00 | 23 | Suggests: %{name}-jre = %{version}-%{release} |
2da89e54 | 24 | %endif |
c8f36c7d | 25 | Suggests: java-jdbc-mysql |
7975955d | 26 | Suggests: jdk >= 1.6 |
8c33db2f JP |
27 | Suggests: open |
28 | Suggests: python | |
7975955d | 29 | Conflicts: intellij-idea |
c8f36c7d | 30 | Conflicts: java-jdbc-mysql < 5.1.22 |
7975955d ER |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | # disable debuginfo package, not useful | |
34 | %define _enable_debug_packages 0 | |
35 | ||
36 | # don't strip fsnotifier, it's size is checked for "outdated binary" | |
37 | # https://bugs.archlinux.org/task/34703 | |
38 | # 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 | |
39 | %define _noautostrip .*/fsnotifier.* | |
40 | ||
41 | # use /usr/lib, 64bit files do not conflict with 32bit files (64 suffix) | |
42 | # this allows to install both arch files and to use 32bit jdk on 64bit os | |
43 | %define _appdir %{_prefix}/lib/%{proddir} | |
44 | ||
45 | # rpm5 is so damn slow, so i use this for development: | |
46 | %define _noautoreqfiles .*\.jar | |
47 | ||
48 | %description | |
49 | IntelliJ IDEA is a code-centric IDE focused on developer productivity. | |
50 | The editor deeply understands your code and knows its way around the | |
51 | codebase, makes great suggestions right when you need them, and is | |
52 | always ready to help you shape your code. | |
53 | ||
54 | %package libs | |
55 | Summary: Libraries for IntelliJ IDEA | |
56 | Group: Libraries/Java | |
57 | %if "%{_rpmversion}" >= "5" | |
58 | BuildArch: noarch | |
59 | %endif | |
60 | ||
61 | %description libs | |
62 | Libraries for IntelliJ IDEA. | |
63 | ||
5a014b00 JP |
64 | %package jre |
65 | Summary: Bundled JRE recommended for running IntelliJ IDEA | |
66 | Group: Libraries/Java | |
49dcdda8 | 67 | Requires: %{name} = %{version}-%{release} |
5a014b00 JP |
68 | |
69 | %description jre | |
70 | Bundled JRE recommended for running IntelliJ IDEA. | |
71 | ||
7975955d | 72 | %prep |
4063f81f ER |
73 | %setup -qc |
74 | mv %{proddir}-*/* . | |
7975955d ER |
75 | %patch0 -p1 |
76 | ||
77 | # keep only single arch files (don't want to pull 32bit deps by default), | |
78 | # if you want to mix, install rpm from both arch | |
79 | %ifarch %{ix86} | |
80 | rm bin/%{product}64.vmoptions | |
81 | rm bin/fsnotifier64 | |
7975955d ER |
82 | rm bin/libyjpagent-linux64.so |
83 | %endif | |
84 | %ifarch %{x8664} | |
85 | rm bin/%{product}.vmoptions | |
86 | rm bin/fsnotifier | |
7975955d ER |
87 | rm bin/libyjpagent-linux.so |
88 | %endif | |
59765403 | 89 | rm bin/fsnotifier-arm |
7975955d ER |
90 | chmod a+rx bin/*.so bin/fsnotifier* |
91 | mv bin/%{product}.png . | |
92 | ||
93 | # cleanup backups after patching | |
94 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}} | |
99 | cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test | |
dd418331 | 100 | cp -a$l bin build.txt help lib license plugins $RPM_BUILD_ROOT%{_appdir} |
2da89e54 JP |
101 | %ifarch %{x8664} |
102 | cp -a$l jre64 $RPM_BUILD_ROOT%{_appdir} | |
103 | %endif | |
7975955d ER |
104 | cp -p %{product}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{product}.png |
105 | ln -s %{_pixmapsdir}/%{product}.png $RPM_BUILD_ROOT%{_appdir}/bin/%{product}.png | |
106 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop | |
107 | ln -s %{_appdir}/bin/%{product}.sh $RPM_BUILD_ROOT%{_bindir}/%{product} | |
59765403 JP |
108 | rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/tfsIntegration/lib/native/{aix,freebsd,hpux,macosx,solaris,win32} |
109 | rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/tfsIntegration/lib/native/linux/{arm,ppc} | |
7975955d ER |
110 | |
111 | desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop | |
112 | ||
113 | %clean | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %post | |
117 | %update_desktop_database | |
118 | ||
119 | %postun | |
120 | %update_desktop_database | |
121 | ||
122 | # base package contains arch specific files | |
123 | %files | |
124 | %defattr(644,root,root,755) | |
125 | %doc Install-Linux-tar.txt | |
126 | %attr(755,root,root) %{_bindir}/%{product} | |
127 | %dir %{_appdir}/bin | |
128 | %{_appdir}/bin/%{product}*.vmoptions | |
129 | %{_appdir}/bin/%{product}.png | |
130 | %{_appdir}/bin/%{product}.properties | |
dd418331 | 131 | %{_appdir}/bin/%{product}.svg |
7975955d ER |
132 | %{_appdir}/bin/appletviewer.policy |
133 | %{_appdir}/bin/log.xml | |
134 | %attr(755,root,root) %{_appdir}/bin/%{product}.sh | |
bdc3065e | 135 | %attr(755,root,root) %{_appdir}/bin/format.sh |
7975955d ER |
136 | %attr(755,root,root) %{_appdir}/bin/inspect.sh |
137 | %attr(755,root,root) %{_appdir}/bin/fsnotifier* | |
7975955d | 138 | %attr(755,root,root) %{_appdir}/bin/libyjpagent*.so |
bdc3065e JP |
139 | %attr(755,root,root) %{_appdir}/bin/printenv.py |
140 | %attr(755,root,root) %{_appdir}/bin/restart.py | |
dd418331 JP |
141 | %ifarch %{x8664} |
142 | %attr(755,root,root) %{_appdir}/bin/libdbm64.so | |
143 | %endif | |
7975955d ER |
144 | %{_desktopdir}/%{product}.desktop |
145 | %{_pixmapsdir}/%{product}.png | |
146 | ||
147 | # this package contains arch independant files | |
148 | %files libs | |
149 | %defattr(644,root,root,755) | |
150 | %dir %{_appdir} | |
dd418331 | 151 | %{_appdir}/build.txt |
7975955d ER |
152 | %{_appdir}/lib |
153 | %{_appdir}/license | |
154 | %{_appdir}/plugins | |
155 | %{_appdir}/help | |
5a014b00 | 156 | |
2da89e54 | 157 | %ifarch %{x8664} |
5a014b00 JP |
158 | %files jre |
159 | %defattr(644,root,root,755) | |
2da89e54 JP |
160 | %dir %{_appdir}/jre64 |
161 | %dir %{_appdir}/jre64/bin | |
162 | %attr(755,root,root) %{_appdir}/jre64/bin/java | |
163 | %attr(755,root,root) %{_appdir}/jre64/bin/jjs | |
164 | %attr(755,root,root) %{_appdir}/jre64/bin/keytool | |
165 | %attr(755,root,root) %{_appdir}/jre64/bin/orbd | |
166 | %attr(755,root,root) %{_appdir}/jre64/bin/pack200 | |
167 | %attr(755,root,root) %{_appdir}/jre64/bin/policytool | |
168 | %attr(755,root,root) %{_appdir}/jre64/bin/rmid | |
169 | %attr(755,root,root) %{_appdir}/jre64/bin/rmiregistry | |
170 | %attr(755,root,root) %{_appdir}/jre64/bin/servertool | |
171 | %attr(755,root,root) %{_appdir}/jre64/bin/tnameserv | |
172 | %attr(755,root,root) %{_appdir}/jre64/bin/unpack200 | |
173 | %{_appdir}/jre64/lib | |
174 | %{_appdir}/jre64/ASSEMBLY_EXCEPTION | |
175 | %{_appdir}/jre64/LICENSE | |
176 | %{_appdir}/jre64/release | |
177 | %{_appdir}/jre64/THIRD_PARTY_README | |
178 | %endif |