]> git.pld-linux.org Git - packages/intellij-idea-ultimate.git/blob - intellij-idea-ultimate.spec
b5df19fb200f227d613448f4c4f2dc010b9139be
[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:        2016.2.5
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:        4f63ea80c9fd0129406c65cd1a02a491
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 Conflicts:      intellij-idea
26 Conflicts:      java-jdbc-mysql < 5.1.22
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 # disable debuginfo package, not useful
30 %define         _enable_debug_packages  0
31
32 # don't strip fsnotifier, it's size is checked for "outdated binary"
33 # https://bugs.archlinux.org/task/34703
34 # 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
35 %define         _noautostrip    .*/fsnotifier.*
36
37 # use /usr/lib, 64bit files do not conflict with 32bit files (64 suffix)
38 # this allows to install both arch files and to use 32bit jdk on 64bit os
39 %define         _appdir         %{_prefix}/lib/%{proddir}
40
41 # rpm5 is so damn slow, so i use this for development:
42 %define         _noautoreqfiles .*\.jar
43
44 %description
45 IntelliJ IDEA is a code-centric IDE focused on developer productivity.
46 The editor deeply understands your code and knows its way around the
47 codebase, makes great suggestions right when you need them, and is
48 always ready to help you shape your code.
49
50 %package libs
51 Summary:        Libraries for IntelliJ IDEA
52 Group:          Libraries/Java
53 %if "%{_rpmversion}" >= "5"
54 BuildArch:      noarch
55 %endif
56
57 %description libs
58 Libraries for IntelliJ IDEA.
59
60 %package jre
61 Summary:        Bundled JRE recommended for running IntelliJ IDEA
62 Group:          Libraries/Java
63 Requires:       %{name} = %{version}-%{release}
64
65 %description jre
66 Bundled JRE recommended for running IntelliJ IDEA.
67
68 %prep
69 %setup -qc
70 mv %{proddir}-*/* .
71 %patch0 -p1
72
73 # keep only single arch files (don't want to pull 32bit deps by default),
74 # if you want to mix, install rpm from both arch
75 %ifarch %{ix86}
76 rm bin/%{product}64.vmoptions
77 rm bin/fsnotifier64
78 rm bin/libbreakgen64.so
79 rm bin/libyjpagent-linux64.so
80 %endif
81 %ifarch %{x8664}
82 rm bin/%{product}.vmoptions
83 rm bin/fsnotifier
84 rm bin/libbreakgen.so
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/inspect.sh
131 %attr(755,root,root) %{_appdir}/bin/fsnotifier*
132 %attr(755,root,root) %{_appdir}/bin/libbreakgen*.so
133 %attr(755,root,root) %{_appdir}/bin/libyjpagent*.so
134 %{_desktopdir}/%{product}.desktop
135 %{_pixmapsdir}/%{product}.png
136
137 # this package contains arch independant files
138 %files libs
139 %defattr(644,root,root,755)
140 %dir %{_appdir}
141 %{_appdir}/lib
142 %{_appdir}/license
143 %{_appdir}/plugins
144 %{_appdir}/help
145
146 %files jre
147 %defattr(644,root,root,755)
148 %dir %{_appdir}/jre
149 %dir %{_appdir}/jre/jre
150 %dir %{_appdir}/jre/jre/bin
151 %attr(755,root,root) %{_appdir}/jre/jre/bin/java
152 %attr(755,root,root) %{_appdir}/jre/jre/bin/jjs
153 %attr(755,root,root) %{_appdir}/jre/jre/bin/keytool
154 %attr(755,root,root) %{_appdir}/jre/jre/bin/orbd
155 %attr(755,root,root) %{_appdir}/jre/jre/bin/pack200
156 %attr(755,root,root) %{_appdir}/jre/jre/bin/policytool
157 %attr(755,root,root) %{_appdir}/jre/jre/bin/rmid
158 %attr(755,root,root) %{_appdir}/jre/jre/bin/rmiregistry
159 %attr(755,root,root) %{_appdir}/jre/jre/bin/servertool
160 %attr(755,root,root) %{_appdir}/jre/jre/bin/tnameserv
161 %attr(755,root,root) %{_appdir}/jre/jre/bin/unpack200
162 %{_appdir}/jre/jre/lib
163 %{_appdir}/jre/jre/man
164 %{_appdir}/jre/jre/ASSEMBLY_EXCEPTION
165 %{_appdir}/jre/jre/LICENSE
166 %{_appdir}/jre/jre/release
167 %{_appdir}/jre/jre/THIRD_PARTY_README
168 %{_appdir}/jre/lib
This page took 0.050797 seconds and 2 git commands to generate.