-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom.spec
172 lines (148 loc) · 5.62 KB
/
atom.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
%{?nodejs_find_provides_and_requires}
%global npm_name atom
%global atom_path %{_datadir}/atom
%global _missing_build_ids_terminate_build 0
%global npm_ver 2.7.6
Name: %{npm_name}
Version: 1.6.2
Release: 1%{?dist}
Summary: A hackable text editor for the 21st Century
Group: Applications/Editors
License: MIT
URL: https://atom.io/
Source0: https://github.com/%{npm_name}/%{npm_name}/archive/v%{version}.tar.gz
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
BuildRequires: nodejs-packaging
BuildRequires: npm
BuildRequires: libgnome-keyring-devel
BuildRequires: node-gyp
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: glibc-devel
BuildRequires: git-core
Requires: nodejs
Requires: http-parser
Requires: zsh
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: curl
BuildRequires: make
BuildRequires: svn
%description
Atom is a text editor that's modern, approachable, yet hackable to the core - a tool you can customize to do anything but also use productively without ever touching a config file.
Visit https://atom.io to learn more.
%package libs
Summary: Library to chromium
Group: System Environment/Libraries
%description libs
Libraries need for atom
%prep
%setup -q -n %{npm_name}-%{version}
%build
export INSTALL_PREFIX="%{buildroot}%{_prefix}"
## Upgrade npm
%{__mkdir_p} -p %{buildroot}%{_bindir}
# install new npm to build package
npm config set registry="http://registry.npmjs.org/"
npm config set ca ""
npm config set strict-ssl false
npm install -g --ca=null --prefix %{buildroot}%{_prefix} npm@%{npm_ver}
# Export PATH to new npm version
export PATH="%{buildroot}%{_bindir}:$PATH"
./script/build --verbose 2>&1
npm config delete ca
%install
INSTALL_PREFIX=%{buildroot}%{_prefix} ; export INSTALL_PREFIX
# copy over icons in sizes that most desktop environments like
for i in 1024 512 256 128 64 48 32 24 16;do
%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
cp out/icons/${i}.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/atom.png
done
./script/grunt install 2>&1 >> /dev/null
%{__rm} -f %{buildroot}%{_datadir}/atom/resources/app/apm/bin/node
cd %{buildroot}%{_datadir}/atom/resources/app/apm/bin/
# Remove --harmony_collections
%{__sed} -i "s/--harmony_collections//g" apm
%{__ln_s}f %{_bindir}/node node
%{__sed} -i "s/=.*atom/=atom/g" %{buildroot}%{_datadir}/applications/atom.desktop
%{__sed} -i "s/atom.png/atom/g" %{buildroot}%{_datadir}/applications/atom.desktop
%{__mkdir_p} %{buildroot}%{_libdir}
%{__install} -pm755 %{buildroot}%{_datadir}/atom/libnode.so %{buildroot}%{_libdir}
%post
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc LICENSE.md README.md docs/
%{_bindir}/atom
%{_bindir}/apm
%dir %{_datadir}/atom
%{_datadir}/atom/*
%{_datadir}/applications/atom.desktop
%{_datadir}/icons/hicolor/
%files libs
%{_libdir}/libnode.so
%changelog
* Mon Mar 21 2016 Helber Maciel Guerra <helbermg@gmail.com> v1.6.0-3
- Release 1.6.0
* Tue Jan 26 2016 Helber Maciel Guerra <helbermg@gmail.com> v1.4.1-1
- Release 1.4.1
* Wed Jan 13 2016 Helber Maciel Guerra <helbermg@gmail.com> - v1.4.0-1
- Release 1.4.0
* Fri Dec 18 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.3.2-1
- Release 1.3.2
* Mon Dec 14 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.3.1-1
- Release 1.3.1
* Wed Dec 09 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.3.0-1
- Release 1.3.0
* Sun Dec 06 2015 Florian Kaiser <florian.kaiser@fnkr.net> v1.2.4-1
- Release 1.2.4
* Thu Nov 19 2015 Florian Kaiser <florian.kaiser@fnkr.net> v1.2.3-1
- Release 1.2.3
* Thu Nov 12 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.2.0-1
- Release 1.2.0
* Thu Sep 17 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.0.13-1
- Change lib to libnode
* Tue Sep 01 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.0.10-1
- Release 1.0.10
* Thu Aug 27 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.0.8-1
- Clean and test spec for epel, centos and fedora
- Release 1.0.8
* Tue Aug 11 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.0.6-1
- Release 1.0.6
* Thu Aug 06 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.0.5-1
- Release 1.0.5
* Wed Jul 08 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.0.1-1
- Release 1.0.1
* Thu Jun 25 2015 Helber Maciel Guerra <helbermg@gmail.com> v1.0.0-1
- Release 1.0.0
* Wed Jun 10 2015 Helber Maciel Guerra <helbermg@gmail.com> - v0.208.0-1
- Fix atom.desktop
* Tue Jun 09 2015 Helber Maciel Guerra <helbermg@gmail.com> - v0.207.0-1
- Fix desktop icons and some rpmlint.
* Fri Oct 31 2014 Helber Maciel Guerra <helbermg@gmail.com> - v0.141.0-1
- release 0.141.0
* Thu Oct 23 2014 Helber Maciel Guerra <helbermg@gmail.com> - v0.139.0-1
- release 0.139.0
* Wed Oct 15 2014 Helber Maciel Guerra <helbermg@gmail.com> - v0.137.0-2
- release 0.137.0
* Tue Oct 07 2014 Helber Maciel Guerra <helbermg@gmail.com> - v0.136.0-1
- release 0.136.0
* Tue Sep 30 2014 Helber Maciel Guerra <helbermg@gmail.com> - v0.133.0-2
- Build OK
* Fri Aug 22 2014 Helber Maciel Guerra <helbermg@gmail.com> - v0.123.0-2
- Change package name to atom.
* Thu Aug 21 2014 Helber Maciel Guerra <helbermg@gmail.com> - v0.123.0-1
- RPM package is just working.
* Sat Jul 26 2014 Helber Maciel Guerra <helbermg@gmail.com> - v0.119.0-1
- Try without nodejs.
* Tue Jul 01 2014 Helber Maciel Guerra <helbermg@gmail.com> - v0.106.0-1
- Try new version
* Sun May 25 2014 Helber Maciel Guerra <helbermg@gmail.com> - 0.99.0
- Initial package