]>
Commit | Line | Data |
---|---|---|
1 | Summary: Lightweight and Smart PHP IDE | |
2 | Name: phpstorm | |
3 | Version: 2017.1.4 | |
4 | Release: 1 | |
5 | # TODO: figure out what's the licensing and redistribution | |
6 | License: ? | |
7 | Group: Development/Tools | |
8 | Source0: https://download.jetbrains.com/webide/PhpStorm-%{version}.tar.gz | |
9 | # NoSource0-md5: 1aa6f479b6edb92586388acb0b8e73a2 | |
10 | NoSource: 0 | |
11 | Source1: %{name}.desktop | |
12 | Source2: %{name}.py | |
13 | Patch0: pld.patch | |
14 | URL: http://www.jetbrains.com/phpstorm/ | |
15 | BuildRequires: jpackage-utils | |
16 | BuildRequires: rpm-javaprov | |
17 | BuildRequires: rpmbuild(macros) >= 1.300 | |
18 | BuildRequires: unzip | |
19 | Requires: jre-X11 >= 1.7 | |
20 | Requires: which | |
21 | Suggests: cvs | |
22 | Suggests: git-core | |
23 | Suggests: java-jdbc-mysql | |
24 | Suggests: subversion | |
25 | Conflicts: java-jdbc-mysql < 5.1.22 | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | # don't strip fsnotifier, it's size is checked for "outdated binary" | |
29 | # https://bugs.archlinux.org/task/34703 | |
30 | # 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 | |
31 | %define _noautostrip .*/fsnotifier.* | |
32 | ||
33 | # use /usr/lib, 64bit files do not conflict with 32bit files (64 suffix) | |
34 | # this allows to install both arch files and to use 32bit jdk on 64bit os | |
35 | %define _appdir %{_prefix}/lib/%{name} | |
36 | ||
37 | %description | |
38 | PhpStorm is a lightweight and smart PHP IDE focused on developer | |
39 | productivity that deeply understands your code, provides smart code | |
40 | completion, quick navigation and on-the-fly error checking. It is | |
41 | always ready to help you shape your code, run unit-tests or provide | |
42 | visual debugging. | |
43 | ||
44 | Note: PhpStorm includes all the functionality of WebStorm (HTML/CSS | |
45 | Editor, JavaScript Editor) and adds full-fledged support for PHP. | |
46 | ||
47 | %prep | |
48 | %setup -qn PhpStorm-171.4694.2 | |
49 | ||
50 | # keep only single arch files (don't want to pull 32bit deps by default), | |
51 | # if you want to mix, install rpm from both arch | |
52 | %ifarch %{ix86} | |
53 | rm bin/fsnotifier64 | |
54 | rm bin/libyjpagent-linux64.so | |
55 | rm bin/phpstorm64.vmoptions | |
56 | rm -r lib/libpty/linux/x86_64 | |
57 | %endif | |
58 | %ifarch %{x8664} | |
59 | rm bin/fsnotifier | |
60 | rm bin/libyjpagent-linux.so | |
61 | rm bin/phpstorm.vmoptions | |
62 | rm -r lib/libpty/linux/x86 | |
63 | %endif | |
64 | rm bin/fsnotifier-arm | |
65 | %patch0 -p1 | |
66 | chmod a+rx bin/*.so bin/fsnotifier* lib/libpty/linux/*/libpty.so | |
67 | mv bin/phpstorm.png . | |
68 | ||
69 | # cleanup backups after patching | |
70 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}} | |
75 | cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test | |
76 | cp -a$l bin help lib plugins $RPM_BUILD_ROOT%{_appdir} | |
77 | ln -s %{_pixmapsdir}/%{name}.png $RPM_BUILD_ROOT%{_appdir}/bin | |
78 | cp -p phpstorm.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png | |
79 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
80 | install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/pstorm | |
81 | ln -s pstorm $RPM_BUILD_ROOT%{_bindir}/%{name} | |
82 | ||
83 | %clean | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
86 | %files | |
87 | %defattr(644,root,root,755) | |
88 | %attr(755,root,root) %{_bindir}/%{name} | |
89 | %attr(755,root,root) %{_bindir}/pstorm | |
90 | %dir %{_appdir} | |
91 | %{_appdir}/help | |
92 | %{_appdir}/plugins | |
93 | %dir %{_appdir}/bin | |
94 | %{_appdir}/bin/%{name}*.vmoptions | |
95 | %{_appdir}/bin/%{name}.png | |
96 | %{_appdir}/bin/idea.properties | |
97 | %{_appdir}/bin/log.xml | |
98 | %attr(755,root,root) %{_appdir}/bin/%{name}.sh | |
99 | %attr(755,root,root) %{_appdir}/bin/*.py | |
100 | %attr(755,root,root) %{_appdir}/bin/format.sh | |
101 | %attr(755,root,root) %{_appdir}/bin/fsnotifier* | |
102 | %attr(755,root,root) %{_appdir}/bin/inspect.sh | |
103 | %attr(755,root,root) %{_appdir}/bin/libyjpagent-linux*.so | |
104 | %dir %{_appdir}/lib | |
105 | %{_appdir}/lib/*.jar | |
106 | %dir %{_appdir}/lib/libpty | |
107 | %dir %{_appdir}/lib/libpty/linux | |
108 | %dir %{_appdir}/lib/libpty/linux/x86* | |
109 | %attr(755,root,root) %{_appdir}/lib/libpty/linux/x86*/libpty.so | |
110 | %{_desktopdir}/%{name}.desktop | |
111 | %{_pixmapsdir}/%{name}.png |