mirror of
https://abf.rosa.ru/djam/chromium-browser-stable-test.git
synced 2025-02-24 10:02:47 +00:00

Thanks to ALT Linux team for the initial idea how to build it without proprietary libcapi libraries from CryptoPro.
30 lines
999 B
Text
30 lines
999 B
Text
# Put https://github.com/deemru/chromium-gost with msspi submodule to %{_gostsourcedir}
|
|
# Run this as:
|
|
# make -C Makefile.gost SDIR=%{_gostsourcedir} CC=%{__cc} CXX=%{__cxx} CFLAGS=%{optflags}
|
|
# Idea how to build this originates from ALT Linux
|
|
|
|
SDIR ?= chromium-gost
|
|
OUTDIR ?= .
|
|
TMPDIR ?= $(shell mktemp -d)
|
|
CC ?= gcc
|
|
CXX ?= g++
|
|
CRYPTOPRO_MAJOR_VERSION ?= 4
|
|
CFLAGS ?= -O2 -g
|
|
GOSTCFLAGS ?=
|
|
|
|
make:
|
|
cd $(TMPDIR) ; \
|
|
ar r empty.a ; \
|
|
$(CC) -shared empty.a -Wl,-soname=libcapi20.so.$(CRYPTOPRO_MAJOR_VERSION) -o libcapi20.so ; \
|
|
$(CC) -shared empty.a -Wl,-soname=libcapi10.so.$(CRYPTOPRO_MAJOR_VERSION) -o libcapi10.so
|
|
|
|
$(CXX) $(CFLAGS) $(GOSTCFLAGS) \
|
|
-Wall -Wl,--no-as-needed -std=c++11 -fPIC -shared -s -Werror -Wno-unused-function -ldl \
|
|
$(SDIR)/src/gostssl.cpp \
|
|
$(SDIR)/src/msspi/src/msspi.cpp \
|
|
-I $(SDIR)/src/msspi/src \
|
|
-I $(SDIR)/src/msspi/third_party/cprocsp/include \
|
|
-I third_party/boringssl/src/include \
|
|
-lcapi10 -lcapi20 \
|
|
-L$(TMPDIR) \
|
|
-o $(OUTDIR)/libgostssl.so
|