]>
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 | |
16 | URL: http://www.jetbrains.com/clion/ | |
17 | BuildRequires: jpackage-utils | |
18 | BuildRequires: rpm-javaprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.300 | |
20 | BuildRequires: unzip | |
21 | Requires: jre >= 1.6 | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | # don't strip fsnotifier, it's size is checked for "outdated binary" | |
25 | # https://bugs.archlinux.org/task/34703 | |
26 | # 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 | |
27 | %define _noautostrip .*/fsnotifier.* | |
28 | ||
29 | # use /usr/lib, 64bit files do not conflict with 32bit files (64 suffix) | |
30 | # this allows to install both arch files and to use 32bit jdk on 64bit os | |
31 | %define _appdir %{_prefix}/lib/%{product} | |
32 | ||
33 | %description | |
34 | Smart Editor. Code better, refactor easily | |
35 | ||
36 | Knowing your code through and through, CLion can take care of the | |
37 | routine while you focus on the important things. Boost your | |
38 | productivity with the keyboard-centric approach (Vim-emulation plugin | |
39 | is also available in plugin repository), full coding assistance, smart | |
40 | and relevant code completion, fast project navigation, intelligent | |
41 | intention actions, and reliable refactorings. | |
42 | ||
43 | %prep | |
44 | %setup -qn clion-%{bid} | |
45 | ||
46 | # keep only single arch files (don't want to pull 32bit deps by default), | |
47 | # if you want to mix, install rpm from both arch | |
48 | %ifarch %{ix86} | |
49 | rm bin/fsnotifier64 | |
50 | rm bin/libyjpagent-linux64.so | |
51 | rm bin/libbreakgen64.so | |
52 | rm bin/%{product}64.vmoptions | |
53 | rm -r lib/libpty/linux/x86_64 | |
54 | %endif | |
55 | %ifarch %{x8664} | |
56 | rm bin/fsnotifier | |
57 | rm bin/libyjpagent-linux.so | |
58 | rm bin/libbreakgen.so | |
59 | #rm bin/%{product}.vmoptions | |
60 | rm -r lib/libpty/linux/x86 | |
61 | %endif | |
62 | rm -r lib/libpty/{macosx,win} | |
63 | chmod a+rx bin/*.so bin/fsnotifier* | |
64 | mv bin/%{product}.svg . | |
65 | ||
66 | # cleanup backups after patching | |
67 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_pixmapsdir},%{_desktopdir}} | |
72 | cp -l build.txt $RPM_BUILD_ROOT/cp-test && l=l && rm -f $RPM_BUILD_ROOT/cp-test | |
73 | cp -a$l bin help lib license plugins $RPM_BUILD_ROOT%{_appdir} | |
74 | ln -s %{_pixmapsdir}/%{product}.svg $RPM_BUILD_ROOT%{_appdir}/bin | |
75 | cp -p %{product}.svg $RPM_BUILD_ROOT%{_pixmapsdir} | |
b4f57b33 | 76 | ln -s %{_appdir}/bin/%{product}.sh $RPM_BUILD_ROOT%{_bindir}/%{product} |
cf6bfaea ER |
77 | |
78 | %clean | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %files | |
82 | %defattr(644,root,root,755) | |
b4f57b33 | 83 | %attr(755,root,root) %{_bindir}/%{product} |
cf6bfaea ER |
84 | %dir %{_appdir} |
85 | %{_appdir}/help | |
86 | %{_appdir}/license | |
87 | %{_appdir}/plugins | |
88 | %dir %{_appdir}/bin | |
89 | %{_appdir}/bin/%{product}*.vmoptions | |
90 | %{_appdir}/bin/%{product}.svg | |
91 | %{_appdir}/bin/idea.properties | |
92 | %{_appdir}/bin/log.xml | |
93 | %attr(755,root,root) %{_appdir}/bin/%{product}.sh | |
94 | %attr(755,root,root) %{_appdir}/bin/inspect.sh | |
95 | %attr(755,root,root) %{_appdir}/bin/fsnotifier* | |
96 | %attr(755,root,root) %{_appdir}/bin/libbreakgen*.so | |
97 | %attr(755,root,root) %{_appdir}/bin/libyjpagent-linux*.so | |
98 | %dir %{_appdir}/lib | |
99 | %{_appdir}/lib/*.jar | |
100 | %dir %{_appdir}/lib/libpty | |
101 | %dir %{_appdir}/lib/libpty/linux | |
102 | %dir %{_appdir}/lib/libpty/linux/x86* | |
103 | %attr(755,root,root) %{_appdir}/lib/libpty/linux/x86*/libpty.so | |
104 | %{_pixmapsdir}/%{product}.svg | |
105 | ||
106 | # TODO: system packages | |
107 | %defattr(-,root,root,-) | |
108 | %{_appdir}/bin/cmake | |
109 | %{_appdir}/bin/gdb |