1 %define product phpstorm
2 %include /usr/lib/rpm/macros.java
3 Summary: PhpStorm Early Access Program
7 # TODO: figure out what's the licensing and redistribution
9 Group: Development/Tools
10 Source0: http://download.jetbrains.com/webide/PhpStorm-EAP-%{version}.tar.gz
11 # NoSource0-md5: 285cc40847fbfb55f25b17e0fa962a32
13 Source1: %{product}.desktop
14 Source2: %{product}.py
16 URL: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program
17 BuildRequires: jpackage-utils
18 BuildRequires: rpm-javaprov
19 BuildRequires: rpmbuild(macros) >= 1.300
21 Requires: jre-X11 >= 1.7
25 Suggests: java-jdbc-mysql
27 Conflicts: java-jdbc-mysql < 5.1.22
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 # don't strip fsnotifier, it's size is checked for "outdated binary"
31 # https://bugs.archlinux.org/task/34703
32 # 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
33 %define _noautostrip .*/fsnotifier.*
35 # use /usr/lib, 64bit files do not conflict with 32bit files (64 suffix)
36 # this allows to install both arch files and to use 32bit jdk on 64bit os
37 %define _appdir %{_prefix}/lib/%{product}
40 PhpStorm is a lightweight and smart PHP IDE focused on developer
41 productivity that deeply understands your code, provides smart code
42 completion, quick navigation and on-the-fly error checking. It is
43 always ready to help you shape your code, run unit-tests or provide
46 Note: PhpStorm includes all the functionality of WebStorm (HTML/CSS
47 Editor, JavaScript Editor) and adds full-fledged support for PHP.
50 %setup -qn PhpStorm-%{version}
52 # keep only single arch files (don't want to pull 32bit deps by default),
53 # if you want to mix, install rpm from both arch
56 rm bin/libyjpagent-linux64.so
57 rm bin/phpstorm64.vmoptions
58 rm -r lib/libpty/linux/x86_64
62 rm bin/libyjpagent-linux.so
63 rm bin/phpstorm.vmoptions
64 rm -r lib/libpty/linux/x86
68 chmod a+rx bin/*.so bin/fsnotifier* lib/libpty/linux/*/libpty.so
71 # cleanup backups after patching
72 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}}
77 cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test
78 cp -a$l bin help lib plugins $RPM_BUILD_ROOT%{_appdir}
79 ln -s %{_pixmapsdir}/%{product}.png $RPM_BUILD_ROOT%{_appdir}/bin
80 cp -p phpstorm.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{product}.png
81 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
82 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/pstorm
83 ln -s pstorm $RPM_BUILD_ROOT%{_bindir}/%{product}
86 rm -rf $RPM_BUILD_ROOT
89 %defattr(644,root,root,755)
90 %attr(755,root,root) %{_bindir}/%{product}
91 %attr(755,root,root) %{_bindir}/pstorm
96 %{_appdir}/bin/%{product}*.vmoptions
97 %{_appdir}/bin/%{product}.png
98 %{_appdir}/bin/idea.properties
99 %{_appdir}/bin/log.xml
100 %attr(755,root,root) %{_appdir}/bin/%{product}.sh
101 %attr(755,root,root) %{_appdir}/bin/*.py
102 %attr(755,root,root) %{_appdir}/bin/format.sh
103 %attr(755,root,root) %{_appdir}/bin/fsnotifier*
104 %attr(755,root,root) %{_appdir}/bin/inspect.sh
105 %attr(755,root,root) %{_appdir}/bin/libyjpagent-linux*.so
108 %dir %{_appdir}/lib/libpty
109 %dir %{_appdir}/lib/libpty/linux
110 %dir %{_appdir}/lib/libpty/linux/x86*
111 %attr(755,root,root) %{_appdir}/lib/libpty/linux/x86*/libpty.so
112 %{_desktopdir}/%{product}.desktop
113 %{_pixmapsdir}/%{product}.png