]> git.pld-linux.org Git - packages/atom.git/blob - atom.spec
4430fcc3f67bd16ee4b2dde7a41b362c451e87c3
[packages/atom.git] / atom.spec
1 # BUILDING:
2 # https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md
3
4 Summary:        A hackable text editor for the 21st century
5 Name:           atom
6 Version:        1.2.4
7 Release:        0.4
8 License:        MIT
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
13 NoSource:       0
14 URL:            https://atom.io/
15 BuildRequires:  rpm-utils
16 Suggests:       apm
17 ExclusiveArch:  %{x8664}
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _appdir         %{_libdir}/%{name}
21
22 %description
23 Atom is a desktop application based on web technologies. Like other
24 desktop apps, it has its own icon in the dock, native menus and
25 dialogs, and full access to the file system.
26
27 Open the dev tools, however, and Atom's web-based core shines through.
28 Whether you're tweaking the look of Atom's interface with CSS or
29 adding major features with HTML and JavaScript, it's never been easier
30 to take control of your editor.
31
32 %package -n apm
33 Summary:        Atom Package Manager
34 Group:          Development/Tools
35 URL:            https://github.com/atom/apm
36
37 %description -n apm
38 Discover and install Atom packages powered by atom.io
39
40 You can configure apm via a ~/.atom/.apmrc file similarly to npm
41 config.
42
43 %prep
44 %setup -qcT
45 SOURCE=%{SOURCE0}
46 version=$(rpm -qp --nodigest --nosignature --qf '%{V}' $SOURCE)
47 test version:${version} = version:%{version}
48 rpm2cpio $SOURCE | cpio -i -d
49
50 mv usr/share/icons .
51 mv usr/share/applications/* .
52 mv usr/share/atom .
53 mv usr/bin .
54
55 mv atom/LICENSE .
56 mv atom/chromedriver/LICENSE LICENSE.chromedrive
57
58 # unneeded
59 mv atom/resources/app/atom.sh .
60
61 # remove empty locales
62 find atom/locales -size 0 | xargs rm -v
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{_bindir},%{_appdir}}
67
68 cp -a atom/* $RPM_BUILD_ROOT%{_appdir}
69
70 ln -s %{_appdir}/atom $RPM_BUILD_ROOT%{_bindir}
71 ln -s %{_appdir}/resources/app/apm/bin/apm $RPM_BUILD_ROOT%{_bindir}/apm
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %files
77 %defattr(644,root,root,755)
78 %doc LICENSE LICENSE.chromedrive
79 %attr(755,root,root) %{_bindir}/atom
80 %dir %{_appdir}
81 %{_appdir}/version
82 %{_appdir}/*.bin
83 %{_appdir}/content_shell.pak
84 %{_appdir}/icudtl.dat
85 %attr(755,root,root) %{_appdir}/atom
86 %attr(755,root,root) %{_appdir}/libgcrypt.so.11
87 %attr(755,root,root) %{_appdir}/libnode.so
88 %attr(755,root,root) %{_appdir}/libnotify.so.4
89 %dir %{_appdir}/chromedriver
90 %attr(755,root,root) %{_appdir}/chromedriver/chromedriver
91
92 %{_appdir}/locales
93
94 %dir %{_appdir}/resources
95 %{_appdir}/resources/LICENSE.md
96 %dir %{_appdir}/resources/app
97
98 %{_appdir}/resources/app.asar
99 %{_appdir}/resources/atom.asar
100
101 # needed?
102 %{_appdir}/resources/app.asar.unpacked
103
104 %files -n apm
105 %defattr(644,root,root,755)
106 %attr(755,root,root) %{_bindir}/apm
107
108 # too many files to list, assume file permissions
109 %defattr(-,root,root,-)
110 %{_appdir}/resources/app/apm
This page took 0.08916 seconds and 2 git commands to generate.