1 %include /usr/lib/rpm/macros.java
2 Summary: Lightweight and Smart PHP IDE
6 # TODO: figure out what's the licensing and redistribution
8 Group: Development/Tools
9 Source0: http://download.jetbrains.com/webide/PhpStorm-%{version}.tar.gz
10 # NoSource0-md5: 5c68dce5fa53ce2ff42fa8a590561c40
12 Source1: %{name}.desktop
14 URL: http://www.jetbrains.com/phpstorm/
15 BuildRequires: jpackage-utils
16 BuildRequires: rpm-javaprov
17 BuildRequires: rpmbuild(macros) >= 1.300
19 Requires: java-commons-codec >= 1.3
20 Requires: java-commons-collections
22 #Requires: java-commons-lang >= 2.4
23 Requires: java-jgoodies-forms
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.*
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/%{name}
42 PhpStorm is a lightweight and smart PHP IDE focused on developer
43 productivity that deeply understands your code, provides smart code
44 completion, quick navigation and on-the-fly error checking. It is
45 always ready to help you shape your code, run unit-tests or provide
48 Note: PhpStorm includes all the functionality of WebStorm (HTML/CSS
49 Editor, JavaScript Editor) and adds full-fledged support for PHP.
52 %setup -qn PhpStorm-133.982
54 # keep only single arch files (don't want to pull 32bit deps by default),
55 # if you want to mix, install rpm from both arch
58 rm bin/libyjpagent-linux64.so
59 rm bin/phpstorm64.vmoptions
63 rm bin/libyjpagent-linux.so
64 rm bin/phpstorm.vmoptions
67 chmod a+rx bin/*.so bin/fsnotifier*
70 # cleanup backups after patching
71 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}}
76 cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test
77 cp -p webide.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
78 cp -a$l bin help lib license plugins $RPM_BUILD_ROOT%{_appdir}
79 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
80 ln -s %{_appdir}/bin/phpstorm.sh $RPM_BUILD_ROOT%{_bindir}/phpstorm
82 # replace with system jars
83 ln -snf %{_javadir}/commons-codec-1.3.jar $RPM_BUILD_ROOT%{_appdir}/lib
84 ln -snf %{_javadir}/jgoodies-forms.jar $RPM_BUILD_ROOT%{_appdir}/lib/jgoodies-forms.jar
85 ln -snf %{_javadir}/log4j.jar $RPM_BUILD_ROOT%{_appdir}/lib/log4j.jar
87 #ln -snf %{_javadir}/commons-collections.jar $RPM_BUILD_ROOT%{_appdir}/lib/commons-collections.jar
88 #ln -snf %{_javadir}/jdom.jar $RPM_BUILD_ROOT%{_appdir}/lib/jdom.jar
89 #ln -snf %{_javadir}/xercesImpl.jar $RPM_BUILD_ROOT%{_appdir}/lib/xerces.jar
92 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %attr(755,root,root) %{_bindir}/%{name}
103 %{_appdir}/bin/phpstorm*.vmoptions
104 %{_appdir}/bin/idea.properties
105 %{_appdir}/bin/log.xml
106 %attr(755,root,root) %{_appdir}/bin/phpstorm.sh
107 %attr(755,root,root) %{_appdir}/bin/inspect.sh
108 %attr(755,root,root) %{_appdir}/bin/fsnotifier*
109 %attr(755,root,root) %{_appdir}/bin/libyjpagent-linux*.so
110 %{_desktopdir}/%{name}.desktop
111 %{_pixmapsdir}/%{name}.png