]> git.pld-linux.org Git - packages/intellij-idea-ultimate.git/blob - intellij-idea-ultimate.spec
6f27afa7b202e0dc38f7bb760ee1402ce2186092
[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:        15.0
7 Release:        1
8 License:        IntelliJ IDEA Commercial
9 Group:          Development/Tools
10 Source0:        http://download-ln.jetbrains.com/idea/ideaIU-%{version}.tar.gz
11 # NoSource0-md5:        4da955e200b6e1b4f82ca81871cd01c0
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.6
22 Suggests:       java-jdbc-mysql
23 Suggests:       jdk >= 1.6
24 Conflicts:      intellij-idea
25 Conflicts:      java-jdbc-mysql < 5.1.22
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 # disable debuginfo package, not useful
29 %define         _enable_debug_packages  0
30
31 # don't strip fsnotifier, it's size is checked for "outdated binary"
32 # https://bugs.archlinux.org/task/34703
33 # 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
34 %define         _noautostrip    .*/fsnotifier.*
35
36 # use /usr/lib, 64bit files do not conflict with 32bit files (64 suffix)
37 # this allows to install both arch files and to use 32bit jdk on 64bit os
38 %define         _appdir         %{_prefix}/lib/%{proddir}
39
40 # rpm5 is so damn slow, so i use this for development:
41 %define         _noautoreqfiles .*\.jar
42
43 %description
44 IntelliJ IDEA is a code-centric IDE focused on developer productivity.
45 The editor deeply understands your code and knows its way around the
46 codebase, makes great suggestions right when you need them, and is
47 always ready to help you shape your code.
48
49 %package libs
50 Summary:        Libraries for IntelliJ IDEA
51 Group:          Libraries/Java
52 %if "%{_rpmversion}" >= "5"
53 BuildArch:      noarch
54 %endif
55
56 %description libs
57 Libraries for IntelliJ IDEA.
58
59 %prep
60 %setup -qc
61 mv %{proddir}-*/* .
62 %patch0 -p1
63
64 # keep only single arch files (don't want to pull 32bit deps by default),
65 # if you want to mix, install rpm from both arch
66 %ifarch %{ix86}
67 rm bin/%{product}64.vmoptions
68 rm bin/fsnotifier64
69 rm bin/libbreakgen64.so
70 rm bin/libyjpagent-linux64.so
71 %endif
72 %ifarch %{x8664}
73 rm bin/%{product}.vmoptions
74 rm bin/fsnotifier
75 rm bin/libbreakgen.so
76 rm bin/libyjpagent-linux.so
77 %endif
78 rm bin/fsnotifier-arm
79 chmod a+rx bin/*.so bin/fsnotifier*
80 mv bin/%{product}.png .
81
82 # cleanup backups after patching
83 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}}
88 cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test
89 cp -a$l bin help lib license plugins $RPM_BUILD_ROOT%{_appdir}
90 cp -p %{product}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{product}.png
91 ln -s %{_pixmapsdir}/%{product}.png $RPM_BUILD_ROOT%{_appdir}/bin/%{product}.png
92 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop
93 ln -s %{_appdir}/bin/%{product}.sh $RPM_BUILD_ROOT%{_bindir}/%{product}
94 rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/gradle/lib/native-platform-{freebsd,osx,windows}*
95 rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/tfsIntegration/lib/native/{aix,freebsd,hpux,macosx,solaris,win32}
96 rm -r $RPM_BUILD_ROOT%{_appdir}/plugins/tfsIntegration/lib/native/linux/{arm,ppc}
97
98 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{product}.desktop
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post
104 %update_desktop_database
105
106 %postun
107 %update_desktop_database
108
109 # base package contains arch specific files
110 %files
111 %defattr(644,root,root,755)
112 %doc Install-Linux-tar.txt
113 %attr(755,root,root) %{_bindir}/%{product}
114 %dir %{_appdir}/bin
115 %{_appdir}/bin/%{product}*.vmoptions
116 %{_appdir}/bin/%{product}.png
117 %{_appdir}/bin/%{product}.properties
118 %{_appdir}/bin/appletviewer.policy
119 %{_appdir}/bin/log.xml
120 %attr(755,root,root) %{_appdir}/bin/%{product}.sh
121 %attr(755,root,root) %{_appdir}/bin/inspect.sh
122 %attr(755,root,root) %{_appdir}/bin/fsnotifier*
123 %attr(755,root,root) %{_appdir}/bin/libbreakgen*.so
124 %attr(755,root,root) %{_appdir}/bin/libyjpagent*.so
125 %{_desktopdir}/%{product}.desktop
126 %{_pixmapsdir}/%{product}.png
127
128 # this package contains arch independant files
129 %files libs
130 %defattr(644,root,root,755)
131 %dir %{_appdir}
132 %{_appdir}/lib
133 %{_appdir}/license
134 %{_appdir}/plugins
135 %{_appdir}/help
This page took 0.07724 seconds and 2 git commands to generate.