From ffacb26218d2f05ef42e6acea90fb3908e741292 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 24 Jan 2018 12:52:41 +0100 Subject: [PATCH] Remove depends file Instead of having a "depends" file with a list of packages, add a "DEPENDS" variable to the build script. Generate the rootfs dependencies from a config file stored in the cfg directory. Signed-off-by: David Oberhollenzer --- pkg/rootfs-alix/depends => cfg/alix/ROOTFS | 0 pkg/rootfs-rpi3/depends => cfg/rpi3/ROOTFS | 0 pkg/base-files/build | 2 ++ pkg/bash-completion/build | 1 + pkg/bash-completion/depends | 1 - pkg/bash/build | 1 + pkg/bash/depends | 2 -- pkg/bbstatic/build | 1 + pkg/bdb/build | 1 + pkg/boot-rpi3/build | 1 + pkg/bzip2/build | 1 + pkg/coreutils/build | 1 + pkg/diffutils/build | 1 + pkg/dnsmasq/build | 1 + pkg/ethtool/build | 1 + pkg/expat/build | 1 + pkg/expat/depends | 1 - pkg/findutils/build | 1 + pkg/firmware-rpi3/build | 1 + pkg/gawk/build | 1 + pkg/gmp/build | 1 + pkg/grep/build | 1 + pkg/gzip/build | 1 + pkg/inetutils/build | 1 + pkg/inetutils/depends | 2 -- pkg/initrd/build | 2 ++ pkg/initrd/depends | 1 - pkg/iproute2/build | 1 + pkg/iproute2/depends | 2 -- pkg/kmod/build | 1 + pkg/kmod/depends | 2 -- pkg/less/build | 1 + pkg/less/depends | 1 - pkg/libbsd/build | 1 + pkg/libevent/build | 1 + pkg/libiconv/build | 1 + pkg/libidn2/build | 1 + pkg/libidn2/depends | 2 -- pkg/libmnl/build | 1 + pkg/libtasn1/build | 1 + pkg/libunistring/build | 1 + pkg/libunistring/depends | 1 - pkg/linux-rpi3/build | 1 + pkg/linux-rpi3/depends | 1 - pkg/linux/build | 1 + pkg/linux/depends | 1 - pkg/linux_modules/build | 1 + pkg/nano/build | 1 + pkg/nano/depends | 1 - pkg/ncurses/build | 1 + pkg/nettle/build | 1 + pkg/nettle/depends | 1 - pkg/openssl/build | 1 + pkg/openssl/depends | 1 - pkg/readline/build | 1 + pkg/readline/depends | 1 - pkg/release-alix/build | 6 ++++-- pkg/release-alix/depends | 2 -- pkg/release-rpi3/build | 6 ++++-- pkg/release-rpi3/depends | 3 --- pkg/rootfs-alix/build | 2 ++ pkg/rootfs-rpi3/build | 2 ++ pkg/sed/build | 1 + pkg/sqlite3/build | 1 + pkg/sqlite3/depends | 1 - pkg/tar/build | 1 + pkg/tar/depends | 3 --- pkg/unbound/build | 1 + pkg/unbound/depends | 3 --- pkg/util-linux/build | 1 + pkg/util-linux/depends | 3 --- pkg/xz/build | 1 + pkg/zlib/build | 1 + tcpkg/binutils/build | 1 + tcpkg/cloog/build | 1 + tcpkg/gcc1/build | 1 + tcpkg/gcc1/depends | 7 ------- tcpkg/gcc2/build | 1 + tcpkg/gcc2/depends | 2 -- tcpkg/gmp/build | 1 + tcpkg/isl/build | 1 + tcpkg/libgcc/build | 2 ++ tcpkg/libgcc/depends | 1 - tcpkg/linux_hdr/build | 1 + tcpkg/mpc/build | 1 + tcpkg/mpfr/build | 1 + tcpkg/musl/build | 1 + tcpkg/musl/depends | 1 - tcpkg/pkg-config/build | 1 + tcpkg/toolchain/build | 2 ++ tcpkg/toolchain/depends | 4 ---- util/depends.sh | 18 ++++++++++++------ util/download.sh | 2 +- util/pkgcmd.sh | 2 +- util/toolchain.sh | 14 ++++++++------ 95 files changed, 96 insertions(+), 69 deletions(-) rename pkg/rootfs-alix/depends => cfg/alix/ROOTFS (100%) rename pkg/rootfs-rpi3/depends => cfg/rpi3/ROOTFS (100%) delete mode 100644 pkg/bash-completion/depends delete mode 100644 pkg/bash/depends delete mode 100644 pkg/expat/depends delete mode 100644 pkg/inetutils/depends delete mode 100644 pkg/initrd/depends delete mode 100644 pkg/iproute2/depends delete mode 100644 pkg/kmod/depends delete mode 100644 pkg/less/depends delete mode 100644 pkg/libidn2/depends delete mode 100644 pkg/libunistring/depends delete mode 100644 pkg/linux-rpi3/depends delete mode 100644 pkg/linux/depends delete mode 100644 pkg/nano/depends delete mode 100644 pkg/nettle/depends delete mode 100644 pkg/openssl/depends delete mode 100644 pkg/readline/depends delete mode 100644 pkg/release-alix/depends delete mode 100644 pkg/release-rpi3/depends delete mode 100644 pkg/sqlite3/depends delete mode 100644 pkg/tar/depends delete mode 100644 pkg/unbound/depends delete mode 100644 pkg/util-linux/depends delete mode 100644 tcpkg/gcc1/depends delete mode 100644 tcpkg/gcc2/depends delete mode 100644 tcpkg/libgcc/depends delete mode 100644 tcpkg/musl/depends delete mode 100644 tcpkg/toolchain/depends diff --git a/pkg/rootfs-alix/depends b/cfg/alix/ROOTFS similarity index 100% rename from pkg/rootfs-alix/depends rename to cfg/alix/ROOTFS diff --git a/pkg/rootfs-rpi3/depends b/cfg/rpi3/ROOTFS similarity index 100% rename from pkg/rootfs-rpi3/depends rename to cfg/rpi3/ROOTFS diff --git a/pkg/base-files/build b/pkg/base-files/build index 269cb3b..66d4619 100644 --- a/pkg/base-files/build +++ b/pkg/base-files/build @@ -1,3 +1,5 @@ +DEPENDS="" + build() { return } diff --git a/pkg/bash-completion/build b/pkg/bash-completion/build index f1f5102..35a5564 100755 --- a/pkg/bash-completion/build +++ b/pkg/bash-completion/build @@ -3,6 +3,7 @@ SRCDIR="bash-completion-${VERSION}" TARBALL="${SRCDIR}.tar.bz2" URL="https://bash-completion.alioth.debian.org/files/" SHA256SUM="2b606804a7d5f823380a882e0f7b6c8a37b0e768e72c3d4107c51fbe8a46ae4f" +DEPENDS="bash" prepare() { return diff --git a/pkg/bash-completion/depends b/pkg/bash-completion/depends deleted file mode 100644 index 705963a..0000000 --- a/pkg/bash-completion/depends +++ /dev/null @@ -1 +0,0 @@ -bash diff --git a/pkg/bash/build b/pkg/bash/build index e1d6bbd..1bad43d 100755 --- a/pkg/bash/build +++ b/pkg/bash/build @@ -3,6 +3,7 @@ SRCDIR="bash-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="https://ftp.gnu.org/gnu/bash/" SHA256SUM="57d8432be54541531a496fd4904fdc08c12542f43605a9202594fa5d5f9f2331" +DEPENDS="ncurses readline" prepare() { return diff --git a/pkg/bash/depends b/pkg/bash/depends deleted file mode 100644 index 4b5f6e4..0000000 --- a/pkg/bash/depends +++ /dev/null @@ -1,2 +0,0 @@ -ncurses -readline diff --git a/pkg/bbstatic/build b/pkg/bbstatic/build index 7fa7826..6352b3f 100755 --- a/pkg/bbstatic/build +++ b/pkg/bbstatic/build @@ -3,6 +3,7 @@ SRCDIR="busybox-$VERSION" TARBALL="busybox-$VERSION.tar.bz2" URL="https://busybox.net/downloads" SHA256SUM="9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df" +DEPENDS="" prepare() { return diff --git a/pkg/bdb/build b/pkg/bdb/build index a9ac33f..4b168f3 100755 --- a/pkg/bdb/build +++ b/pkg/bdb/build @@ -3,6 +3,7 @@ SRCDIR="db-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="http://download.oracle.com/berkeley-db/" SHA256SUM="a9c5e2b004a5777aa03510cfe5cd766a4a3b777713406b02809c17c8e0e7a8fb" +DEPENDS="" prepare() { return diff --git a/pkg/boot-rpi3/build b/pkg/boot-rpi3/build index b2de567..5d48577 100755 --- a/pkg/boot-rpi3/build +++ b/pkg/boot-rpi3/build @@ -1,5 +1,6 @@ # inherit package details from kernel package source "$SCRIPTDIR/pkg/firmware-rpi3/build" +DEPENDS="" build() { return diff --git a/pkg/bzip2/build b/pkg/bzip2/build index b6254da..00291bd 100755 --- a/pkg/bzip2/build +++ b/pkg/bzip2/build @@ -3,6 +3,7 @@ SRCDIR="bzip2-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="http://www.bzip.org/1.0.6/" SHA256SUM="a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd" +DEPENDS="" prepare() { return diff --git a/pkg/coreutils/build b/pkg/coreutils/build index bbdb77b..6e5e993 100755 --- a/pkg/coreutils/build +++ b/pkg/coreutils/build @@ -3,6 +3,7 @@ SRCDIR="coreutils-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/coreutils/" SHA256SUM="1117b1a16039ddd84d51a9923948307cfa28c2cea03d1a2438742253df0a0c65" +DEPENDS="" prepare() { local PKGSCRIPTDIR="$1" diff --git a/pkg/diffutils/build b/pkg/diffutils/build index 6ca813d..b7df1cd 100755 --- a/pkg/diffutils/build +++ b/pkg/diffutils/build @@ -3,6 +3,7 @@ SRCDIR="diffutils-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/diffutils/" SHA256SUM="d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6" +DEPENDS="" prepare() { return diff --git a/pkg/dnsmasq/build b/pkg/dnsmasq/build index 4ba9167..02603ad 100644 --- a/pkg/dnsmasq/build +++ b/pkg/dnsmasq/build @@ -3,6 +3,7 @@ SRCDIR="dnsmasq-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="http://www.thekelleys.org.uk/dnsmasq" SHA256SUM="89949f438c74b0c7543f06689c319484bd126cc4b1f8c745c742ab397681252b" +DEPENDS="" prepare() { return diff --git a/pkg/ethtool/build b/pkg/ethtool/build index 07eb503..67c8d2e 100755 --- a/pkg/ethtool/build +++ b/pkg/ethtool/build @@ -3,6 +3,7 @@ SRCDIR="ethtool-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://www.kernel.org/pub/software/network/ethtool/" SHA256SUM="b7c1a380007d30eaf261a63b3cfc000f9d93f9eb7626dcd48b5d2a733af99cba" +DEPENDS="" prepare() { return diff --git a/pkg/expat/build b/pkg/expat/build index 1e04157..f84c4bc 100644 --- a/pkg/expat/build +++ b/pkg/expat/build @@ -3,6 +3,7 @@ SRCDIR="libexpat-${VERSION}/expat" TARBALL="${VERSION}.tar.gz" URL="https://github.com/libexpat/libexpat/archive" SHA256SUM="b3781742738611eaa737543ee94264dd511c52a3ba7e53111f7d705f6bff65a8" +DEPENDS="libbsd" prepare() { autoreconf --force --install --symlink diff --git a/pkg/expat/depends b/pkg/expat/depends deleted file mode 100644 index de0aa90..0000000 --- a/pkg/expat/depends +++ /dev/null @@ -1 +0,0 @@ -libbsd diff --git a/pkg/findutils/build b/pkg/findutils/build index 8733e06..33e54a5 100755 --- a/pkg/findutils/build +++ b/pkg/findutils/build @@ -3,6 +3,7 @@ SRCDIR="findutils-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="https://ftp.gnu.org/gnu/findutils/" SHA256SUM="ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d" +DEPENDS="" prepare() { return diff --git a/pkg/firmware-rpi3/build b/pkg/firmware-rpi3/build index 24eb607..6c523ba 100755 --- a/pkg/firmware-rpi3/build +++ b/pkg/firmware-rpi3/build @@ -3,6 +3,7 @@ SRCDIR="firmware-${VERSION}" TARBALL="${VERSION}" URL="https://codeload.github.com/raspberrypi/firmware/tar.gz" SHA256SUM="e253084463a0a3ba908396ac383169397d53bc55307d0d8471f2814f2458fa1b" +DEPENDS="" #export BRCM43430FW_BUILD_DIR=$(BUILD_DIR)/brcm43430fw #export BRCM43430FW_SOURCE_DIR=$(SOURCE_DIR)/brcm43430fw diff --git a/pkg/gawk/build b/pkg/gawk/build index 9e3930a..49f10c2 100755 --- a/pkg/gawk/build +++ b/pkg/gawk/build @@ -3,6 +3,7 @@ SRCDIR="gawk-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/gawk/" SHA256SUM="d4f3cd31c001fd0ed52832d4fbfbdfeaa38ad541c182f80ff8fdf87324a6a9f2" +DEPENDS="" prepare() { return diff --git a/pkg/gmp/build b/pkg/gmp/build index 6a555d1..ef229fd 100755 --- a/pkg/gmp/build +++ b/pkg/gmp/build @@ -3,6 +3,7 @@ SRCDIR="gmp-$VERSION" TARBALL="gmp-$VERSION.tar.bz2" URL="http://ftp.gnu.org/gnu/gmp" SHA256SUM="5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2" +DEPENDS="" prepare() { return diff --git a/pkg/grep/build b/pkg/grep/build index b58d473..787561b 100755 --- a/pkg/grep/build +++ b/pkg/grep/build @@ -3,6 +3,7 @@ SRCDIR="grep-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/grep/" SHA256SUM="db625c7ab3bb3ee757b3926a5cfa8d9e1c3991ad24707a83dde8a5ef2bf7a07e" +DEPENDS="" prepare() { return diff --git a/pkg/gzip/build b/pkg/gzip/build index 89250c6..6b37b2d 100755 --- a/pkg/gzip/build +++ b/pkg/gzip/build @@ -3,6 +3,7 @@ SRCDIR="gzip-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/gzip/" SHA256SUM="ae506144fc198bd8f81f1f4ad19ce63d5a2d65e42333255977cf1dcf1479089a" +DEPENDS="" prepare() { return diff --git a/pkg/inetutils/build b/pkg/inetutils/build index 95bf1f5..0e38785 100755 --- a/pkg/inetutils/build +++ b/pkg/inetutils/build @@ -3,6 +3,7 @@ SRCDIR="inetutils-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/inetutils/" SHA256SUM="849d96f136effdef69548a940e3e0ec0624fc0c81265296987986a0dd36ded37" +DEPENDS="ncurses readline" prepare() { return diff --git a/pkg/inetutils/depends b/pkg/inetutils/depends deleted file mode 100644 index 4b5f6e4..0000000 --- a/pkg/inetutils/depends +++ /dev/null @@ -1,2 +0,0 @@ -ncurses -readline diff --git a/pkg/initrd/build b/pkg/initrd/build index 7559d5d..2bf626d 100755 --- a/pkg/initrd/build +++ b/pkg/initrd/build @@ -1,3 +1,5 @@ +DEPENDS="bbstatic" + filetype() { local argv1="$1" diff --git a/pkg/initrd/depends b/pkg/initrd/depends deleted file mode 100644 index d6cf618..0000000 --- a/pkg/initrd/depends +++ /dev/null @@ -1 +0,0 @@ -bbstatic diff --git a/pkg/iproute2/build b/pkg/iproute2/build index a9f5cf0..86f7c79 100755 --- a/pkg/iproute2/build +++ b/pkg/iproute2/build @@ -3,6 +3,7 @@ SRCDIR="iproute2-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://www.kernel.org/pub/linux/utils/net/iproute2/" SHA256SUM="d43ac068afcc350a448f4581b6e292331ef7e4e7aa746e34981582d5fdb10067" +DEPENDS="bdb libmnl" prepare() { local PKGSCRIPTDIR="$1" diff --git a/pkg/iproute2/depends b/pkg/iproute2/depends deleted file mode 100644 index 8f05870..0000000 --- a/pkg/iproute2/depends +++ /dev/null @@ -1,2 +0,0 @@ -bdb -libmnl diff --git a/pkg/kmod/build b/pkg/kmod/build index 6231984..1ed5e81 100644 --- a/pkg/kmod/build +++ b/pkg/kmod/build @@ -3,6 +3,7 @@ SRCDIR="kmod-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://www.kernel.org/pub/linux/utils/kernel/kmod/" SHA256SUM="7165e6496656159dcb909a91ed708a0fe273a4b128b4b1dc997ccb5189eef1cd" +DEPENDS="zlib xz" prepare() { return diff --git a/pkg/kmod/depends b/pkg/kmod/depends deleted file mode 100644 index d557640..0000000 --- a/pkg/kmod/depends +++ /dev/null @@ -1,2 +0,0 @@ -zlib -xz diff --git a/pkg/less/build b/pkg/less/build index 7a44a5f..4b4ca9f 100755 --- a/pkg/less/build +++ b/pkg/less/build @@ -3,6 +3,7 @@ SRCDIR="less-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="https://ftp.gnu.org/gnu/less/" SHA256SUM="f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706" +DEPENDS="ncurses" prepare() { return diff --git a/pkg/less/depends b/pkg/less/depends deleted file mode 100644 index 6a470ff..0000000 --- a/pkg/less/depends +++ /dev/null @@ -1 +0,0 @@ -ncurses diff --git a/pkg/libbsd/build b/pkg/libbsd/build index ed5015f..36dd550 100644 --- a/pkg/libbsd/build +++ b/pkg/libbsd/build @@ -3,6 +3,7 @@ SRCDIR="libbsd-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://libbsd.freedesktop.org/releases" SHA256SUM="467fbf9df1f49af11f7f686691057c8c0a7613ae5a870577bef9155de39f9687" +DEPENDS="" prepare() { return diff --git a/pkg/libevent/build b/pkg/libevent/build index 5dad70d..b00a56e 100755 --- a/pkg/libevent/build +++ b/pkg/libevent/build @@ -3,6 +3,7 @@ SRCDIR="libevent-${VERSION}-stable" TARBALL="${SRCDIR}.tar.gz" URL="https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/" SHA256SUM="965cc5a8bb46ce4199a47e9b2c9e1cae3b137e8356ffdad6d94d3b9069b71dc2" +DEPENDS="" prepare() { return diff --git a/pkg/libiconv/build b/pkg/libiconv/build index ca0fae1..9bfba30 100755 --- a/pkg/libiconv/build +++ b/pkg/libiconv/build @@ -3,6 +3,7 @@ SRCDIR="libiconv-$VERSION" TARBALL="${SRCDIR}.tar.gz" URL="https://ftp.gnu.org/gnu/libiconv/" SHA256SUM="ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178" +DEPENDS="" prepare() { return diff --git a/pkg/libidn2/build b/pkg/libidn2/build index 3705077..9f966f5 100755 --- a/pkg/libidn2/build +++ b/pkg/libidn2/build @@ -3,6 +3,7 @@ SRCDIR="libidn2-$VERSION" TARBALL="${SRCDIR}.tar.gz" URL="https://ftp.gnu.org/gnu/libidn" SHA256SUM="644b6b03b285fb0ace02d241d59483d98bc462729d8bb3608d5cad5532f3d2f0" +DEPENDS="libiconv libunistring" prepare() { return diff --git a/pkg/libidn2/depends b/pkg/libidn2/depends deleted file mode 100644 index 1eb7830..0000000 --- a/pkg/libidn2/depends +++ /dev/null @@ -1,2 +0,0 @@ -libiconv -libunistring diff --git a/pkg/libmnl/build b/pkg/libmnl/build index 198dadc..8dd53df 100644 --- a/pkg/libmnl/build +++ b/pkg/libmnl/build @@ -3,6 +3,7 @@ SRCDIR="libmnl-${VERSION}" TARBALL="${SRCDIR}.tar.bz2" URL="https://www.netfilter.org/projects/libmnl/files/" SHA256SUM="171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81" +DEPENDS="" prepare() { return diff --git a/pkg/libtasn1/build b/pkg/libtasn1/build index c6c8dc0..c0cc74e 100755 --- a/pkg/libtasn1/build +++ b/pkg/libtasn1/build @@ -3,6 +3,7 @@ SRCDIR="libtasn1-$VERSION" TARBALL="libtasn1-$VERSION.tar.gz" URL="https://ftp.gnu.org/gnu/libtasn1" SHA256SUM="7e528e8c317ddd156230c4e31d082cd13e7ddeb7a54824be82632209550c8cca" +DEPENDS="" prepare() { return diff --git a/pkg/libunistring/build b/pkg/libunistring/build index 2752200..6a28629 100755 --- a/pkg/libunistring/build +++ b/pkg/libunistring/build @@ -3,6 +3,7 @@ SRCDIR="libunistring-$VERSION" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/libunistring" SHA256SUM="7b9338cf52706facb2e18587dceda2fbc4a2a3519efa1e15a3f2a68193942f80" +DEPENDS="libiconv" prepare() { return diff --git a/pkg/libunistring/depends b/pkg/libunistring/depends deleted file mode 100644 index 788f235..0000000 --- a/pkg/libunistring/depends +++ /dev/null @@ -1 +0,0 @@ -libiconv diff --git a/pkg/linux-rpi3/build b/pkg/linux-rpi3/build index 0af056d..5c985cf 100755 --- a/pkg/linux-rpi3/build +++ b/pkg/linux-rpi3/build @@ -3,6 +3,7 @@ SRCDIR="linux-raspberrypi-kernel_${VERSION}" TARBALL="raspberrypi-kernel_${VERSION}" URL="https://codeload.github.com/raspberrypi/linux/tar.gz" SHA256SUM="c9b60483e901556a2fbab64c06be8a9eba884f3eaac98ba39347e82bb0a00f5b" +DEPENDS="initrd" prepare() { return diff --git a/pkg/linux-rpi3/depends b/pkg/linux-rpi3/depends deleted file mode 100644 index 339bf6c..0000000 --- a/pkg/linux-rpi3/depends +++ /dev/null @@ -1 +0,0 @@ -initrd diff --git a/pkg/linux/build b/pkg/linux/build index 2734cec..581710d 100755 --- a/pkg/linux/build +++ b/pkg/linux/build @@ -7,6 +7,7 @@ SRCDIR="linux-$VERSION" TARBALL="linux-$VERSION.tar.xz" URL="https://www.kernel.org/pub/linux/kernel/v$MAJOR.x" SHA256SUM="6fb9f67002f986ce3905b35466e35c394e0fa3eb7c32df508514717955cb4de7" +DEPENDS="initrd" prepare() { return diff --git a/pkg/linux/depends b/pkg/linux/depends deleted file mode 100644 index 339bf6c..0000000 --- a/pkg/linux/depends +++ /dev/null @@ -1 +0,0 @@ -initrd diff --git a/pkg/linux_modules/build b/pkg/linux_modules/build index 9657115..39786b9 100755 --- a/pkg/linux_modules/build +++ b/pkg/linux_modules/build @@ -1,5 +1,6 @@ # inherit package details from kernel package source "$SCRIPTDIR/pkg/$LINUXPKG/build" +DEPENDS="" build() { local INPUT="$1" diff --git a/pkg/nano/build b/pkg/nano/build index 2596d1b..9263b1b 100644 --- a/pkg/nano/build +++ b/pkg/nano/build @@ -3,6 +3,7 @@ SRCDIR="nano-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/nano/" SHA256SUM="4eccb7451b5729ce8abae8f9a5679f32e41ae58df73ea86b850ec45b10a83d55" +DEPENDS="ncurses" prepare() { return diff --git a/pkg/nano/depends b/pkg/nano/depends deleted file mode 100644 index 6a470ff..0000000 --- a/pkg/nano/depends +++ /dev/null @@ -1 +0,0 @@ -ncurses diff --git a/pkg/ncurses/build b/pkg/ncurses/build index fd2296d..ae52462 100755 --- a/pkg/ncurses/build +++ b/pkg/ncurses/build @@ -3,6 +3,7 @@ SRCDIR="ncurses-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="https://ftp.gnu.org/gnu/ncurses/" SHA256SUM="f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260" +DEPENDS="" prepare() { return diff --git a/pkg/nettle/build b/pkg/nettle/build index c1e9333..2a4c460 100755 --- a/pkg/nettle/build +++ b/pkg/nettle/build @@ -3,6 +3,7 @@ SRCDIR="nettle-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="https://ftp.gnu.org/gnu/nettle/" SHA256SUM="ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94" +DEPENDS="gmp" prepare() { return diff --git a/pkg/nettle/depends b/pkg/nettle/depends deleted file mode 100644 index a0a0478..0000000 --- a/pkg/nettle/depends +++ /dev/null @@ -1 +0,0 @@ -gmp diff --git a/pkg/openssl/build b/pkg/openssl/build index 8828696..7c093b0 100755 --- a/pkg/openssl/build +++ b/pkg/openssl/build @@ -3,6 +3,7 @@ SRCDIR="openssl-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="https://www.openssl.org/source" SHA256SUM="de4d501267da39310905cb6dc8c6121f7a2cad45a7707f76df828fe1b85073af" +DEPENDS="zlib" source "$SCRIPTDIR/cfg/$CFG/OPENSSL" diff --git a/pkg/openssl/depends b/pkg/openssl/depends deleted file mode 100644 index f22003e..0000000 --- a/pkg/openssl/depends +++ /dev/null @@ -1 +0,0 @@ -zlib diff --git a/pkg/readline/build b/pkg/readline/build index 95baf5f..0fffee0 100755 --- a/pkg/readline/build +++ b/pkg/readline/build @@ -3,6 +3,7 @@ SRCDIR="readline-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="https://ftp.gnu.org/gnu/readline/" SHA256SUM="750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334" +DEPENDS="ncurses" prepare() { return diff --git a/pkg/readline/depends b/pkg/readline/depends deleted file mode 100644 index 6a470ff..0000000 --- a/pkg/readline/depends +++ /dev/null @@ -1 +0,0 @@ -ncurses diff --git a/pkg/release-alix/build b/pkg/release-alix/build index d3627f0..f331000 100755 --- a/pkg/release-alix/build +++ b/pkg/release-alix/build @@ -1,14 +1,16 @@ +DEPENDS="rootfs-alix linux" + build() { local SOURCE="$1" local BUILD="$2" local DEPLOY="$3" # copy output of immediate dependencies - while read pkgname; do + for pkgname in $DEPENDS; do if [ -e "$PKGDEPLOYDIR/$pkgname" ]; then cp -ru ${PKGDEPLOYDIR}/${pkgname}/* "$BUILD" fi - done < "$SCRIPTDIR/pkg/release-${CFG}/depends" + done # copy additional files from this package, subsitute filenames local linux_image=$(basename $BUILD/vmlinuz*) diff --git a/pkg/release-alix/depends b/pkg/release-alix/depends deleted file mode 100644 index 09bbde6..0000000 --- a/pkg/release-alix/depends +++ /dev/null @@ -1,2 +0,0 @@ -rootfs-alix -linux diff --git a/pkg/release-rpi3/build b/pkg/release-rpi3/build index 6d7b78e..789c3a6 100755 --- a/pkg/release-rpi3/build +++ b/pkg/release-rpi3/build @@ -1,3 +1,5 @@ +DEPENDS="rootfs-rpi3 linux-rpi3 boot-rpi3" + build() { local SOURCE="$1" local BUILD="$2" @@ -6,11 +8,11 @@ build() { # copy output of immediate dependencies mkdir -p "$BUILD/boot" - while read pkgname; do + for pkgname in $DEPENDS; do if [ -e "$PKGDEPLOYDIR/$pkgname" ]; then cp -ru ${PKGDEPLOYDIR}/${pkgname}/* "$BUILD/boot" fi - done < "$SCRIPTDIR/pkg/release-${CFG}/depends" + done # copy files from this package cp "$SCRIPTDIR/pkg/release-${CFG}/cmdline.txt" "$BUILD/boot" diff --git a/pkg/release-rpi3/depends b/pkg/release-rpi3/depends deleted file mode 100644 index 21d4a5c..0000000 --- a/pkg/release-rpi3/depends +++ /dev/null @@ -1,3 +0,0 @@ -rootfs-rpi3 -linux-rpi3 -boot-rpi3 diff --git a/pkg/rootfs-alix/build b/pkg/rootfs-alix/build index 4216371..38a7d82 100755 --- a/pkg/rootfs-alix/build +++ b/pkg/rootfs-alix/build @@ -1,3 +1,5 @@ +DEPENDS=$(cat "$SCRIPTDIR/cfg/$CFG/ROOTFS") + build() { local SOURCE="$1" local BUILD="$2" diff --git a/pkg/rootfs-rpi3/build b/pkg/rootfs-rpi3/build index 95ca938..e5fb4f0 100755 --- a/pkg/rootfs-rpi3/build +++ b/pkg/rootfs-rpi3/build @@ -1,3 +1,5 @@ +DEPENDS=$(cat "$SCRIPTDIR/cfg/$CFG/ROOTFS") + build() { local SOURCE="$1" local BUILD="$2" diff --git a/pkg/sed/build b/pkg/sed/build index 8835d27..3d77593 100755 --- a/pkg/sed/build +++ b/pkg/sed/build @@ -3,6 +3,7 @@ SRCDIR="sed-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/sed/" SHA256SUM="cbd6ebc5aaf080ed60d0162d7f6aeae58211a1ee9ba9bb25623daa6cd942683b" +DEPENDS="" prepare() { return diff --git a/pkg/sqlite3/build b/pkg/sqlite3/build index 66aad21..1c57834 100755 --- a/pkg/sqlite3/build +++ b/pkg/sqlite3/build @@ -3,6 +3,7 @@ SRCDIR="sqlite-autoconf-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="https://sqlite.org/2017/" SHA256SUM="d7dd516775005ad87a57f428b6f86afd206cb341722927f104d3f0cf65fbbbe3" +DEPENDS="readline" prepare() { return diff --git a/pkg/sqlite3/depends b/pkg/sqlite3/depends deleted file mode 100644 index 0b5a58e..0000000 --- a/pkg/sqlite3/depends +++ /dev/null @@ -1 +0,0 @@ -readline diff --git a/pkg/tar/build b/pkg/tar/build index 7bd8225..354efa5 100755 --- a/pkg/tar/build +++ b/pkg/tar/build @@ -3,6 +3,7 @@ SRCDIR="tar-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://ftp.gnu.org/gnu/tar/" SHA256SUM="f1bf92dbb1e1ab27911a861ea8dde8208ee774866c46c0bb6ead41f4d1f4d2d3" +DEPENDS="xz gzip bzip2" prepare() { return diff --git a/pkg/tar/depends b/pkg/tar/depends deleted file mode 100644 index 5751c41..0000000 --- a/pkg/tar/depends +++ /dev/null @@ -1,3 +0,0 @@ -xz -gzip -bzip2 diff --git a/pkg/unbound/build b/pkg/unbound/build index e1afac1..75f8761 100644 --- a/pkg/unbound/build +++ b/pkg/unbound/build @@ -3,6 +3,7 @@ SRCDIR="unbound-${VERSION}" TARBALL="${SRCDIR}.tar.gz" URL="https://www.unbound.net/downloads" SHA256SUM="e3b428e33f56a45417107448418865fe08d58e0e7fea199b855515f60884dd49" +DEPENDS="libevent openssl expat" prepare() { return diff --git a/pkg/unbound/depends b/pkg/unbound/depends deleted file mode 100644 index 3e9c854..0000000 --- a/pkg/unbound/depends +++ /dev/null @@ -1,3 +0,0 @@ -libevent -openssl -expat diff --git a/pkg/util-linux/build b/pkg/util-linux/build index 68a78de..8a9447b 100755 --- a/pkg/util-linux/build +++ b/pkg/util-linux/build @@ -3,6 +3,7 @@ SRCDIR="util-linux-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://www.kernel.org/pub/linux/utils/util-linux/v$VERSION/" SHA256SUM="f9be7cdcf4fc5c5064a226599acdda6bdf3d86c640152ba01ea642d91108dc8a" +DEPENDS="bash ncurses zlib" prepare() { local PKGSCRIPTDIR="$1" diff --git a/pkg/util-linux/depends b/pkg/util-linux/depends deleted file mode 100644 index 5270bb5..0000000 --- a/pkg/util-linux/depends +++ /dev/null @@ -1,3 +0,0 @@ -bash -ncurses -zlib diff --git a/pkg/xz/build b/pkg/xz/build index 57f2933..0dfc48c 100644 --- a/pkg/xz/build +++ b/pkg/xz/build @@ -3,6 +3,7 @@ SRCDIR="xz-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://tukaani.org/xz/" SHA256SUM="7876096b053ad598c31f6df35f7de5cd9ff2ba3162e5a5554e4fc198447e0347" +DEPENDS="" prepare() { return diff --git a/pkg/zlib/build b/pkg/zlib/build index afb0bae..99ef19b 100644 --- a/pkg/zlib/build +++ b/pkg/zlib/build @@ -3,6 +3,7 @@ SRCDIR="zlib-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="http://www.zlib.net/" SHA256SUM="4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066" +DEPENDS="" prepare() { return diff --git a/tcpkg/binutils/build b/tcpkg/binutils/build index 7dcfcc0..5be91a3 100755 --- a/tcpkg/binutils/build +++ b/tcpkg/binutils/build @@ -3,6 +3,7 @@ SRCDIR="binutils-$VERSION" TARBALL="binutils-$VERSION.tar.bz2" URL="http://ftp.gnu.org/gnu/binutils" SHA256SUM="1509dff41369fb70aed23682351b663b56db894034773e6dbf7d5d6071fc55cc" +DEPENDS="" prepare() { return diff --git a/tcpkg/cloog/build b/tcpkg/cloog/build index d00517b..0b3e14e 100755 --- a/tcpkg/cloog/build +++ b/tcpkg/cloog/build @@ -3,6 +3,7 @@ SRCDIR="cloog-$VERSION" TARBALL="cloog-$VERSION.tar.gz" URL="ftp://gcc.gnu.org/pub/gcc/infrastructure" SHA256SUM="02500a4edd14875f94fe84cbeda4290425cb0c1c2474c6f75d75a303d64b4196" +DEPENDS="" prepare() { return diff --git a/tcpkg/gcc1/build b/tcpkg/gcc1/build index 21fc2db..58e2c5b 100755 --- a/tcpkg/gcc1/build +++ b/tcpkg/gcc1/build @@ -3,6 +3,7 @@ SRCDIR="gcc-$VERSION" TARBALL="gcc-$VERSION.tar.xz" URL="http://ftp.gnu.org/gnu/gcc/gcc-$VERSION" SHA256SUM="1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a" +DEPENDS="binutils cloog gmp isl mpc mpfr linux_hdr" prepare() { for child in cloog gmp isl mpc mpfr; do diff --git a/tcpkg/gcc1/depends b/tcpkg/gcc1/depends deleted file mode 100644 index f043f15..0000000 --- a/tcpkg/gcc1/depends +++ /dev/null @@ -1,7 +0,0 @@ -binutils -cloog -gmp -isl -mpc -mpfr -linux_hdr diff --git a/tcpkg/gcc2/build b/tcpkg/gcc2/build index b4d9048..7845b24 100755 --- a/tcpkg/gcc2/build +++ b/tcpkg/gcc2/build @@ -1,5 +1,6 @@ # inherit package details from first stage GCC source "$SCRIPTDIR/tcpkg/gcc1/build" +DEPENDS="gcc1 musl" build() { local INPUT="$1" diff --git a/tcpkg/gcc2/depends b/tcpkg/gcc2/depends deleted file mode 100644 index fdb9431..0000000 --- a/tcpkg/gcc2/depends +++ /dev/null @@ -1,2 +0,0 @@ -gcc1 -musl diff --git a/tcpkg/gmp/build b/tcpkg/gmp/build index 8a55d67..17a9c14 100755 --- a/tcpkg/gmp/build +++ b/tcpkg/gmp/build @@ -3,6 +3,7 @@ SRCDIR="gmp-$VERSION" TARBALL="gmp-$VERSION.tar.bz2" URL="http://ftp.gnu.org/gnu/gmp" SHA256SUM="5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2" +DEPENDS="" prepare() { return diff --git a/tcpkg/isl/build b/tcpkg/isl/build index 4e65a32..be513f5 100755 --- a/tcpkg/isl/build +++ b/tcpkg/isl/build @@ -3,6 +3,7 @@ SRCDIR="isl-$VERSION" TARBALL="isl-$VERSION.tar.bz2" URL="ftp://gcc.gnu.org/pub/gcc/infrastructure" SHA256SUM="6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b" +DEPENDS="" prepare() { return diff --git a/tcpkg/libgcc/build b/tcpkg/libgcc/build index 921a89f..c74abb7 100755 --- a/tcpkg/libgcc/build +++ b/tcpkg/libgcc/build @@ -1,3 +1,5 @@ +DEPENDS="gcc2" + build() { return } diff --git a/tcpkg/libgcc/depends b/tcpkg/libgcc/depends deleted file mode 100644 index 4b80d97..0000000 --- a/tcpkg/libgcc/depends +++ /dev/null @@ -1 +0,0 @@ -gcc2 diff --git a/tcpkg/linux_hdr/build b/tcpkg/linux_hdr/build index 58be55e..5763887 100755 --- a/tcpkg/linux_hdr/build +++ b/tcpkg/linux_hdr/build @@ -1,5 +1,6 @@ # inherit package details from kernel package source "$SCRIPTDIR/pkg/$LINUXPKG/build" +DEPENDS="" build() { local INPUT="$1" diff --git a/tcpkg/mpc/build b/tcpkg/mpc/build index f7bcdc8..ae7e691 100755 --- a/tcpkg/mpc/build +++ b/tcpkg/mpc/build @@ -3,6 +3,7 @@ SRCDIR="mpc-$VERSION" TARBALL="mpc-$VERSION.tar.gz" URL="http://ftp.gnu.org/gnu/mpc" SHA256SUM="617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3" +DEPENDS="" prepare() { return diff --git a/tcpkg/mpfr/build b/tcpkg/mpfr/build index 10f44a8..4e0ce5d 100755 --- a/tcpkg/mpfr/build +++ b/tcpkg/mpfr/build @@ -3,6 +3,7 @@ SRCDIR="mpfr-$VERSION" TARBALL="mpfr-$VERSION.tar.bz2" URL="http://ftp.gnu.org/gnu/mpfr" SHA256SUM="d3103a80cdad2407ed581f3618c4bed04e0c92d1cf771a65ead662cc397f7775" +DEPENDS="" prepare() { return diff --git a/tcpkg/musl/build b/tcpkg/musl/build index 622435f..536d778 100755 --- a/tcpkg/musl/build +++ b/tcpkg/musl/build @@ -3,6 +3,7 @@ SRCDIR="musl-$VERSION" TARBALL="$SRCDIR.tar.gz" URL="http://www.musl-libc.org/releases" SHA256SUM="d017ee5d01aec0c522a1330fdff06b1e428cb409e1db819cc4935d5da4a5a118" +DEPENDS="gcc1" prepare() { return diff --git a/tcpkg/musl/depends b/tcpkg/musl/depends deleted file mode 100644 index 3125505..0000000 --- a/tcpkg/musl/depends +++ /dev/null @@ -1 +0,0 @@ -gcc1 diff --git a/tcpkg/pkg-config/build b/tcpkg/pkg-config/build index f9437a2..bb88689 100755 --- a/tcpkg/pkg-config/build +++ b/tcpkg/pkg-config/build @@ -3,6 +3,7 @@ SRCDIR="pkg-config-$VERSION" TARBALL="$SRCDIR.tar.gz" URL="https://pkg-config.freedesktop.org/releases/" SHA256SUM="6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591" +DEPENDS="" prepare() { return diff --git a/tcpkg/toolchain/build b/tcpkg/toolchain/build index 2884120..df4b143 100755 --- a/tcpkg/toolchain/build +++ b/tcpkg/toolchain/build @@ -1,3 +1,5 @@ +DEPENDS="gcc2 libgcc musl pkg-config" + build() { return } diff --git a/tcpkg/toolchain/depends b/tcpkg/toolchain/depends deleted file mode 100644 index 066fe8d..0000000 --- a/tcpkg/toolchain/depends +++ /dev/null @@ -1,4 +0,0 @@ -gcc2 -libgcc -musl -pkg-config diff --git a/util/depends.sh b/util/depends.sh index c4848df..f6bd13c 100755 --- a/util/depends.sh +++ b/util/depends.sh @@ -2,14 +2,20 @@ dependencies_recursive() { local NAME="$1" local PKGDIR="$2" - if [ -e "$SCRIPTDIR/$PKGDIR/$NAME/depends" ]; then - while read DEP; do - echo "$NAME $DEP" - done < "$SCRIPTDIR/$PKGDIR/$NAME/depends" + unset -f build deploy prepare + unset -v VERSION TARBALL URL SRCDIR SHA256SUM DEPENDS + source "$SCRIPTDIR/$PKGDIR/$NAME/build" - while read DEP; do + local depends="$DEPENDS" + + if [ ! -z "$depends" ]; then + for DEP in $depends; do + echo "$NAME $DEP" + done + + for DEP in $depends; do dependencies_recursive "$DEP" "$PKGDIR" - done < "$SCRIPTDIR/$PKGDIR/$NAME/depends" + done fi } diff --git a/util/download.sh b/util/download.sh index f687515..408e26c 100755 --- a/util/download.sh +++ b/util/download.sh @@ -4,7 +4,7 @@ fetch_package() { echo "$NAME" unset -f build deploy prepare - unset -v VERSION TARBALL URL SRCDIR SHA256SUM + unset -v VERSION TARBALL URL SRCDIR SHA256SUM DEPENDS source "$SCRIPTDIR/$PKGDIR/$NAME/build" if [ -z "$TARBALL" ]; then diff --git a/util/pkgcmd.sh b/util/pkgcmd.sh index 75b633a..6ea3ecf 100644 --- a/util/pkgcmd.sh +++ b/util/pkgcmd.sh @@ -13,7 +13,7 @@ run_pkg_command_common() { fi unset -f build deploy prepare - unset -v VERSION TARBALL URL SRCDIR SHA256SUM + unset -v VERSION TARBALL URL SRCDIR SHA256SUM DEPENDS source "$SCRIPTDIR/$PKGDIR/$NAME/build" local LOGFILE="$PKGLOGDIR/${7}-${FUNCTION}.log" diff --git a/util/toolchain.sh b/util/toolchain.sh index 8000ce8..5e63f64 100644 --- a/util/toolchain.sh +++ b/util/toolchain.sh @@ -14,15 +14,17 @@ restore_toolchain() { } install_build_deps() { - local pkg="$1" + local NAME="$1" - if [ ! -e "$SCRIPTDIR/pkg/$pkg/depends" ]; then + unset -f build deploy prepare + unset -v VERSION TARBALL URL SRCDIR SHA256SUM DEPENDS + source "$SCRIPTDIR/pkg/$NAME/build" + + if [ -z "$DEPENDS" ]; then return fi - dependencies "$pkg" "pkg" | grep -v "$pkg" > "$BUILDROOT/$CFG/deppkg" - - while read deppkg; do + for deppkg in $DEPENDS; do local devdir="$PKGDEPLOYDIR/${deppkg}-dev" if [ -d "$devdir/include" ]; then @@ -31,5 +33,5 @@ install_build_deps() { if [ -d "$devdir/lib" ]; then cp -R "$devdir/lib" "$TCDIR/$TARGET" fi - done < "$BUILDROOT/$CFG/deppkg" + done }