From 4300e81ff831f88e78e1a9b4a9f0b9c7c3cd461d Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 2 Feb 2018 15:13:46 +0100 Subject: building up to libnfnetlink --- README | 13 +++---------- build_stage1.sh | 4 ++-- packages-i486-stage1/elfutils | 8 ++++++++ packages-i486-stage1/libmnl | 5 +++++ packages-i486-stage1/libnfnetlink | 5 +++++ packages-i486-stage1/net-tools | 6 +----- 6 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 packages-i486-stage1/elfutils create mode 100644 packages-i486-stage1/libmnl create mode 100644 packages-i486-stage1/libnfnetlink diff --git a/README b/README index aa85121..2d3f6f1 100644 --- a/README +++ b/README @@ -169,19 +169,18 @@ archlinux-keyring archlinux32-keyring pacman-mirrorlist pacman \ make mpfr gawk libmpc binutils gcc \ linux uinit \ glibc \ - libmnl elfutils libnfnetlink iptables iproute2 \ + iptables iproute2 \ libedit openssh \ sysfsutils libidn nettle iputils" # libunwind # mpfr for gawk, gcc -# libnfnetlink for iptables -# libmnl, libelf, iptables for iproute2 +# iptables for iproute2 # libedit for openssh # sysfsutils and libidn, nettle for iputils SYSROOT_PACKAGES=" \ \ -file libmpc mpfr libmnl libelf libnfnetlink iptables \ +file libmpc mpfr iptables \ libedit sysfsutils libidn" @@ -344,14 +343,8 @@ sed -i "/pkgname/s/lib32-glibc//g" PKGBUILD -# libmnl -sed -i 's@./configure@./configure --host=i486-unknown-linux-gnu --build=x86_64-pc-linux-gnu@g' libmnl/PKGBUILD -# libelf -sed -i 's@./configure@./configure --host=i486-unknown-linux-gnu --build=x86_64-pc-linux-gnu@g' libelf/PKGBUILD -# libnfnetlink -sed -i 's@./configure@./configure --host=i486-unknown-linux-gnu --build=x86_64-pc-linux-gnu@g' libnfnetlink/PKGBUILD # iptables sed -i 's@./configure@./configure --host=i486-unknown-linux-gnu --build=x86_64-pc-linux-gnu@g' iptables/PKGBUILD diff --git a/build_stage1.sh b/build_stage1.sh index 1ed6758..37045d6 100755 --- a/build_stage1.sh +++ b/build_stage1.sh @@ -13,11 +13,11 @@ attr acl gmp gdbm db perl openssl zlib pambase cracklib libtirpc pam libcap coreutils util-linux e2fsprogs expat bzip2 lz4 xz pcre less gzip tar libarchive curl - +elfutils sed texinfo grep findutils file diffutils ed patch kbd procps-ng shadow -net-tools" +net-tools libmnl libnfnetlink" for p in $PACKAGES; do "$SCRIPT_DIR/build_stage1_package.sh" "$p" || exit 1 diff --git a/packages-i486-stage1/elfutils b/packages-i486-stage1/elfutils new file mode 100644 index 0000000..e747c06 --- /dev/null +++ b/packages-i486-stage1/elfutils @@ -0,0 +1,8 @@ +# libelf is needed by iproute2 +SYSROOT_INSTALL=1 + +# we actually need the libelf subpackage to link to +ADDITIONAL_INSTALL_PACKAGE=libelf + +# prepare configure for cross-compilation +sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD diff --git a/packages-i486-stage1/libmnl b/packages-i486-stage1/libmnl new file mode 100644 index 0000000..e613146 --- /dev/null +++ b/packages-i486-stage1/libmnl @@ -0,0 +1,5 @@ +# libmnl is needed by iproute2 +SYSROOT_INSTALL=1 + +# prepare configure for cross-compilation +sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD diff --git a/packages-i486-stage1/libnfnetlink b/packages-i486-stage1/libnfnetlink new file mode 100644 index 0000000..8aa6d2d --- /dev/null +++ b/packages-i486-stage1/libnfnetlink @@ -0,0 +1,5 @@ +# libnfnetlink is needed by iproute2 +SYSROOT_INSTALL=1 + +# prepare configure for cross-compilation +sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKGBUILD diff --git a/packages-i486-stage1/net-tools b/packages-i486-stage1/net-tools index 821bb63..e0227f8 100644 --- a/packages-i486-stage1/net-tools +++ b/packages-i486-stage1/net-tools @@ -1,5 +1,5 @@ # prepare configure for cross-compilation -sed -i "s@make @make CC=$TARGET_ARCH-cc LD=$TARGET_ARCH-ld@g" PKGBUILD +sed -i "s@make @make CC=$TARGET_ARCH-cc LD=$TARGET_ARCH-ld @g" PKGBUILD sed -i "s@make\$@make CC=$TARGET_ARCH-cc LD=$TARGET_ARCH-ld @g" PKGBUILD # git for release checkouts, using the one from host @@ -9,7 +9,3 @@ sed -i "/makedepends/s/git//g" PKGBUILD sed -i 's@source=(@source=(net-tools-1.60-if_tunnel.patch @' PKGBUILD sed -i "s@sha1sums=(@sha1sums=('SKIP' @" PKGBUILD sed -i '2!N; /prepare() {/ a \ pushd ${srcdir}/${pkgname}; patch -Np1 < ${srcdir}/net-tools-1.60-if_tunnel.patch; popd' PKGBUILD - -# TODO: wrong installation pathes, should be /usr/bin -# install: cannot create regular file '/bin/ifconfig': Permission denied -# make: *** [Makefile:216: installbin] Error 1 -- cgit v1.2.3-54-g00ecf