summaryrefslogtreecommitdiff
path: root/sub/dev/Makefile.libressl
blob: 3c10d792a4fdbac5d8603aab7e5943f134a5a60d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
LIBRESSL_VERSION ?= 3.7.0
LIBRESSL_MAKE_STATIC := $(if $(filter true,$(TARGET_STATIC)),LDFLAGS="-s -all-static",LDFLAGS=-s)

clean-libressl:
	rm -f $(OUTPUT)/build-$(TRIPLE)/.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-$(TRIPLE)/.lh_libressl_dled: $(OUTPUT)/sources/libressl-$(LIBRESSL_VERSION).tar.gz | $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) s6-touch $@

$(OUTPUT)/build-$(TRIPLE)/.lh_libressl_copied: $(OUTPUT)/build-$(TRIPLE)/.lh_libressl_dled | $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-$(TRIPLE)/libressl-$(LIBRESSL_VERSION)
	exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-$(TRIPLE) tar -zxpvf $(OUTPUT)/sources/libressl-$(LIBRESSL_VERSION).tar.gz
	exec setuidgid $(NORMALUSER) s6-touch $@

$(OUTPUT)/build-$(TRIPLE)/.lh_libressl_configured: $(OUTPUT)/build-$(TRIPLE)/.lh_libressl_copied | $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-$(TRIPLE)/libressl-$(LIBRESSL_VERSION) export CC "$(TARGET_CC)" ./configure --host=$(TRIPLE) --prefix=/opt/libressl-$(LIBRESSL_VERSION) --disable-tests
	exec setuidgid $(NORMALUSER) s6-touch $@

$(OUTPUT)/build-$(TRIPLE)/.lh_libressl_built: $(OUTPUT)/build-$(TRIPLE)/.lh_libressl_configured | $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-$(TRIPLE)/libressl-$(LIBRESSL_VERSION) $(MAKE) $(LIBRESSL_MAKE_STATIC)
	exec setuidgid $(NORMALUSER) s6-touch $@
	
$(OUTPUT)/build-$(TRIPLE)/.lh_libressl_installed: $(OUTPUT)/build-$(TRIPLE)/.lh_libressl_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed $(OUTPUT)/tmp/.lh_layout_installed
	exec cd $(OUTPUT)/build-$(TRIPLE)/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 $@