]> git.pld-linux.org Git - packages/intellij-idea-ultimate.git/blob - intellij-idea-ultimate.spec
up to 2017.1
[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:        2017.1
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:        625623556cdbb93f863dae7dc34ac618
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 Suggests:       %{name}-jre = %{version}-%{release}
23 Suggests:       java-jdbc-mysql
24 Suggests:       jdk >= 1.6
25 Suggests:       open
26 Suggests:       python
27 Conflicts:      intellij-idea
28 Conflicts:      java-jdbc-mysql < 5.1.22
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
62 %package jre
63 Summary:        Bundled JRE recommended for running IntelliJ IDEA
64 Group:          Libraries/Java
65 Requires:       %{name} = %{version}-%{release}
66
67 %description jre
68 Bundled JRE recommended for running IntelliJ IDEA.
69
70 %prep
71 %setup -qc
72 mv %{proddir}-*/* .
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/libyjpagent-linux64.so
81 %endif
82 %ifarch %{x8664}
83 rm bin/%{product}.vmoptions
84 rm bin/fsnotifier
85 rm bin/libyjpagent-linux.so
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 help jre lib license plugins $RPM_BUILD_ROOT%{_appdir}
99 cp -p %{product}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{product}.png
100 ln -s %{_pixmapsdir}/%{product}.png $RPM_BUILD_ROOT%{_appdir}/bin/%{product}.png
101 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop
102 ln -s %{_appdir}/bin/%{product}.sh $RPM_BUILD_ROOT%{_bindir}/%{product}
103 rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/gradle/lib/native-platform-{freebsd,osx,windows}*
104 rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/tfsIntegration/lib/native/{aix,freebsd,hpux,macosx,solaris,win32}
105 rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/tfsIntegration/lib/native/linux/{arm,ppc}
106
107 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post
113 %update_desktop_database
114
115 %postun
116 %update_desktop_database
117
118 # base package contains arch specific files
119 %files
120 %defattr(644,root,root,755)
121 %doc Install-Linux-tar.txt
122 %attr(755,root,root) %{_bindir}/%{product}
123 %dir %{_appdir}/bin
124 %{_appdir}/bin/%{product}*.vmoptions
125 %{_appdir}/bin/%{product}.png
126 %{_appdir}/bin/%{product}.properties
127 %{_appdir}/bin/appletviewer.policy
128 %{_appdir}/bin/log.xml
129 %attr(755,root,root) %{_appdir}/bin/%{product}.sh
130 %attr(755,root,root) %{_appdir}/bin/format.sh
131 %attr(755,root,root) %{_appdir}/bin/inspect.sh
132 %attr(755,root,root) %{_appdir}/bin/fsnotifier*
133 %attr(755,root,root) %{_appdir}/bin/libyjpagent*.so
134 %attr(755,root,root) %{_appdir}/bin/printenv.py
135 %attr(755,root,root) %{_appdir}/bin/restart.py
136 %{_desktopdir}/%{product}.desktop
137 %{_pixmapsdir}/%{product}.png
138
139 # this package contains arch independant files
140 %files libs
141 %defattr(644,root,root,755)
142 %dir %{_appdir}
143 %{_appdir}/lib
144 %{_appdir}/license
145 %{_appdir}/plugins
146 %{_appdir}/help
147
148 %files jre
149 %defattr(644,root,root,755)
150 %dir %{_appdir}/jre
151 %dir %{_appdir}/jre/bin
152 %attr(755,root,root) %{_appdir}/jre/bin/java
153 %attr(755,root,root) %{_appdir}/jre/bin/jjs
154 %attr(755,root,root) %{_appdir}/jre/bin/keytool
155 %attr(755,root,root) %{_appdir}/jre/bin/orbd
156 %attr(755,root,root) %{_appdir}/jre/bin/pack200
157 %attr(755,root,root) %{_appdir}/jre/bin/policytool
158 %attr(755,root,root) %{_appdir}/jre/bin/rmid
159 %attr(755,root,root) %{_appdir}/jre/bin/rmiregistry
160 %attr(755,root,root) %{_appdir}/jre/bin/servertool
161 %attr(755,root,root) %{_appdir}/jre/bin/tnameserv
162 %attr(755,root,root) %{_appdir}/jre/bin/unpack200
163 %{_appdir}/jre/lib
164 %{_appdir}/jre/ASSEMBLY_EXCEPTION
165 %{_appdir}/jre/LICENSE
166 %{_appdir}/jre/release
167 %{_appdir}/jre/THIRD_PARTY_README
This page took 0.072059 seconds and 3 git commands to generate.