2022-10-24 19:37:43 +05:30
|
|
|
OPENSSL_VERSION = 3.0.6
|
2022-06-07 16:30:30 +05:30
|
|
|
BUILD_VERSION_REPOSHA = $(shell git rev-parse --short HEAD)
|
2022-06-09 17:29:28 +05:30
|
|
|
QUICTLS_BUILD_VERSION = quic-mangadex-$(BUILD_VERSION_REPOSHA)
|
2022-06-07 16:30:30 +05:30
|
|
|
|
2022-06-09 17:29:28 +05:30
|
|
|
QUICTLS_SOURCES = https://codeload.github.com/quictls/openssl/tar.gz/openssl-$(OPENSSL_VERSION)+quic
|
2022-06-07 16:30:30 +05:30
|
|
|
QUICTLS_TARBALL = quictls-$(OPENSSL_VERSION).tar.gz
|
2022-06-06 11:22:47 +05:30
|
|
|
QUICTLS_BUILDIR = src
|
2022-06-06 10:16:20 +05:30
|
|
|
QUICTLS_DESTDIR = dist
|
|
|
|
QUICTLS_DESTDIR_ABS = $(shell realpath $(QUICTLS_DESTDIR))
|
2022-06-06 13:21:31 +05:30
|
|
|
QUICTLS_ARCHIVE = quictls-dist.tar.gz
|
2022-06-06 10:16:20 +05:30
|
|
|
|
2022-06-07 08:36:13 +05:30
|
|
|
all: build $(QUICTLS_DESTDIR) $(QUICTLS_ARCHIVE)
|
2022-06-06 10:16:20 +05:30
|
|
|
|
2022-06-07 08:36:13 +05:30
|
|
|
$(QUICTLS_TARBALL):
|
|
|
|
curl -sfS -o "$(QUICTLS_TARBALL)" "$(QUICTLS_SOURCES)"
|
2022-06-06 10:16:20 +05:30
|
|
|
|
2022-06-07 08:36:13 +05:30
|
|
|
$(QUICTLS_BUILDIR): $(QUICTLS_TARBALL)
|
|
|
|
@if ! [ -d "$(QUICTLS_BUILDIR)" ]; then mkdir -v "$(QUICTLS_BUILDIR)"; fi
|
2022-06-06 11:22:47 +05:30
|
|
|
tar -C $(QUICTLS_BUILDIR) --strip-components=1 -xf "$(QUICTLS_TARBALL)"
|
2022-06-07 08:36:13 +05:30
|
|
|
|
|
|
|
build: $(QUICTLS_BUILDIR)
|
2022-06-23 18:53:25 +05:30
|
|
|
cd "$(QUICTLS_BUILDIR)" && ! [ -f "VERSION.dat.orig" ] && mv -fv "VERSION.dat" "VERSION.dat.orig" || true
|
|
|
|
cd "$(QUICTLS_BUILDIR)" && sed 's/^BUILD_METADATA.*/BUILD_METADATA=$(QUICTLS_BUILD_VERSION)/g' "VERSION.dat.orig" > "VERSION.dat.meta"
|
|
|
|
cd "$(QUICTLS_BUILDIR)" && sed 's/^RELEASE_DATE.*/RELEASE_DATE="$(shell date -u +'%e %b %Y')"/g' "VERSION.dat.meta" > "VERSION.dat"
|
2022-08-03 14:35:20 +05:30
|
|
|
cd "$(QUICTLS_BUILDIR)" && CC=cc ./Configure --prefix="/opt/quictls" --openssldir="/opt/quictls" --libdir="lib" -DPURIFY no-shared
|
2022-06-14 09:16:37 +05:30
|
|
|
$(MAKE) -C "$(QUICTLS_BUILDIR)" -j "$(shell nproc)" VERSION=$(OPENSSL_VERSION)+quic-mangadex-$(BUILD_VERSION_REPOSHA) build_sw
|
2022-06-06 11:22:47 +05:30
|
|
|
"$(QUICTLS_BUILDIR)/apps/openssl" version
|
2022-06-23 18:53:25 +05:30
|
|
|
$(MAKE) buildinfo_$(shell uname -s)
|
|
|
|
|
|
|
|
.PHONY: buildinfo_Linux
|
|
|
|
buildinfo_Linux:
|
|
|
|
@echo "Checking shared libraries openssl is linked against (Linux):"
|
|
|
|
@ldd "$(QUICTLS_BUILDIR)/apps/openssl" || true
|
|
|
|
|
|
|
|
.PHONY: buildinfo_Darwin
|
|
|
|
buildinfo_Darwin:
|
|
|
|
@echo "Checking shared libraries openssl is linked against (Darwin):"
|
|
|
|
@otool -L "$(QUICTLS_BUILDIR)/apps/openssl" || true
|
2022-06-06 10:16:20 +05:30
|
|
|
|
2022-06-06 11:22:47 +05:30
|
|
|
$(QUICTLS_DESTDIR): build
|
2022-06-23 18:53:25 +05:30
|
|
|
@if ! [ -d "$(QUICTLS_DESTDIR)" ]; then mkdir -v "$(QUICTLS_DESTDIR)"; fi
|
2022-06-06 11:22:47 +05:30
|
|
|
$(MAKE) -C "$(QUICTLS_BUILDIR)" -j "$(shell nproc)" DESTDIR="$(QUICTLS_DESTDIR_ABS)" install_sw
|
2022-08-03 14:35:20 +05:30
|
|
|
$(QUICTLS_DESTDIR_ABS)/opt/quictls/bin/openssl version
|
2022-06-06 10:16:20 +05:30
|
|
|
|
2022-06-06 11:22:47 +05:30
|
|
|
$(QUICTLS_ARCHIVE): $(QUICTLS_DESTDIR)
|
2022-06-06 10:16:20 +05:30
|
|
|
tar -C "$(QUICTLS_DESTDIR)" -cjf "$(QUICTLS_ARCHIVE)" "opt"
|
|
|
|
|
|
|
|
clean:
|
2022-06-07 08:36:13 +05:30
|
|
|
rm -fv "$(QUICTLS_TARBALL)"
|
2022-06-06 11:22:47 +05:30
|
|
|
rm -rf "$(QUICTLS_BUILDIR)"
|
|
|
|
rm -rf "$(QUICTLS_DESTDIR)"
|
|
|
|
rm -fv "$(QUICTLS_ARCHIVE)"
|
2022-06-06 10:16:20 +05:30
|
|
|
|
2022-06-06 11:22:47 +05:30
|
|
|
.PHONY: clean build
|