One of Atom's dependencies, dugite, downloads a full copy of prebuilt
Git into its node_modules directory, what is totally redundant.
Modify its "source code" to use system Git instead and remove post-install
download target.
To patch Atom package the same approach is used as in commit 4a94ed99271d
("atom: fix Fuzzy finder (git-utils)").
This reduces the total size of Atom xbps package by ~30 Mb.
Signed-off-by: Alexander Lobakin <bloodyreaper@yandex.ru>
54 lines
1.6 KiB
Bash
54 lines
1.6 KiB
Bash
# Template file for 'atom'
|
|
_dugite_ver=1.87.6
|
|
_git_utils_ver=5.6.2
|
|
pkgname=atom
|
|
version=1.41.0
|
|
revision=3
|
|
archs="x86_64"
|
|
hostmakedepends="git pkg-config python-devel nodejs-lts-10 nodejs-lts-10-devel curl gtk+3
|
|
libXtst libXScrnSaver nss python alsa-lib"
|
|
makedepends="python-devel GConf-devel libgnome-keyring-devel gtk+3-devel
|
|
libX11-devel libxkbfile-devel libsecret-devel"
|
|
depends="git"
|
|
short_desc="Chrome-based text editor from Github"
|
|
maintainer="Wilson Birney <wpb@360scada.com>"
|
|
license="MIT"
|
|
homepage="https://atom.io"
|
|
distfiles="
|
|
https://github.com/atom/atom/archive/v${version}.tar.gz
|
|
https://registry.npmjs.org/dugite/-/dugite-${_dugite_ver}.tgz
|
|
https://registry.npmjs.org/git-utils/-/git-utils-${_git_utils_ver}.tgz"
|
|
checksum="
|
|
4a440909462c461cbec9b82b5f97bd21719a34f0ab59f2d859df85a40246c949
|
|
61cd7b32932788c70420cb64042d7056715c5e5c20f4df022e77cee034519c09
|
|
b430ee53a09317df5b6677e5625950baefe840258f2e9d55cf4fc448c9d8576e"
|
|
skip_extraction="
|
|
dugite-${_dugite_ver}.tgz
|
|
git-utils-${_git_utils_ver}.tgz"
|
|
shlib_provides="libGLESv2.so"
|
|
patch_args="-Np1"
|
|
nocross=yes
|
|
nostrip=yes
|
|
|
|
post_extract() {
|
|
mkdir -p packages/dugite packages/git-utils
|
|
tar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/dugite-${_dugite_ver}.tgz \
|
|
--strip-components=1 -C packages/dugite
|
|
tar xzf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/git-utils-${_git_utils_ver}.tgz \
|
|
--strip-components=1 -C packages/git-utils
|
|
}
|
|
|
|
pre_build() {
|
|
npm install -g gyp
|
|
vmkdir /usr/share/icons/hicolor
|
|
}
|
|
|
|
do_build() {
|
|
script/build --install=$DESTDIR/usr
|
|
}
|
|
|
|
do_install() {
|
|
mv $DESTDIR/usr/libexec/applications $DESTDIR/usr/share
|
|
vlicense LICENSE.md
|
|
}
|