Blame vars/ca_certificates.vars

Lucio Andrés Illanes Albornoz (arab, vxp) 258e93
#
Lucio Andrés Illanes Albornoz e1d469
# set +o errexit -o noglob -o nounset is assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 258e93
#
Lucio Andrés Illanes Albornoz (arab, vxp) 258e93
Lucio Andrés Illanes Albornoz (arab, vxp) 258e93
pkg_ca_certificates_install_make_pre() {
Lucio Andrés Illanes Albornoz bf9edf
	"${PKG_DESTDIR}/../ca-certificates/certdata2pem_host";
Lucio Andrés Illanes Albornoz 5f3737
	tar -C "${BUILD_WORKDIR}/ca_certificates_host-host-${PKG_TARGET}/destdir" -cpf - . | tar -C "${PKG_DESTDIR}" -xpf -;
Lucio Andrés Illanes Albornoz (arab, vxp) 258e93
};
Lucio Andrés Illanes Albornoz (arab, vxp) 258e93
Lucio Andrés Illanes Albornoz (arab, vxp) 6b39c9
pkg_ca_certificates_install_make_post() {
Lucio Andrés Illanes Albornoz (arab, vxp) 6b39c9
	set +o noglob
Lucio Andrés Illanes Albornoz bf9edf
	if ! rtl_fileop cd "${PKG_DESTDIR}/share/ca-certificates"\
Lucio Andrés Illanes Albornoz bf9edf
	|| ! find . -name '*.crt' | sort | cut -b3- > ${PKG_DESTDIR}/etc/ca-certificates.conf; then
Lucio Andrés Illanes Albornoz bf9edf
		set -o noglob; return 1;
Lucio Andrés Illanes Albornoz bf9edf
	fi;
Lucio Andrés Illanes Albornoz bf9edf
	set -o noglob;
Lucio Andrés Illanes Albornoz (arab, vxp) 6b39c9
};
Lucio Andrés Illanes Albornoz (arab, vxp) 6b39c9
Lucio Andrés Illanes Albornoz 5f3737
pkg_ca_certificates_host_configure_patch_post() {
Lucio Andrés Illanes Albornoz 5f3737
	local _vname="" _vspec="" _vval="";
Lucio Andrés Illanes Albornoz 5f3737
	for _vspec in	\
Lucio Andrés Illanes Albornoz 5f3737
			CERTSCONF:/etc/ca-certificates.conf			\
d1545e
			ETCCERTSDIR:/etc/ssl/certs/; do
Lucio Andrés Illanes Albornoz 5f3737
		set -- $(rtl_llift "${_vspec}" : " "); _vname="${1}"; _vval="${2}";
Lucio Andrés Illanes Albornoz 5f3737
		sed -i"" -e's,^#define '"${_vname}"' ".\+"$,#define '"${_vname}"' "'"${PKG_DESTDIR%/}${_vval}"'",' update-ca.c;
Lucio Andrés Illanes Albornoz 5f3737
	done;
Lucio Andrés Illanes Albornoz 5f3737
	sed -i"" -e's,^#define CERTSDIR ".\+"$,#define CERTSDIR "../../../usr/share/ca-certificates/",' update-ca.c;
Lucio Andrés Illanes Albornoz 5f3737
	sed -i"" -e's,^#define LOCALCERTSDIR ".\+"$,#define LOCALCERTSDIR "../../../usr/local/share/ca-certificates/",' update-ca.c;
Lucio Andrés Illanes Albornoz 5f3737
};
Lucio Andrés Illanes Albornoz 5f3737
Lucio Andrés Illanes Albornoz 5f3737
pkg_ca_certificates_host_install_make_pre() {
Lucio Andrés Illanes Albornoz 5f3737
	pkg_ca_certificates_install_make_pre "${@}";
Lucio Andrés Illanes Albornoz 5f3737
};
Lucio Andrés Illanes Albornoz 5f3737
Lucio Andrés Illanes Albornoz 5f3737
pkg_ca_certificates_host_install_make_post() {
Lucio Andrés Illanes Albornoz 5f3737
	pkg_ca_certificates_install_make_post "${@}";
Lucio Andrés Illanes Albornoz 5f3737
	env LD_LIBRARY_PATH="${PKG_PREFIX}/lib" "${PKG_DESTDIR}/sbin/update-ca-certificates";
Lucio Andrés Illanes Albornoz 5f3737
	set +o noglob; rtl_fileop rm "${PKG_DESTDIR}/bin"/* "${PKG_DESTDIR}/sbin"/*; set -o noglob;
Lucio Andrés Illanes Albornoz 5f3737
};
Lucio Andrés Illanes Albornoz 5f3737
Lucio Andrés Illanes Albornoz bf9edf
# vim:filetype=sh textwidth=0