diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-02-03 00:55:01 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-02-03 00:55:01 +0000 |
commit | a7539ab03fbca4da69c4d651016ff1c8013b9223 (patch) | |
tree | 813cbcd3263de8a4302493470372a0fb9cbf25ce | |
parent | 944ab4d12c9a4327ed9db93504c2746169c5a335 (diff) | |
download | lh-bootstrap-a7539ab03fbca4da69c4d651016ff1c8013b9223.tar.xz |
Add git to sub/dev, first draft
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | sub/dev/Makefile.curl | 85 | ||||
-rw-r--r-- | sub/dev/Makefile.git | 62 | ||||
-rw-r--r-- | sub/dev/Makefile.libressl | 32 | ||||
-rw-r--r-- | sub/dev/Makefile.zlib | 30 |
5 files changed, 214 insertions, 1 deletions
@@ -33,7 +33,11 @@ images: $(OUTPUT)/tmp/.lh_diskimages_done ifeq ($(LH_DEV),true) include sub/dev/Makefile.strace include sub/dev/Makefile.make -LH_DEV_TARGETS := $(OUTPUT)/build-host/.lh_strace_installed $(OUTPUT)/build-host/.lh_make_installed +include sub/dev/Makefile.zlib +include sub/dev/Makefile.libressl +include sub/dev/Makefile.curl +include sub/dev/Makefile.git +LH_DEV_TARGETS := $(OUTPUT)/build-host/.lh_strace_installed $(OUTPUT)/build-host/.lh_make_installed $(OUTPUT)/build-host/.lh_zlib_installed $(OUTPUT)/build-host/.lh_libressl_installed $(OUTPUT)/build-host/.lh_curl_installed $(OUTPUT)/build-host/.lh_git_installed else LH_DEV_TARGETS := endif diff --git a/sub/dev/Makefile.curl b/sub/dev/Makefile.curl new file mode 100644 index 0000000..05d43fd --- /dev/null +++ b/sub/dev/Makefile.curl @@ -0,0 +1,85 @@ + +CURL_VERSION ?= 7.74.0 +CURL_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),-all-static,) + +CURL_CONF_ARGS := \ + --enable-optimize \ + --enable-warnings \ + --disable-curldebug \ + --disable-ares \ + --enable-http \ + --enable-ftp \ + --enable-file \ + --disable-ldap \ + --disable-ldaps \ + --disable-rtsp \ + --enable-proxy \ + --disable-dict \ + --enable-telnet \ + --enable-tftp \ + --disable-pop3 \ + --disable-imap \ + --disable-smb \ + --disable-smtp \ + --disable-gopher \ + --disable-manual \ + --enable-libcurl-option \ + --enable-ipv6 \ + --enable-threaded-resolver \ + --disable-sspi \ + --disable-crypto-auth \ + --disable-ntlm-wb \ + --disable-tls-srp \ + --enable-unix-sockets \ + --enable-cookies \ + --disable-soname-bump \ + --with-zlib=$(OUTPUT)/rootfs/opt/zlib \ + --with-ssl=$(OUTPUT)/rootfs/opt/libressl \ + --without-openssl \ + --without-winssl \ + --without-darwinssl \ + --without-gnutls \ + --without-polarssl \ + --without-cyassl \ + --without-nss \ + --without-libpsl \ + --without-axtls \ + --without-libmetalink \ + --with-ca-bundle=/opt/libressl/etc/ssl/cert.pem \ + --without-ca-fallback \ + --without-libssh2 \ + --without-librtmp \ + --without-winidn \ + --without-libidn \ + --without-nghttp2 + +CURL_MAKE_ARGS := CFLAGS="-O2 -I$(OUTPUT)/rootfs/opt/zlib/include -I$(OUTPUT)/rootfs/opt/libressl/include" LDFLAGS="-L$(OUTPUT)/rootfs/opt/zlib/lib -L$(OUTPUT)/rootfs/opt/libressl/lib $(CURL_STATIC)" + +clean-curl: + rm -f $(OUTPUT)/build-host/.lh_curl_* + + +$(OUTPUT)/sources/curl-$(MAKE_VERSION).tar.xz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget https://curl.se/download/curl-7.74.0.tar.xz + +$(OUTPUT)/build-host/.lh_curl_dled: $(OUTPUT)/sources/curl-$(CURL_VERSION).tar.xz | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_curl_copied: $(OUTPUT)/build-host/.lh_curl_dled | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/curl-$(CURL_VERSION) + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -Jxpvf $(OUTPUT)/sources/curl-$(CURL_VERSION).tar.xz + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_curl_configured: $(OUTPUT)/build-host/.lh_curl_copied $(OUTPUT)/build-host/.lh_libressl_installed $(OUTPUT)/build-host/.lh_zlib_installed | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/curl-$(CURL_VERSION) export CC "$(BUILD_HOST_CC)" ./configure --host=$(TRIPLE) --prefix=/opt/curl-$(CURL_VERSION) $(CURL_CONF_ARGS) + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_curl_built: $(OUTPUT)/build-host/.lh_curl_configured | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/curl-$(CURL_VERSION) $(MAKE) $(CURL_MAKE_ARGS) + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_curl_installed: $(OUTPUT)/build-host/.lh_curl_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec cd $(OUTPUT)/build-host/curl-$(CURL_VERSION) $(MAKE) install DESTDIR=$(OUTPUT)/rootfs + exec makenamelink $(OUTPUT)/rootfs/opt curl curl-$(CURL_VERSION) $(OUTPUT)/tmp + exec makelinks $(OUTPUT)/rootfs /bin /opt/curl/bin + exec setuidgid $(NORMALUSER) s6-touch $@ diff --git a/sub/dev/Makefile.git b/sub/dev/Makefile.git new file mode 100644 index 0000000..5a6295d --- /dev/null +++ b/sub/dev/Makefile.git @@ -0,0 +1,62 @@ + +GIT_VERSION ?= 2.30.0 +GIT_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),-static,) + +GIT_MAKE_ARGS := \ + prefix=/opt/git \ + V=1 \ + CC="$(BUILD_HOST_CC)" \ + CFLAGS="-O2 -Wall -Wextra -I$(OUTPUT)/rootfs/opt/zlib/include -I$(OUTPUT)/rootfs/opt/libressl/include" \ + LDFLAGS="-L$(OUTPUT)/rootfs/opt/zlib/lib -L$(OUTPUT)/rootfs/opt/libressl/lib $(GIT_STATIC)" \ + NO_PERL=YesPlease \ + CURLDIR=$(OUTPUT)/rootfs/opt/curl \ + CURL_LDFLAGS="-L$(OUTPUT)/rootfs/opt/curl/lib -lcurl -lssl -lcrypto -lz" \ + NO_R_TO_GCC_LINKER=YesPlease \ + NO_REGEX=NeedsStartEnd \ + NO_EXPAT=YesPlease \ + NO_TCLTK=YesPlease \ + NO_GETTEXT=YesPlease \ + NO_SVN_TESTS=YesPlease \ + BLK_SHA1=YesPlease \ + NO_ICONV=YesPlease \ + NO_PYTHON=YesPlease \ + NO_INSTALL_HARDLINKS=YesPlease \ + NO_SYS_POLL_H=YesPlease \ + HAVE_DEV_TTY=YesPlease \ + USE_NSEC=1 \ + LIBC_CONTAINS_LIBINTL=1 \ + HAVE_ALLOCA_H=1 \ + HAVE_CLOCK_GETTIME=1 \ + HAVE_CLOCK_MONOTONIC=1 \ + NEEDS_SSL_WITH_CURL=YesPlease \ + NEEDS_CRYPTO_WITH_SSL=YesPlease + + +clean-git: + rm -f $(OUTPUT)/build-host/.lh_git_* + + +$(OUTPUT)/sources/git-$(GIT_VERSION).tar.gz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget https://www.kernel.org/pub/software/scm/git/git-$(GIT_VERSION).tar.gz + +$(OUTPUT)/build-host/.lh_git_dled: $(OUTPUT)/sources/git-$(GIT_VERSION).tar.gz | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_git_copied: $(OUTPUT)/build-host/.lh_git_dled | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/git-$(GIT_VERSION) + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -zxpvf $(OUTPUT)/sources/git-$(GIT_VERSION).tar.gz + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_make_configured: $(OUTPUT)/build-host/.lh_make_copied | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/make-$(MAKE_VERSION) export CC "$(BUILD_HOST_CC)" ./configure --host=$(TRIPLE) --prefix=/opt/make-$(MAKE_VERSION) --disable-nls --disable-rpath + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_git_built: $(OUTPUT)/build-host/.lh_git_copied $(OUTPUT)/build-host/.lh_libressl_installed $(OUTPUT)/build-host/.lh_curl_installed $(OUTPUT)/build-host/.lh_zlib_installed | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/git-$(GIT_VERSION) $(MAKE) $(GIT_MAKE_ARGS) + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_git_installed: $(OUTPUT)/build-host/.lh_git_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec cd $(OUTPUT)/build-host/git-$(GIT_VERSION) $(MAKE) install DESTDIR=$(OUTPUT)/rootfs prefix=/opt/git-$(GIT_VERSION) + exec makenamelink $(OUTPUT)/rootfs/opt git git-$(GIT_VERSION) $(OUTPUT)/tmp + exec makelinks $(OUTPUT)/rootfs /bin /opt/git/bin + exec setuidgid $(NORMALUSER) s6-touch $@ diff --git a/sub/dev/Makefile.libressl b/sub/dev/Makefile.libressl new file mode 100644 index 0000000..afdc671 --- /dev/null +++ b/sub/dev/Makefile.libressl @@ -0,0 +1,32 @@ + +LIBRESSL_VERSION ?= 3.2.3 +LIBRESSL_MAKE_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),LDFLAGS="-s -static",LDFLAGS=-s) + +clean-libressl: + rm -f $(OUTPUT)/build-host/.lh_libressl_* + + +$(OUTPUT)/sources/libressl-$(LIBRESSL_VERSION).tar.gz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-$(LIBRESSL_VERSION).tar.gz + +$(OUTPUT)/build-host/.lh_libressl_dled: $(OUTPUT)/sources/libressl-$(LIBRESSL_VERSION).tar.gz | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_libressl_copied: $(OUTPUT)/build-host/.lh_libressl_dled | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/libressl-$(LIBRESSL_VERSION) + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -zxpvf $(OUTPUT)/sources/libressl-$(LIBRESSL_VERSION).tar.gz + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_libressl_configured: $(OUTPUT)/build-host/.lh_libressl_copied | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/libressl-$(LIBRESSL_VERSION) export CC "$(BUILD_HOST_CC)" ./configure --host=$(TRIPLE) --prefix=/opt/libressl-$(LIBRESSL_VERSION) --disable-tests + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_libressl_built: $(OUTPUT)/build-host/.lh_libressl_configured | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/libressl-$(LIBRESSL_VERSION) $(MAKE) $(LIBRESSL_MAKE_STATIC) + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_libressl_installed: $(OUTPUT)/build-host/.lh_libressl_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec cd $(OUTPUT)/build-host/libressl-$(LIBRESSL_VERSION) $(MAKE) install DESTDIR=$(OUTPUT)/rootfs + exec makenamelink $(OUTPUT)/rootfs/opt libressl libressl-$(LIBRESSL_VERSION) $(OUTPUT)/tmp + exec makelinks $(OUTPUT)/rootfs /bin /opt/libressl/bin + exec setuidgid $(NORMALUSER) s6-touch $@ diff --git a/sub/dev/Makefile.zlib b/sub/dev/Makefile.zlib new file mode 100644 index 0000000..d677c55 --- /dev/null +++ b/sub/dev/Makefile.zlib @@ -0,0 +1,30 @@ + +ZLIB_VERSION ?= 1.2.11 + +clean-zlib: + rm -f $(OUTPUT)/build-host/.lh_zlib_* + + +$(OUTPUT)/sources/zlib-$(MAKE_VERSION).tar.gz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget https://zlib.net/zlib-$(ZLIB_VERSION).tar.xz + +$(OUTPUT)/build-host/.lh_zlib_dled: $(OUTPUT)/sources/zlib-$(ZLIB_VERSION).tar.xz | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_zlib_copied: $(OUTPUT)/build-host/.lh_zlib_dled | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/zlib-$(ZLIB_VERSION) + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -Jxpvf $(OUTPUT)/sources/zlib-$(ZLIB_VERSION).tar.gz + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_zlib_configured: $(OUTPUT)/build-host/.lh_zlib_copied | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/zlib-$(ZLIB_VERSION) export CC "$(BUILD_HOST_CC)" export CHOST "$(TRIPLE)" ./configure --prefix=/opt/zlib-$(ZLIB_VERSION) + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_zlib_built: $(OUTPUT)/build-host/.lh_zlib_configured | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/zlib-$(ZLIB_VERSION) $(MAKE) + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_zlib_installed: $(OUTPUT)/build-host/.lh_zlib_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec cd $(OUTPUT)/build-host/zlib-$(ZLIB_VERSION) $(MAKE) install DESTDIR=$(OUTPUT)/rootfs + exec makenamelink $(OUTPUT)/rootfs/opt zlib zlib-$(ZLIB_VERSION) $(OUTPUT)/tmp + exec setuidgid $(NORMALUSER) s6-touch $@ |