]> git.pld-linux.org Git - packages/pycharm-community.git/blob - pycharm-community.spec
up to 5.0.4
[packages/pycharm-community.git] / pycharm-community.spec
1 %define         product pycharm
2 %include        /usr/lib/rpm/macros.java
3 Summary:        Python IDE for Professional Developers
4 Name:           %{product}-community
5 Version:        5.0.4
6 Release:        1
7 # TODO: figure out what's the licensing and redistribution
8 License:        ?
9 Group:          Development/Tools
10 Source0:        https://download.jetbrains.com/python/%{name}-%{version}.tar.gz
11 # NoSource0-md5:        83be1734dc491ad6f4dca9950fb74eeb
12 NoSource:       0
13 Source1:        %{product}.desktop
14 Source2:        charm.py
15 Patch0:         pld.patch
16 URL:            https://www.jetbrains.com/pycharm/
17 BuildRequires:  jpackage-utils
18 BuildRequires:  rpm-javaprov
19 BuildRequires:  rpmbuild(macros) >= 1.300
20 BuildRequires:  unzip
21 Requires:       desktop-file-utils
22 Requires:       jre-X11 >= 1.7
23 Requires:       which
24 Suggests:       cvs
25 Suggests:       git-core
26 Suggests:       java-jdbc-mysql
27 Suggests:       subversion
28 Conflicts:      java-jdbc-mysql < 5.1.22
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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/%{name}
39
40 %description
41 PyCharm is an Integrated Development Environment (IDE) used for
42 programming in Python.
43
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.
47
48 %prep
49 %setup -q
50
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
53 %ifarch %{ix86}
54 rm bin/fsnotifier64
55 #rm bin/libyjpagent-linux64.so
56 rm bin/%{product}64.vmoptions
57 rm -r lib/libpty/linux/x86_64
58 %endif
59 %ifarch %{x8664}
60 rm bin/fsnotifier
61 #rm bin/libyjpagent-linux.so
62 rm bin/%{product}.vmoptions
63 rm -r lib/libpty/linux/x86
64 %endif
65 rm -r lib/libpty/{macosx,win}
66 rm bin/fsnotifier-arm
67 %patch0 -p1
68 chmod a+rx bin/fsnotifier* lib/libpty/linux/*/libpty.so
69 mv bin/%{product}.png .
70
71 # hopefully not needed
72 rm -rv lib/src
73
74 # cleanup backups after patching
75 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
76
77 %install
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}
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post
91 %update_desktop_database
92
93 %postun
94 %update_desktop_database
95
96 %files
97 %defattr(644,root,root,755)
98 %attr(755,root,root) %{_bindir}/%{name}
99 %dir %{_appdir}
100 %{_appdir}/help
101 %{_appdir}/plugins
102 %{_appdir}/helpers
103 %doc %{_appdir}/license
104 %dir %{_appdir}/bin
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*
112 %dir %{_appdir}/lib
113 %{_appdir}/lib/*.jar
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
This page took 0.103217 seconds and 3 git commands to generate.