Simplify source.sh, fix dependencies and enable CET support
This commit is contained in:
@@ -17,14 +17,21 @@ prepare() {
|
||||
build() {
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
# Install system binaries to /usr/sbin
|
||||
echo "rootsbindir=/usr/sbin" > configparms
|
||||
../configure --prefix=/usr \
|
||||
--disable-werror \
|
||||
--enable-kernel=5.4 \
|
||||
--enable-stack-protector=strong \
|
||||
--disable-nscd \
|
||||
|
||||
../configure --prefix=/usr \
|
||||
--with-headers=/usr/include \
|
||||
--enable-kernel=5.4 \
|
||||
--enable-cet \
|
||||
--enable-stack-protector=strong \
|
||||
--disable-werror \
|
||||
--disable-nscd \
|
||||
libc_cv_slibdir=/usr/lib
|
||||
make
|
||||
|
||||
# Generate locales here because localedef does not work in fakeroot
|
||||
make -C "$BPM_SOURCE"/localedata objdir="$BPM_SOURCE"/build DESTDIR="${BPM_WORKDIR}"/locales install-locale-files
|
||||
}
|
||||
|
||||
@@ -36,6 +43,7 @@ check() {
|
||||
sed -i "/tst-thread-affinity-sched/d" nptl/Makefile
|
||||
|
||||
cd build
|
||||
|
||||
make check
|
||||
}
|
||||
|
||||
@@ -43,22 +51,35 @@ check() {
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
cd build
|
||||
|
||||
make DESTDIR="$BPM_OUTPUT" install
|
||||
|
||||
# Fix hardcoded path
|
||||
sed '/RTLDLIST=/s@/usr@@g' -i "$BPM_OUTPUT"/usr/bin/ldd
|
||||
mkdir -p "$BPM_OUTPUT"/usr/lib/locale
|
||||
mkdir -p "$BPM_OUTPUT"/etc
|
||||
mkdir -p "$BPM_OUTPUT"/usr/share/i18n
|
||||
sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' "$BPM_SOURCE"/localedata/SUPPORTED > "$BPM_OUTPUT"/usr/share/i18n/SUPPORTED
|
||||
|
||||
# Install locale-gen script
|
||||
install -Dm755 "$BPM_WORKDIR"/locale-gen "$BPM_OUTPUT"/usr/bin/locale-gen
|
||||
|
||||
# Create locale.gen file
|
||||
install -dm755 "$BPM_OUTPUT"/etc
|
||||
touch "$BPM_OUTPUT"/etc/locale.gen
|
||||
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' "$BPM_SOURCE"/localedata/SUPPORTED >> "$BPM_OUTPUT"/etc/locale.gen
|
||||
sed -i '/#C\.UTF-8 /d' "$BPM_OUTPUT"/etc/locale.gen
|
||||
|
||||
# Create SUPPORTED file
|
||||
install -dm755 "$BPM_OUTPUT"/usr/share/i18n
|
||||
sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' "$BPM_SOURCE"/localedata/SUPPORTED > "$BPM_OUTPUT"/usr/share/i18n/SUPPORTED
|
||||
|
||||
# Install C.UTF-8 so that it is always available
|
||||
install -dm55 "$BPM_OUTPUT"/usr/lib/locale
|
||||
cp -r "$BPM_WORKDIR"/locales/usr/lib/locale/C.utf8 -t "$BPM_OUTPUT"/usr/lib/locale
|
||||
cp "$BPM_WORKDIR"/locale-gen "$BPM_OUTPUT"/usr/bin/locale-gen
|
||||
mkdir -p "$BPM_OUTPUT"/lib64/
|
||||
sed -i '/#C\.UTF-8 /d' "$BPM_OUTPUT"/etc/locale.gen
|
||||
|
||||
# Symlink glibc dynamic linker to /lib64
|
||||
install -dm755 "$BPM_OUTPUT"/lib64/
|
||||
ln -sf ../lib/ld-linux-x86-64.so.2 "$BPM_OUTPUT"/lib64
|
||||
ln -sf ../lib/ld-linux-x86-64.so.2 "$BPM_OUTPUT"/lib64/ld-lsb-x86_64.so.3
|
||||
chmod +x "$BPM_OUTPUT"/usr/bin/locale-gen
|
||||
|
||||
# Install package licenses
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSES "$BPM_OUTPUT"/usr/share/licenses/glibc/LICENSES
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/glibc/COPYING
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING.LIB "$BPM_OUTPUT"/usr/share/licenses/glibc/COPYING.LIB
|
||||
|
||||
Reference in New Issue
Block a user