diff --git a/atom.be0 b/atom.be0 index 0bb6806d7..be868015a 100755 --- a/atom.be0 +++ b/atom.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION atom-1.9.0-0 +# BEE_VERSION atom-1.12.6-0 ## this file was created by bee init and should be executed to build a ## bee-package. (Additional hints are located at the end of this file.) @@ -28,7 +28,7 @@ SRCURL[0]="https://github.com/atom/atom/archive/v${PKGVERSION}.tar.gz" ## outside the source directory and need to be build inside the source ## directory. -# build_in_sourcedir +build_in_sourcedir ############################################################################### ## bee cannot detect buildtypes specified in subdirectories. @@ -58,12 +58,29 @@ SRCURL[0]="https://github.com/atom/atom/archive/v${PKGVERSION}.tar.gz" #} mee_build() { - start_cmd "${S}"/script/build --build-dir "${B}" + + # some scripts in their stupid build system do strange things + # when they see SUDO environment + + unset SUDO_USER SUDO_UID SUDO_COMMAND SUDO_GID + start_cmd script/build } mee_install() { - ln -s "${S}"/build "${B}"/build - start_cmd "${S}"/script/grunt install --build-dir "${B}" --install-dir "${D}"/"${PREFIX}" + + # "script/build --install" calls "script/build/lib/install-application" + # which does not honor DESTDIR and always installs into /usr/local + # so do it manually here until they fix it. + # + # https://github.com/atom/atom/issues/13240 + + set -vx + umask 000 + mkdir -p $D$DATAROOTDIR $D$BINDIR + cp -r out/atom-1.12.6-amd64 $D$DATAROOTDIR/atom + cp atom.sh $D$BINDIR/atom + ln -s ../share/atom/resources/app/apm/node_modules/.bin/apm $D$BINDIR/apm + set +xv } ## by default this may be 'make install DESTDIR="${D}"'