2023-02-09 18:31:08 +05:30
|
|
|
OPENSSL_VERSION = 1.1.1t
|
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)
|
2023-02-09 18:31:08 +05:30
|
|
|
QUICTLS_TAG = OpenSSL_$(subst .,_,$(OPENSSL_VERSION))-quic1
|
2022-06-07 16:30:30 +05:30
|
|
|
|
2022-11-04 18:51:37 +05:30
|
|
|
QUICTLS_SOURCES = https://codeload.github.com/quictls/openssl/tar.gz/$(QUICTLS_TAG)
|
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-11-04 18:51:37 +05:30
|
|
|
cd "$(QUICTLS_BUILDIR)" && sed -i 's/^# define OPENSSL_VERSION_TEXT.*$\/# define OPENSSL_VERSION_TEXT "OpenSSL $(OPENSSL_VERSION)+$(QUICTLS_BUILD_VERSION) $(shell date -u +'%e %b %Y')"/g' "include/openssl/opensslv.h"
|
|
|
|
cd "$(QUICTLS_BUILDIR)" && CC=cc ./config --prefix="/opt/quictls" --openssldir="/opt/quictls" --libdir="lib" no-shared
|
|
|
|
$(MAKE) -C "$(QUICTLS_BUILDIR)" -j "$(shell nproc)" VERSION=$(OPENSSL_VERSION)+quic-mangadex-$(BUILD_VERSION_REPOSHA)
|
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
|