moved everything to different stages
This commit is contained in:
31
stage/chroot/bzip2.bash
Normal file
31
stage/chroot/bzip2.bash
Normal file
@@ -0,0 +1,31 @@
|
||||
fetch $BZIP2_URL
|
||||
|
||||
sudo chroot "$SYSROOT" /usr/bin/env -i MAKEFLAGS="$MAKEFLAGS" PATH=/usr/bin:/usr/sbin SOURCES=/sources BZIP2_VERSION=$BZIP2_VERSION /usr/bin/bash <<- "EOF"
|
||||
set -euo pipefail
|
||||
|
||||
cd "$SOURCES" && tar xf bzip2-$BZIP2_VERSION.tar.gz && cd bzip2-$BZIP2_VERSION
|
||||
|
||||
sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
|
||||
|
||||
make -f Makefile-libbz2_so
|
||||
|
||||
make clean
|
||||
|
||||
make && make PREFIX=/usr install
|
||||
|
||||
cp -a libbz2.so.* /usr/lib
|
||||
|
||||
ln -sf libbz2.so.1.0.8 /usr/lib/libbz2.so
|
||||
|
||||
ln -sf libbz2.so.1.0.8 /usr/lib/libbz2.so.1
|
||||
|
||||
cp bzip2-shared /usr/bin/bzip2
|
||||
|
||||
for i in /usr/bin/{bzcat,bunzip2}; do
|
||||
ln -sf bzip2 $i
|
||||
done
|
||||
|
||||
rm -f /usr/lib/libbz2.a
|
||||
|
||||
cd "$SOURCES" && rm -rf bzip2-$BZIP2_VERSION
|
||||
EOF
|
||||
12
stage/chroot/file.bash
Normal file
12
stage/chroot/file.bash
Normal file
@@ -0,0 +1,12 @@
|
||||
sudo chroot "$SYSROOT" /usr/bin/env -i MAKEFLAGS="$MAKEFLAGS" PATH=/usr/bin:/usr/sbin SOURCES=/sources FILE_VERSION=$FILE_VERSION /usr/bin/bash <<- "EOF"
|
||||
set -euo pipefail
|
||||
|
||||
cd "$SOURCES" && tar xf file-$FILE_VERSION.tar.gz && cd file-$FILE_VERSION
|
||||
|
||||
./configure \
|
||||
--prefix=/usr
|
||||
|
||||
make && make install
|
||||
|
||||
cd "$SOURCES" && rm -rf file-$FILE_VERSION
|
||||
EOF
|
||||
74
stage/chroot/glibc.bash
Normal file
74
stage/chroot/glibc.bash
Normal file
@@ -0,0 +1,74 @@
|
||||
fetch $TZDATA_URL
|
||||
|
||||
sudo chroot "$SYSROOT" /usr/bin/env -i MAKEFLAGS="$MAKEFLAGS" PATH=/usr/bin:/usr/sbin SOURCES=/sources GLIBC_VERSION=$GLIBC_VERSION LINUX_VERSION=$LINUX_VERSION TZDATA_VERSION=$TZDATA_VERSION /usr/bin/bash <<- "EOF"
|
||||
set -euo pipefail
|
||||
|
||||
cd "$SOURCES" && tar xf glibc-$GLIBC_VERSION.tar.xz && cd glibc-$GLIBC_VERSION
|
||||
|
||||
patch -Np1 -i "$SOURCES/glibc-fhs-1.patch"
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
echo "rootsbindir=/usr/sbin" > configparms
|
||||
|
||||
../configure \
|
||||
--prefix=/usr \
|
||||
--disable-werror \
|
||||
--disable-nscd \
|
||||
libc_cv_slibdir=/usr/lib \
|
||||
--enable-stack-protector=strong \
|
||||
--enable-kernel= \
|
||||
--disable-nls \
|
||||
--enable-kernel=$LINUX_VERSION \
|
||||
--silent \
|
||||
--quiet
|
||||
|
||||
make && make install
|
||||
|
||||
touch /etc/ld.so.conf
|
||||
sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd
|
||||
|
||||
cat > /etc/nsswitch.conf <<- "END_OF_FILE"
|
||||
passwd: files
|
||||
group: files
|
||||
shadow: files
|
||||
|
||||
hosts: files dns
|
||||
networks: files
|
||||
|
||||
protocols: files
|
||||
services: files
|
||||
ethers: files
|
||||
rpc: files
|
||||
END_OF_FILE
|
||||
|
||||
tar xf $SOURCES/tzdata$TZDATA_VERSION.tar.gz
|
||||
|
||||
ZONEINFO=/usr/share/zoneinfo
|
||||
|
||||
mkdir -p $ZONEINFO/{posix,right}
|
||||
|
||||
for tz in etcetera southamerica northamerica europe africa antarctica asia australasia backward; do
|
||||
zic -L /dev/null -d $ZONEINFO ${tz}
|
||||
zic -L /dev/null -d $ZONEINFO/posix ${tz}
|
||||
zic -L leapseconds -d $ZONEINFO/right ${tz}
|
||||
done
|
||||
|
||||
cp zone.tab zone1970.tab iso3166.tab $ZONEINFO
|
||||
|
||||
zic -d $ZONEINFO -p Africa/Johannesburg
|
||||
|
||||
unset ZONEINFO tz
|
||||
|
||||
ln -sf /usr/share/zoneinfo/Africa/Johannesburg /etc/localtime
|
||||
|
||||
cat > /etc/ld.so.conf <<- "END_OF_FILE"
|
||||
/usr/local/lib
|
||||
/opt/lib
|
||||
include /etc/ld.so.conf.d/*.conf
|
||||
END_OF_FILE
|
||||
|
||||
mkdir -p /etc/ld.so.conf.d
|
||||
|
||||
cd "$SOURCES" && rm -rf glibc-$GLIBC_VERSION
|
||||
EOF
|
||||
12
stage/chroot/iana-etc.bash
Normal file
12
stage/chroot/iana-etc.bash
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
fetch $IANA_ETC_URL
|
||||
|
||||
sudo chroot "$SYSROOT" /usr/bin/env -i MAKEFLAGS="$MAKEFLAGS" PATH=/usr/bin:/usr/sbin SOURCES=/sources IANA_ETC_VERSION=$IANA_ETC_VERSION /usr/bin/bash <<- "EOF"
|
||||
set -euo pipefail
|
||||
|
||||
cd "$SOURCES" && tar xf iana-etc-$IANA_ETC_VERSION.tar.gz && cd iana-etc-$IANA_ETC_VERSION
|
||||
|
||||
cp services protocols /etc
|
||||
|
||||
cd "$SOURCES" && rm -rf iana-etc-$IANA_ETC_VERSION
|
||||
EOF
|
||||
22
stage/chroot/pcre2.bash
Normal file
22
stage/chroot/pcre2.bash
Normal file
@@ -0,0 +1,22 @@
|
||||
fetch $PCRE2_URL
|
||||
|
||||
sudo chroot "$SYSROOT" /usr/bin/env -i MAKEFLAGS="$MAKEFLAGS" PATH=/usr/bin:/usr/sbin SOURCES=/sources PCRE2_VERSION=$PCRE2_VERSION /usr/bin/bash <<- "EOF"
|
||||
set -euo pipefail
|
||||
|
||||
cd "$SOURCES" && tar xf pcre2-$PCRE2_VERSION.tar.gz && cd pcre2-$PCRE2_VERSION
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--enable-unicode \
|
||||
--enable-jit \
|
||||
--enable-pcre2-16 \
|
||||
--enable-pcre2-32 \
|
||||
--enable-pcre2grep-libz \
|
||||
--enable-pcre2grep-libbz2 \
|
||||
--enable-pcre2test-libreadline \
|
||||
--disable-static
|
||||
|
||||
make && make install
|
||||
|
||||
cd "$SOURCES" && rm -rf pcre2-$PCRE2_VERSION
|
||||
EOF
|
||||
28
stage/chroot/readline.bash
Normal file
28
stage/chroot/readline.bash
Normal file
@@ -0,0 +1,28 @@
|
||||
fetch $READLINE_URL
|
||||
|
||||
sudo chroot "$SYSROOT" /usr/bin/env -i MAKEFLAGS="$MAKEFLAGS" PATH=/usr/bin:/usr/sbin SOURCES=/sources READLINE_VERSION=$READLINE_VERSION /usr/bin/bash <<- "EOF"
|
||||
set -euo pipefail
|
||||
|
||||
cd "$SOURCES" && tar xf readline-$READLINE_VERSION.tar.gz && cd readline-$READLINE_VERSION
|
||||
|
||||
sed -i '/MV.*old/d' Makefile.in
|
||||
|
||||
sed -i '/{OLDSUFF}/c:' support/shlib-install
|
||||
|
||||
sed -i 's/-Wl,-rpath,[^ ]*//' support/shobj-conf
|
||||
|
||||
sed -e '270a\
|
||||
else\
|
||||
chars_avail = 1;' \
|
||||
-e '288i\ result = -1;' \
|
||||
-i.orig input.c
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--disable-static \
|
||||
--with-curses
|
||||
|
||||
make SHLIB_LIBS="-lncursesw" && make install
|
||||
|
||||
cd "$SOURCES" && rm -rf readline-$READLINE_VERSION
|
||||
EOF
|
||||
13
stage/chroot/xz.bash
Normal file
13
stage/chroot/xz.bash
Normal file
@@ -0,0 +1,13 @@
|
||||
sudo chroot "$SYSROOT" /usr/bin/env -i MAKEFLAGS="$MAKEFLAGS" PATH=/usr/bin:/usr/sbin SOURCES=/sources XZ_VERSION=$XZ_VERSION /usr/bin/bash <<- "EOF"
|
||||
set -euo pipefail
|
||||
|
||||
cd "$SOURCES" && tar xf xz-$XZ_VERSION.tar.xz && cd xz-$XZ_VERSION
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--disable-static
|
||||
|
||||
make && make install
|
||||
|
||||
cd "$SOURCES" && rm -rf xz-$XZ_VERSION
|
||||
EOF
|
||||
17
stage/chroot/zlib.bash
Normal file
17
stage/chroot/zlib.bash
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
fetch $ZLIB_URL
|
||||
|
||||
sudo chroot "$SYSROOT" /usr/bin/env -i MAKEFLAGS="$MAKEFLAGS" PATH=/usr/bin:/usr/sbin SOURCES=/sources ZLIB_VERSION=$ZLIB_VERSION /usr/bin/bash <<- "EOF"
|
||||
set -euo pipefail
|
||||
|
||||
cd "$SOURCES" && tar xf zlib-$ZLIB_VERSION.tar.gz && cd zlib-$ZLIB_VERSION
|
||||
|
||||
./configure \
|
||||
--prefix=/usr
|
||||
|
||||
make && make install
|
||||
|
||||
rm -f /usr/lib/libz.a
|
||||
|
||||
cd "$SOURCES" && rm -rf zlib-$ZLIB_VERSION
|
||||
EOF
|
||||
15
stage/chroot/zstd.bash
Normal file
15
stage/chroot/zstd.bash
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
fetch $ZSTD_URL
|
||||
|
||||
sudo chroot "$SYSROOT" /usr/bin/env -i MAKEFLAGS="$MAKEFLAGS" PATH=/usr/bin:/usr/sbin SOURCES=/sources ZSTD_VERSION=$ZSTD_VERSION /usr/bin/bash <<- "EOF"
|
||||
set -euo pipefail
|
||||
|
||||
cd "$SOURCES" && tar xf zstd-$ZSTD_VERSION.tar.gz && cd zstd-$ZSTD_VERSION
|
||||
|
||||
make prefix=/usr
|
||||
make prefix=/usr install
|
||||
|
||||
rm /usr/lib/libzstd.a
|
||||
|
||||
cd "$SOURCES" && rm -rf zstd-$ZSTD_VERSION
|
||||
EOF
|
||||
Reference in New Issue
Block a user