/usr/bin/atom: needs not to be a symlink to find atom dir [release 1.55.0-3mamba;Sun Mar 21 2021]
This commit is contained in:
parent
e24cebfd4d
commit
c869a738a9
34
atom-1.55.0-use-system-apm.patch
Normal file
34
atom-1.55.0-use-system-apm.patch
Normal file
@ -0,0 +1,34 @@
|
||||
--- a/script/lib/run-apm-install.js
|
||||
+++ b/script/lib/run-apm-install.js
|
||||
@@ -9,7 +9,7 @@
|
||||
// Set resource path so that apm can load metadata related to Atom.
|
||||
installEnv.ATOM_RESOURCE_PATH = CONFIG.repositoryRootPath;
|
||||
|
||||
- childProcess.execFileSync(CONFIG.getApmBinPath(), [ci ? 'ci' : 'install'], {
|
||||
+ childProcess.execFileSync('apm', [ci ? 'ci' : 'install'], {
|
||||
env: installEnv,
|
||||
cwd: packagePath,
|
||||
stdio: stdioOptions || 'inherit'
|
||||
--- a/src/package-manager.js
|
||||
+++ b/src/package-manager.js
|
||||
@@ -194,19 +194,7 @@
|
||||
return configPath || this.apmPath;
|
||||
}
|
||||
|
||||
- const commandName = process.platform === 'win32' ? 'apm.cmd' : 'apm';
|
||||
- const apmRoot = path.join(process.resourcesPath, 'app', 'apm');
|
||||
- this.apmPath = path.join(apmRoot, 'bin', commandName);
|
||||
- if (!fs.isFileSync(this.apmPath)) {
|
||||
- this.apmPath = path.join(
|
||||
- apmRoot,
|
||||
- 'node_modules',
|
||||
- 'atom-package-manager',
|
||||
- 'bin',
|
||||
- commandName
|
||||
- );
|
||||
- }
|
||||
- return this.apmPath;
|
||||
+ return '/usr/lib/node_modules/atom-package-manager/bin/apm';
|
||||
}
|
||||
|
||||
// Public: Get the paths being used to look for packages.
|
33
atom-1.55.0-use-system-git.patch
Normal file
33
atom-1.55.0-use-system-git.patch
Normal file
@ -0,0 +1,33 @@
|
||||
--- a/build/lib/git-environment.js
|
||||
+++ b/build/lib/git-environment.js
|
||||
@@ -24,7 +24,7 @@
|
||||
return path.resolve(process.env.LOCAL_GIT_DIRECTORY);
|
||||
}
|
||||
else {
|
||||
- return resolveEmbeddedGitDir();
|
||||
+ return '/usr';
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -57,7 +57,7 @@
|
||||
return path.join(gitDir, 'mingw32', 'libexec', 'git-core');
|
||||
}
|
||||
else {
|
||||
- return path.join(gitDir, 'libexec', 'git-core');
|
||||
+ return path.join(gitDir, 'lib', 'git-core');
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -108,9 +108,9 @@
|
||||
if (!env.GIT_SSL_CAINFO && !env.LOCAL_GIT_DIRECTORY) {
|
||||
// use the SSL certificate bundle included in the distribution only
|
||||
// when using embedded Git and not providing your own bundle
|
||||
- const distDir = resolveEmbeddedGitDir();
|
||||
- const sslCABundle = `${distDir}/ssl/cacert.pem`;
|
||||
- env.GIT_SSL_CAINFO = sslCABundle;
|
||||
+ // const distDir = resolveEmbeddedGitDir();
|
||||
+ // const sslCABundle = `${distDir}/ssl/cacert.pem`;
|
||||
+ // env.GIT_SSL_CAINFO = sslCABundle;
|
||||
}
|
||||
}
|
||||
return { env, gitLocation };
|
136
atom.spec
136
atom.spec
@ -1,20 +1,20 @@
|
||||
Name: atom
|
||||
Version: 1.10.2
|
||||
Release: 1mamba
|
||||
Version: 1.55.0
|
||||
Release: 3mamba
|
||||
Summary: A text editor that's modern, approachable, yet hackable to the core
|
||||
Group: Graphical Desktop/Applications/Utilities
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: https://atom.io/
|
||||
## GITSOURCE https://github.com/atom/atom.git v1.5.3
|
||||
Source: https://github.com/atom/atom.git/v%{version}/atom-%{version}.tar.bz2
|
||||
Patch0: atom-1.55.0-use-system-git.patch
|
||||
Patch1: atom-1.55.0-use-system-apm.patch
|
||||
License: MIT
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: ldconfig
|
||||
BuildRequires: libGConf-devel
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXScrnSaver-devel
|
||||
BuildRequires: libXcomposite-devel
|
||||
BuildRequires: libXcursor-devel
|
||||
BuildRequires: libXdamage-devel
|
||||
@ -25,96 +25,128 @@ BuildRequires: libXrandr-devel
|
||||
BuildRequires: libXrender-devel
|
||||
BuildRequires: libXtst-devel
|
||||
BuildRequires: libalsa-devel
|
||||
BuildRequires: libat-spi2-atk-devel
|
||||
BuildRequires: libat-spi2-core-devel
|
||||
BuildRequires: libatk-devel
|
||||
BuildRequires: libcairo-devel
|
||||
BuildRequires: libcups-devel
|
||||
BuildRequires: libdbus-devel
|
||||
BuildRequires: libexpat-devel
|
||||
BuildRequires: libfontconfig-devel
|
||||
BuildRequires: libfreetype-devel
|
||||
BuildRequires: libgcc
|
||||
BuildRequires: libgdk-pixbuf-devel
|
||||
BuildRequires: libglib-devel
|
||||
BuildRequires: libgnome-keyring-devel
|
||||
BuildRequires: libgtk2-devel
|
||||
BuildRequires: libgtk3-devel
|
||||
BuildRequires: libnspr-devel
|
||||
BuildRequires: libnss-devel
|
||||
BuildRequires: libpango-devel
|
||||
BuildRequires: libperl
|
||||
BuildRequires: libstdc++6-devel
|
||||
BuildRequires: perl-devel
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: libxcb-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: nodejs
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: apm
|
||||
BuildRequires: git
|
||||
Requires: apm
|
||||
Requires: git
|
||||
|
||||
%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.
|
||||
|
||||
%debug_package
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
sed -i -e "/exception-reporting/d" \
|
||||
-e "/metrics/d" package.json
|
||||
|
||||
sed -e "s/<%= description %>/%{summary}/" \
|
||||
-e "s|<%= appName %>|Atom|"\
|
||||
-e "s|<%= installDir %>/share/<%= appFileName %>|%{_bindir}|"\
|
||||
-e "s|<%= iconPath %>|atom|"\
|
||||
resources/linux/atom.desktop.in > resources/linux/atom.desktop
|
||||
|
||||
%define _use_internal_dependency_generator 0
|
||||
|
||||
%define __find_provides %{_builddir}/%{name}-%{version}/find_provides.sh
|
||||
cat > %{_builddir}/%{name}-%{version}/find_provides.sh <<_EOF
|
||||
#! /bin/sh
|
||||
grep -v %{buildroot}%{_datadir} | \
|
||||
%{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu}
|
||||
_EOF
|
||||
chmod +x %{_builddir}/%{name}-%{version}/find_provides.sh
|
||||
|
||||
%define __find_requires %{_builddir}/%{name}-%{version}/find_requires.sh
|
||||
cat > %{_builddir}/%{name}-%{version}/find_requires.sh <<_EOF
|
||||
#! /bin/sh
|
||||
%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} 2>/dev/null |
|
||||
while read line; do
|
||||
[ ! -f %{buildroot}%{_datadir}/atom/\${line/\(*} ] && echo "\$line"
|
||||
done
|
||||
_EOF
|
||||
chmod +x %{_builddir}/%{name}-%{version}/find_requires.sh
|
||||
#-D -T
|
||||
#:<< _EOF
|
||||
%global __requires_exclude ^libffmpeg.so.*$
|
||||
%global __provides_exclude_from ^%{_datadir}/atom/.*$
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
script/build --build-dir=`pwd`/atom-build
|
||||
#:<< _EOF
|
||||
ATOM_RESOURCE_PATH="${PWD}" \
|
||||
npm_config_build_from_source=true \
|
||||
apm install
|
||||
|
||||
# Use system git
|
||||
cd node_modules/dugite
|
||||
patch -Np1 -i %{PATCH0}
|
||||
rm -rf git
|
||||
cd ../..
|
||||
|
||||
script/build \
|
||||
--build-dir=`pwd`/atom-build
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
script/grunt install --build-dir "`pwd`/atom-build" --install-dir "%{buildroot}%{_prefix}"
|
||||
|
||||
install -D -m0644 resources/linux/atom.desktop %{buildroot}%{_datadir}/applications/atom.desktop
|
||||
install -D -m0644 resources/app-icons/stable/png/1024.png %{buildroot}%{_datadir}/pixmaps/atom.png
|
||||
install -d -m 755 %{buildroot}%{_datadir}
|
||||
cp -r out/atom-%{version}-amd64 %{buildroot}%{_datadir}/atom
|
||||
install -d -m0755 %{buildroot}%{_bindir}
|
||||
cp %{buildroot}%{_datadir}/atom/resources/app/atom.sh %{buildroot}%{_bindir}/atom
|
||||
|
||||
install -d -m 755 %{buildroot}%{_datadir}/applications
|
||||
sed -e "s|<%= appName %>|Atom|" \
|
||||
-e "s/<%= description %>/%{summary}/" \
|
||||
-e "s|<%= installDir %>|/usr|" \
|
||||
-e "s|<%= appFileName %>|atom|" \
|
||||
-e "s|<%= iconPath %>|atom|" \
|
||||
resources/linux/atom.desktop.in > %{buildroot}%{_datadir}/applications/atom.desktop
|
||||
|
||||
for size in 16 24 32 48 64 128 256 512 1024; do
|
||||
install -D -m 644 resources/app-icons/stable/png/${size}.png \
|
||||
%{buildroot}%{_datadir}/share/icons/hicolor/${size}x${size}/apps/atom.png
|
||||
done
|
||||
|
||||
ln -sf ../../../share/icons/hicolor/1024x1024/apps/atom.png \
|
||||
%{buildroot}%{_datadir}/atom/resources/atom.png
|
||||
|
||||
install -D -m0755 resources/linux/atom.policy %{buildroot}%{_datadir}/polkit-1/actions/atom.policy
|
||||
|
||||
# Remove useless stuff
|
||||
find %{buildroot}%{_datadir}/atom/resources/app/apm/node_modules \
|
||||
-name "*.a" -exec rm '{}' \; \
|
||||
-or -name "*.bat" -exec rm '{}' \; \
|
||||
-or -name "*.c" -exec rm '{}' \; \
|
||||
-or -name "*.cpp" -exec rm '{}' \; \
|
||||
-or -name "*.node" -exec chmod a-x '{}' \; \
|
||||
-or -name "benchmark" -prune -exec rm -r '{}' \; \
|
||||
-or -name "doc" -prune -exec rm -r '{}' \; \
|
||||
-or -name "html" -prune -exec rm -r '{}' \; \
|
||||
-or -name "man" -prune -exec rm -r '{}' \; \
|
||||
-or -name "scripts" -prune -exec rm -r '{}' \; \
|
||||
-or -path "*/less/gradle" -prune -exec rm -r '{}' \; \
|
||||
-or -path "*/task-lists/src" -prune -exec rm -r '{}' \;
|
||||
|
||||
# Remove 64-bit binary in node subtree
|
||||
rm -f
|
||||
%ifnarch x86_64
|
||||
rm -f %{buildroot}%{_datadir}/atom/resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-linux
|
||||
%endif
|
||||
#%ifnarch x86_64
|
||||
#rm -f %{buildroot}%{_datadir}/atom/resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-linux
|
||||
#%endif
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/apm
|
||||
%{_bindir}/atom
|
||||
%dir %{_datadir}/atom
|
||||
%{_datadir}/atom/*
|
||||
%attr(4755, root, root) %{_datadir}/atom/chrome-sandbox
|
||||
%{_datadir}/applications/atom.desktop
|
||||
%{_datadir}/pixmaps/atom.png
|
||||
%{_datadir}/polkit-1/actions/atom.policy
|
||||
%{_datadir}/share/icons/hicolor/*/apps/atom.png
|
||||
%doc LICENSE.md
|
||||
|
||||
%changelog
|
||||
* Sun Mar 21 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.55.0-3mamba
|
||||
- /usr/bin/atom: needs not to be a symlink to find atom dir
|
||||
|
||||
* Sat Mar 20 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.55.0-2mamba
|
||||
- rebuilt with system apm and git
|
||||
|
||||
* Sat Mar 20 2021 Automatic Build System <autodist@mambasoft.it> 1.55.0-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Thu Sep 08 2016 Automatic Build System <autodist@mambasoft.it> 1.10.2-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user