2 # https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md
4 Summary: A hackable text editor for the 21st century
9 Group: Applications/Editors
10 Source0: https://github.com/atom/atom/releases/download/v%{version}/%{name}.x86_64.rpm
11 # NoSource0-md5: 2c1b984e9e2ce95449987006386463ca
12 # no point storing it in distfiles, this package is no ready
15 BuildRequires: rpm-utils
17 ExclusiveArch: %{x8664}
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _appdir %{_libdir}/%{name}
22 # internal caps not to provide
23 %define int_caps libgcrypt.so.11 libnode.so libnotify.so.4
25 # list of files (regexps) which don't generate Provides
26 %define _noautoprovfiles %{_libdir}/%{name}
27 # list of script capabilities (regexps) not to be used in Provides
28 %define _noautoprov %{int_caps}
29 %define _noautoreq %{_noautoprov}
32 Atom is a desktop application based on web technologies. Like other
33 desktop apps, it has its own icon in the dock, native menus and
34 dialogs, and full access to the file system.
36 Open the dev tools, however, and Atom's web-based core shines through.
37 Whether you're tweaking the look of Atom's interface with CSS or
38 adding major features with HTML and JavaScript, it's never been easier
39 to take control of your editor.
42 Summary: Atom Package Manager
43 Group: Development/Tools
44 URL: https://github.com/atom/apm
47 Discover and install Atom packages powered by atom.io
49 You can configure apm via a ~/.atom/.apmrc file similarly to npm
55 version=$(rpm -qp --nodigest --nosignature --qf '%{V}' $SOURCE)
56 test version:${version} = version:%{version}
57 rpm2cpio $SOURCE | cpio -i -d
60 mv usr/share/applications/* .
65 mv atom/chromedriver/LICENSE LICENSE.chromedrive
68 mv atom/resources/app/atom.sh .
70 # remove empty locales
71 find atom/locales -size 0 | xargs rm -v
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_bindir},%{_appdir}}
77 cp -a atom/* $RPM_BUILD_ROOT%{_appdir}
79 ln -s %{_appdir}/atom $RPM_BUILD_ROOT%{_bindir}
80 ln -s %{_appdir}/resources/app/apm/bin/apm $RPM_BUILD_ROOT%{_bindir}/apm
83 rm -rf $RPM_BUILD_ROOT
86 %defattr(644,root,root,755)
87 %doc LICENSE LICENSE.chromedrive
88 %attr(755,root,root) %{_bindir}/atom
92 %{_appdir}/content_shell.pak
94 %attr(755,root,root) %{_appdir}/atom
95 %attr(755,root,root) %{_appdir}/libgcrypt.so.11
96 %attr(755,root,root) %{_appdir}/libnode.so
97 %attr(755,root,root) %{_appdir}/libnotify.so.4
98 %dir %{_appdir}/chromedriver
99 %attr(755,root,root) %{_appdir}/chromedriver/chromedriver
103 %dir %{_appdir}/resources
104 %{_appdir}/resources/LICENSE.md
105 %dir %{_appdir}/resources/app
107 %{_appdir}/resources/app.asar
108 %{_appdir}/resources/atom.asar
111 %{_appdir}/resources/app.asar.unpacked
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_bindir}/apm
117 # too many files to list, assume file permissions
118 %defattr(-,root,root,-)
119 %{_appdir}/resources/app/apm