]>
Commit | Line | Data |
---|---|---|
cf6bfaea | 1 | %define bid 140.1740.3 |
b4f57b33 | 2 | %define rel 0.4 |
cf6bfaea ER |
3 | %define product clion |
4 | %include /usr/lib/rpm/macros.java | |
5 | Summary: C/C++ IDE | |
6 | Name: clion | |
7 | # About says "Version 1", but lets see first what first version will be | |
8 | Version: 0 | |
9 | Release: 0.%{bid}.%{rel} | |
10 | # TODO: figure out what's the licensing and redistribution | |
11 | License: ? | |
12 | Group: Development/Tools | |
13 | Source0: http://download.jetbrains.com/cpp/clion-%{bid}.tar.gz | |
14 | # NoSource0-md5: af28ecedc672920503013ff457ed38df | |
15 | NoSource: 0 | |
109e0602 | 16 | Source1: %{product}.desktop |
597c60d9 | 17 | Patch0: pld.patch |
cf6bfaea ER |
18 | URL: http://www.jetbrains.com/clion/ |
19 | BuildRequires: jpackage-utils | |
20 | BuildRequires: rpm-javaprov | |
21 | BuildRequires: rpmbuild(macros) >= 1.300 | |
22 | BuildRequires: unzip | |
23 | Requires: jre >= 1.6 | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | # don't strip fsnotifier, it's size is checked for "outdated binary" | |
27 | # https://bugs.archlinux.org/task/34703 | |
28 | # 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 | |
29 | %define _noautostrip .*/fsnotifier.* | |
30 | ||
31 | # use /usr/lib, 64bit files do not conflict with 32bit files (64 suffix) | |
32 | # this allows to install both arch files and to use 32bit jdk on 64bit os | |
33 | %define _appdir %{_prefix}/lib/%{product} | |
34 | ||
35 | %description | |
36 | Smart Editor. Code better, refactor easily | |
37 | ||
38 | Knowing your code through and through, CLion can take care of the | |
39 | routine while you focus on the important things. Boost your | |
40 | productivity with the keyboard-centric approach (Vim-emulation plugin | |
41 | is also available in plugin repository), full coding assistance, smart | |
42 | and relevant code completion, fast project navigation, intelligent | |
43 | intention actions, and reliable refactorings. | |
44 | ||
45 | %prep | |
46 | %setup -qn clion-%{bid} | |
47 | ||
48 | # keep only single arch files (don't want to pull 32bit deps by default), | |
49 | # if you want to mix, install rpm from both arch | |
50 | %ifarch %{ix86} | |
51 | rm bin/fsnotifier64 | |
52 | rm bin/libyjpagent-linux64.so | |
53 | rm bin/libbreakgen64.so | |
54 | rm bin/%{product}64.vmoptions | |
55 | rm -r lib/libpty/linux/x86_64 | |
56 | %endif | |
57 | %ifarch %{x8664} | |
58 | rm bin/fsnotifier | |
59 | rm bin/libyjpagent-linux.so | |
60 | rm bin/libbreakgen.so | |
61 | #rm bin/%{product}.vmoptions | |
62 | rm -r lib/libpty/linux/x86 | |
63 | %endif | |
64 | rm -r lib/libpty/{macosx,win} | |
65 | chmod a+rx bin/*.so bin/fsnotifier* | |
66 | mv bin/%{product}.svg . | |
67 | ||
597c60d9 ER |
68 | %patch0 -p1 |
69 | ||
cf6bfaea ER |
70 | # cleanup backups after patching |
71 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
72 | ||
73 | %install | |
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 -a$l bin help lib license plugins $RPM_BUILD_ROOT%{_appdir} | |
78 | ln -s %{_pixmapsdir}/%{product}.svg $RPM_BUILD_ROOT%{_appdir}/bin | |
109e0602 | 79 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} |
cf6bfaea | 80 | cp -p %{product}.svg $RPM_BUILD_ROOT%{_pixmapsdir} |
b4f57b33 | 81 | ln -s %{_appdir}/bin/%{product}.sh $RPM_BUILD_ROOT%{_bindir}/%{product} |
cf6bfaea ER |
82 | |
83 | %clean | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
86 | %files | |
87 | %defattr(644,root,root,755) | |
b4f57b33 | 88 | %attr(755,root,root) %{_bindir}/%{product} |
cf6bfaea ER |
89 | %dir %{_appdir} |
90 | %{_appdir}/help | |
91 | %{_appdir}/license | |
92 | %{_appdir}/plugins | |
93 | %dir %{_appdir}/bin | |
d113ef60 | 94 | %ifnarch %{ix86} |
cf6bfaea | 95 | %{_appdir}/bin/%{product}*.vmoptions |
d113ef60 | 96 | %endif |
cf6bfaea ER |
97 | %{_appdir}/bin/%{product}.svg |
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/inspect.sh | |
102 | %attr(755,root,root) %{_appdir}/bin/fsnotifier* | |
103 | %attr(755,root,root) %{_appdir}/bin/libbreakgen*.so | |
104 | %attr(755,root,root) %{_appdir}/bin/libyjpagent-linux*.so | |
105 | %dir %{_appdir}/lib | |
106 | %{_appdir}/lib/*.jar | |
107 | %dir %{_appdir}/lib/libpty | |
108 | %dir %{_appdir}/lib/libpty/linux | |
109 | %dir %{_appdir}/lib/libpty/linux/x86* | |
110 | %attr(755,root,root) %{_appdir}/lib/libpty/linux/x86*/libpty.so | |
109e0602 | 111 | %{_desktopdir}/%{product}.desktop |
cf6bfaea ER |
112 | %{_pixmapsdir}/%{product}.svg |
113 | ||
114 | # TODO: system packages | |
115 | %defattr(-,root,root,-) | |
116 | %{_appdir}/bin/cmake | |
117 | %{_appdir}/bin/gdb |