1 %define product pycharm
2 %include /usr/lib/rpm/macros.java
3 Summary: Python IDE for Professional Developers
4 Name: %{product}-community
7 # TODO: figure out what's the licensing and redistribution
9 Group: Development/Tools
10 Source0: https://download.jetbrains.com/python/%{name}-%{version}.tar.gz
11 # NoSource0-md5: 83be1734dc491ad6f4dca9950fb74eeb
13 Source1: %{product}.desktop
16 URL: https://www.jetbrains.com/pycharm/
17 BuildRequires: jpackage-utils
18 BuildRequires: rpm-javaprov
19 BuildRequires: rpmbuild(macros) >= 1.300
21 Requires: desktop-file-utils
22 Requires: jre-X11 >= 1.7
26 Suggests: java-jdbc-mysql
28 Conflicts: java-jdbc-mysql < 5.1.22
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.*
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/%{name}
41 PyCharm is an Integrated Development Environment (IDE) used for
42 programming in Python.
44 It provides code analysis, a graphical debugger, an integrated unit
45 tester, integration with version control systems (VCSes), and supports
46 web development with Django.
51 # keep only single arch files (don't want to pull 32bit deps by default),
52 # if you want to mix, install rpm from both arch
55 #rm bin/libyjpagent-linux64.so
56 rm bin/%{product}64.vmoptions
57 rm -r lib/libpty/linux/x86_64
61 #rm bin/libyjpagent-linux.so
62 rm bin/%{product}.vmoptions
63 rm -r lib/libpty/linux/x86
65 rm -r lib/libpty/{macosx,win}
68 chmod a+rx bin/fsnotifier* lib/libpty/linux/*/libpty.so
69 mv bin/%{product}.png .
71 # hopefully not needed
74 # cleanup backups after patching
75 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}}
80 cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test
81 cp -a$l bin help helpers lib license plugins $RPM_BUILD_ROOT%{_appdir}
82 ln -s %{_pixmapsdir}/%{product}.png $RPM_BUILD_ROOT%{_appdir}/bin/%{product}.png
83 cp -p %{product}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
84 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
85 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}
88 rm -rf $RPM_BUILD_ROOT
91 %update_desktop_database
94 %update_desktop_database
97 %defattr(644,root,root,755)
98 %attr(755,root,root) %{_bindir}/%{name}
103 %doc %{_appdir}/license
105 %{_appdir}/bin/%{product}*.vmoptions
106 %{_appdir}/bin/%{product}.png
107 %{_appdir}/bin/idea.properties
108 %{_appdir}/bin/log.xml
109 %attr(755,root,root) %{_appdir}/bin/%{product}.sh
110 %attr(755,root,root) %{_appdir}/bin/inspect.sh
111 %attr(755,root,root) %{_appdir}/bin/fsnotifier*
114 %dir %{_appdir}/lib/ext
115 %{_appdir}/lib/ext/*.jar
116 %dir %{_appdir}/lib/libpty
117 %dir %{_appdir}/lib/libpty/linux
118 %dir %{_appdir}/lib/libpty/linux/x86*
119 %attr(755,root,root) %{_appdir}/lib/libpty/linux/x86*/libpty.so
120 %{_desktopdir}/%{name}.desktop
121 %{_pixmapsdir}/%{name}.png