|
|
|
@ -0,0 +1,46 @@
|
|
|
|
|
# Copyright 1999-2022 Gentoo Authors
|
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
|
|
# Поддержка работы сайтов с российскими сертификатами
|
|
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION="Установка корневого сертификата для работы сайтов с российскими сертификатами"
|
|
|
|
|
HOMEPAGE="https://www.gosuslugi.ru/crt"
|
|
|
|
|
|
|
|
|
|
SRC_URI="https://gu-st.ru/content/Other/doc/russiantrustedca.pem -> ${P}.crt"
|
|
|
|
|
|
|
|
|
|
LICENSE=""
|
|
|
|
|
SLOT="0"
|
|
|
|
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
|
|
|
|
IUSE=""
|
|
|
|
|
|
|
|
|
|
RESTRICT="bindist mirror strip"
|
|
|
|
|
|
|
|
|
|
S="${WORKDIR}"
|
|
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
|
mkdir -p usr/local/share/ca-certificates/ || die
|
|
|
|
|
cp ${DISTDIR}/${A} usr/local/share/ca-certificates/ || die
|
|
|
|
|
default
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
|
mv * "${D}" || die
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
|
if [[ -d "/usr/local/share/ca-certificates" ]] ; then
|
|
|
|
|
# If the user has local certs, we need to rebuild again
|
|
|
|
|
# to include their stuff in the db.
|
|
|
|
|
# However it's too overzealous when the user has custom certs in place.
|
|
|
|
|
# --fresh is to clean up dangling symlinks
|
|
|
|
|
/usr/sbin/update-ca-certificates
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ -n "$(find -L /etc/ssl/certs/ -type l)" ]] ; then
|
|
|
|
|
ewarn "Removing the following broken symlinks:"
|
|
|
|
|
ewarn "$(find -L /etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)"
|
|
|
|
|
fi
|
|
|
|
|
}
|