diff options
| author | Mhd Sulhan <ms@kilabit.info> | 2015-09-05 14:43:17 +0700 |
|---|---|---|
| committer | Mhd Sulhan <ms@kilabit.info> | 2015-09-05 14:43:17 +0700 |
| commit | 53fe3b2abbad25d9321b9575cb48259759255af9 (patch) | |
| tree | 78681913c5392d2c1b3feb5498c46f157a91d863 /arch-nodejs | |
| parent | 137309cb0d5b51a1adeec9233241dfbb6f70df07 (diff) | |
| download | arch-docker-53fe3b2abbad25d9321b9575cb48259759255af9.tar.xz | |
Add git, gcc, make, and python2 package.
This packages is required when one of npm package need to rebuild. Also,
do not remove /usr/include.
Diffstat (limited to 'arch-nodejs')
| -rwxr-xr-x | arch-nodejs/bootstrap.sh | 5 | ||||
| -rwxr-xr-x | arch-nodejs/build.sh | 35 |
2 files changed, 34 insertions, 6 deletions
diff --git a/arch-nodejs/bootstrap.sh b/arch-nodejs/bootstrap.sh index 8b14e47..7531d8a 100755 --- a/arch-nodejs/bootstrap.sh +++ b/arch-nodejs/bootstrap.sh @@ -1,5 +1,7 @@ #!/bin/bash +PACKAGES="git gcc make python2 nodejs npm" + strip_bin() { find /usr/bin -type f \( -perm -0100 \) -print | xargs file | @@ -18,7 +20,6 @@ clean_common() { echo "==> cleaning ..." strip_bin strip_lib - rm -rf /usr/include/* rm -rf /usr/share/doc/* rm -rf /usr/share/licenses/* rm -rf /usr/share/locale/* @@ -30,7 +31,7 @@ clean_common() { } do_install() { - pacman -Sy --noconfirm nodejs npm + pacman -S --noconfirm $PACKAGES return $? } diff --git a/arch-nodejs/build.sh b/arch-nodejs/build.sh index 97b0ed9..c671f36 100755 --- a/arch-nodejs/build.sh +++ b/arch-nodejs/build.sh @@ -15,6 +15,8 @@ ## container. ## +PACKAGES="git gcc make python2 nodejs npm" + clean() { rm -f *.db rm -f *.xz @@ -46,12 +48,37 @@ fi echo "==> Building docker image using local db and packages ..." ## always make sure local db and packages up to date. -sudo pacman -Syw --noconfirm --needed nodejs npm +## npm require python, make, gcc to rebuild packages. +sudo pacman -Syw --noconfirm --needed $PACKAGES cp /var/lib/pacman/sync/*.db ./ -cp /var/cache/pacman/pkg/icu* ./ -cp /var/cache/pacman/pkg/nodejs* ./ -cp /var/cache/pacman/pkg/npm* ./ + +## git. +cp /var/cache/pacman/pkg/db-5.* ./ +cp /var/cache/pacman/pkg/perl-5.* ./ +cp /var/cache/pacman/pkg/git-2.* ./ + +## gcc. +cp /var/cache/pacman/pkg/libmpc-1.* ./ +cp /var/cache/pacman/pkg/gcc-5.* ./ + +## python. +cp /var/cache/pacman/pkg/sqlite-3* ./ +cp /var/cache/pacman/pkg/python2-2.* ./ + +## make. +cp /var/cache/pacman/pkg/tar-1.* ./ +cp /var/cache/pacman/pkg/libtool-2.* ./ +cp /var/cache/pacman/pkg/libunistring* ./ +cp /var/cache/pacman/pkg/libatomic_ops* ./ +cp /var/cache/pacman/pkg/gc-7.* ./ +cp /var/cache/pacman/pkg/guile-2.* ./ +cp /var/cache/pacman/pkg/make-4.* ./ + +## nodejs +cp /var/cache/pacman/pkg/icu-55.* ./ +cp /var/cache/pacman/pkg/nodejs-0.12.* ./ +cp /var/cache/pacman/pkg/npm-2.14.* ./ rm -f Dockerfile ln -s Dockerfile.local Dockerfile |
