]>
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 | |
613709b1 | 6 | Version: 2016.3.4 |
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 |
613709b1 | 11 | # NoSource0-md5: 440561a9019f05187b73453fc3856403 |
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 |
5a014b00 | 22 | Suggests: %{name}-jre = %{version}-%{release} |
c8f36c7d | 23 | Suggests: java-jdbc-mysql |
7975955d | 24 | Suggests: jdk >= 1.6 |
8c33db2f JP |
25 | Suggests: open |
26 | Suggests: python | |
7975955d | 27 | Conflicts: intellij-idea |
c8f36c7d | 28 | Conflicts: java-jdbc-mysql < 5.1.22 |
7975955d ER |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | # disable debuginfo package, not useful | |
32 | %define _enable_debug_packages 0 | |
33 | ||
34 | # don't strip fsnotifier, it's size is checked for "outdated binary" | |
35 | # https://bugs.archlinux.org/task/34703 | |
36 | # 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 | |
37 | %define _noautostrip .*/fsnotifier.* | |
38 | ||
39 | # use /usr/lib, 64bit files do not conflict with 32bit files (64 suffix) | |
40 | # this allows to install both arch files and to use 32bit jdk on 64bit os | |
41 | %define _appdir %{_prefix}/lib/%{proddir} | |
42 | ||
43 | # rpm5 is so damn slow, so i use this for development: | |
44 | %define _noautoreqfiles .*\.jar | |
45 | ||
46 | %description | |
47 | IntelliJ IDEA is a code-centric IDE focused on developer productivity. | |
48 | The editor deeply understands your code and knows its way around the | |
49 | codebase, makes great suggestions right when you need them, and is | |
50 | always ready to help you shape your code. | |
51 | ||
52 | %package libs | |
53 | Summary: Libraries for IntelliJ IDEA | |
54 | Group: Libraries/Java | |
55 | %if "%{_rpmversion}" >= "5" | |
56 | BuildArch: noarch | |
57 | %endif | |
58 | ||
59 | %description libs | |
60 | Libraries for IntelliJ IDEA. | |
61 | ||
5a014b00 JP |
62 | %package jre |
63 | Summary: Bundled JRE recommended for running IntelliJ IDEA | |
64 | Group: Libraries/Java | |
49dcdda8 | 65 | Requires: %{name} = %{version}-%{release} |
5a014b00 JP |
66 | |
67 | %description jre | |
68 | Bundled JRE recommended for running IntelliJ IDEA. | |
69 | ||
7975955d | 70 | %prep |
4063f81f ER |
71 | %setup -qc |
72 | mv %{proddir}-*/* . | |
7975955d ER |
73 | %patch0 -p1 |
74 | ||
75 | # keep only single arch files (don't want to pull 32bit deps by default), | |
76 | # if you want to mix, install rpm from both arch | |
77 | %ifarch %{ix86} | |
78 | rm bin/%{product}64.vmoptions | |
79 | rm bin/fsnotifier64 | |
80 | rm bin/libbreakgen64.so | |
81 | rm bin/libyjpagent-linux64.so | |
82 | %endif | |
83 | %ifarch %{x8664} | |
84 | rm bin/%{product}.vmoptions | |
85 | rm bin/fsnotifier | |
86 | rm bin/libbreakgen.so | |
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 | |
5a014b00 | 100 | cp -a$l bin help jre lib license plugins $RPM_BUILD_ROOT%{_appdir} |
7975955d ER |
101 | cp -p %{product}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{product}.png |
102 | ln -s %{_pixmapsdir}/%{product}.png $RPM_BUILD_ROOT%{_appdir}/bin/%{product}.png | |
103 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop | |
104 | ln -s %{_appdir}/bin/%{product}.sh $RPM_BUILD_ROOT%{_bindir}/%{product} | |
59765403 JP |
105 | rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/gradle/lib/native-platform-{freebsd,osx,windows}* |
106 | rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/tfsIntegration/lib/native/{aix,freebsd,hpux,macosx,solaris,win32} | |
107 | rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/tfsIntegration/lib/native/linux/{arm,ppc} | |
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 | |
129 | %{_appdir}/bin/appletviewer.policy | |
130 | %{_appdir}/bin/log.xml | |
131 | %attr(755,root,root) %{_appdir}/bin/%{product}.sh | |
bdc3065e | 132 | %attr(755,root,root) %{_appdir}/bin/format.sh |
7975955d ER |
133 | %attr(755,root,root) %{_appdir}/bin/inspect.sh |
134 | %attr(755,root,root) %{_appdir}/bin/fsnotifier* | |
135 | %attr(755,root,root) %{_appdir}/bin/libbreakgen*.so | |
136 | %attr(755,root,root) %{_appdir}/bin/libyjpagent*.so | |
bdc3065e JP |
137 | %attr(755,root,root) %{_appdir}/bin/printenv.py |
138 | %attr(755,root,root) %{_appdir}/bin/restart.py | |
7975955d ER |
139 | %{_desktopdir}/%{product}.desktop |
140 | %{_pixmapsdir}/%{product}.png | |
141 | ||
142 | # this package contains arch independant files | |
143 | %files libs | |
144 | %defattr(644,root,root,755) | |
145 | %dir %{_appdir} | |
146 | %{_appdir}/lib | |
147 | %{_appdir}/license | |
148 | %{_appdir}/plugins | |
149 | %{_appdir}/help | |
5a014b00 JP |
150 | |
151 | %files jre | |
152 | %defattr(644,root,root,755) | |
153 | %dir %{_appdir}/jre | |
154 | %dir %{_appdir}/jre/jre | |
155 | %dir %{_appdir}/jre/jre/bin | |
156 | %attr(755,root,root) %{_appdir}/jre/jre/bin/java | |
157 | %attr(755,root,root) %{_appdir}/jre/jre/bin/jjs | |
158 | %attr(755,root,root) %{_appdir}/jre/jre/bin/keytool | |
159 | %attr(755,root,root) %{_appdir}/jre/jre/bin/orbd | |
160 | %attr(755,root,root) %{_appdir}/jre/jre/bin/pack200 | |
161 | %attr(755,root,root) %{_appdir}/jre/jre/bin/policytool | |
162 | %attr(755,root,root) %{_appdir}/jre/jre/bin/rmid | |
163 | %attr(755,root,root) %{_appdir}/jre/jre/bin/rmiregistry | |
164 | %attr(755,root,root) %{_appdir}/jre/jre/bin/servertool | |
165 | %attr(755,root,root) %{_appdir}/jre/jre/bin/tnameserv | |
166 | %attr(755,root,root) %{_appdir}/jre/jre/bin/unpack200 | |
167 | %{_appdir}/jre/jre/lib | |
5a014b00 JP |
168 | %{_appdir}/jre/jre/ASSEMBLY_EXCEPTION |
169 | %{_appdir}/jre/jre/LICENSE | |
170 | %{_appdir}/jre/jre/release | |
171 | %{_appdir}/jre/jre/THIRD_PARTY_README | |
172 | %{_appdir}/jre/lib |