]> git.pld-linux.org Git - packages/intellij-idea-ultimate.git/blob - intellij-idea-ultimate.spec
86eef3e0211cc3e004cce1a4fe1af0b54eac67d7
[packages/intellij-idea-ultimate.git] / intellij-idea-ultimate.spec
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
6 Version:        2019.2.2
7 Release:        1
8 License:        IntelliJ IDEA Commercial
9 Group:          Development/Tools
10 Source0:        http://download.jetbrains.com/idea/ideaIU-%{version}.tar.gz
11 # NoSource0-md5:        4217504eab25e05cf5466625ce618088
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
21 Requires:       jre >= 1.8
22 %ifarch %{x8664}
23 Suggests:       %{name}-jre = %{version}-%{release}
24 %endif
25 Suggests:       java-jdbc-mysql
26 Suggests:       jdk >= 1.6
27 Suggests:       open
28 Suggests:       python
29 Conflicts:      intellij-idea
30 Conflicts:      java-jdbc-mysql < 5.1.22
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
64 %package jre
65 Summary:        Bundled JRE recommended for running IntelliJ IDEA
66 Group:          Libraries/Java
67 Requires:       %{name} = %{version}-%{release}
68
69 %description jre
70 Bundled JRE recommended for running IntelliJ IDEA.
71
72 %prep
73 %setup -qc
74 mv %{proddir}-*/* .
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
82 %endif
83 %ifarch %{x8664}
84 rm bin/%{product}.vmoptions
85 rm bin/fsnotifier
86 %endif
87 rm bin/fsnotifier-arm
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
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}}
97 cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test
98 cp -a$l bin build.txt help lib license plugins $RPM_BUILD_ROOT%{_appdir}
99 %ifarch %{x8664}
100 cp -a$l jbr $RPM_BUILD_ROOT%{_appdir}
101 %endif
102 cp -p %{product}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{product}.png
103 ln -s %{_pixmapsdir}/%{product}.png $RPM_BUILD_ROOT%{_appdir}/bin/%{product}.png
104 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop
105 ln -s %{_appdir}/bin/%{product}.sh $RPM_BUILD_ROOT%{_bindir}/%{product}
106 rm -r $RPM_BUILD_ROOT%{_appdir}/lib/pty4j-native/linux/ppc64le
107
108 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %post
114 %update_desktop_database
115
116 %postun
117 %update_desktop_database
118
119 # base package contains arch specific files
120 %files
121 %defattr(644,root,root,755)
122 %doc Install-Linux-tar.txt
123 %attr(755,root,root) %{_bindir}/%{product}
124 %dir %{_appdir}/bin
125 %{_appdir}/bin/%{product}*.vmoptions
126 %{_appdir}/bin/%{product}.png
127 %{_appdir}/bin/%{product}.properties
128 %{_appdir}/bin/%{product}.svg
129 %{_appdir}/bin/appletviewer.policy
130 %{_appdir}/bin/log.xml
131 %attr(755,root,root) %{_appdir}/bin/%{product}.sh
132 %attr(755,root,root) %{_appdir}/bin/format.sh
133 %attr(755,root,root) %{_appdir}/bin/inspect.sh
134 %attr(755,root,root) %{_appdir}/bin/fsnotifier*
135 %attr(755,root,root) %{_appdir}/bin/printenv.py
136 %attr(755,root,root) %{_appdir}/bin/restart.py
137 %ifarch %{x8664}
138 %attr(755,root,root) %{_appdir}/bin/libdbm64.so
139 %endif
140 %{_desktopdir}/%{product}.desktop
141 %{_pixmapsdir}/%{product}.png
142
143 # this package contains arch independant files
144 %files libs
145 %defattr(644,root,root,755)
146 %dir %{_appdir}
147 %{_appdir}/build.txt
148 %{_appdir}/lib
149 %{_appdir}/license
150 %{_appdir}/plugins
151 %{_appdir}/help
152
153 %ifarch %{x8664}
154 %files jre
155 %defattr(644,root,root,755)
156 %dir %{_appdir}/jbr
157 %dir %{_appdir}/jbr/bin
158 %attr(755,root,root) %{_appdir}/jbr/bin/jaotc
159 %attr(755,root,root) %{_appdir}/jbr/bin/java
160 %attr(755,root,root) %{_appdir}/jbr/bin/javac
161 %attr(755,root,root) %{_appdir}/jbr/bin/jdb
162 %attr(755,root,root) %{_appdir}/jbr/bin/jjs
163 %attr(755,root,root) %{_appdir}/jbr/bin/jrunscript
164 %attr(755,root,root) %{_appdir}/jbr/bin/keytool
165 %attr(755,root,root) %{_appdir}/jbr/bin/pack200
166 %attr(755,root,root) %{_appdir}/jbr/bin/rmid
167 %attr(755,root,root) %{_appdir}/jbr/bin/rmiregistry
168 %attr(755,root,root) %{_appdir}/jbr/bin/serialver
169 %attr(755,root,root) %{_appdir}/jbr/bin/unpack200
170 %{_appdir}/jbr/conf
171 %{_appdir}/jbr/include
172 %{_appdir}/jbr/legal
173 %{_appdir}/jbr/lib
174 %{_appdir}/jbr/release
175 %endif
This page took 0.08696 seconds and 2 git commands to generate.