Fork me on GitHub

Installing strongnamed assemblies into GAC

Gentoo Mono Handbook
How to make signed assembly?
InternalsVisibleTo
$DPath to the temporary install directory. For example: "${PORTAGE_BUILDDIR}/image"
pkg_preinst
egacinstall is from gac.eclass

see also .pc-files and pkg-config

Latest approach

src_install() {
	insinto "/gac"
	doins "$(output_filename)"
}

pkg_preinst()
{
	echo mv "${D}/gac/${ASSEMBLY_NAME}.dll" "${T}/${ASSEMBLY_NAME}.dll"
	mv "${D}/gac/${ASSEMBLY_NAME}.dll" "${T}/${ASSEMBLY_NAME}.dll" || die
	echo rm -rf "${D}/gac"
	rm -rf "${D}/gac" || die
}

pkg_postinst()
{
	egacadd "${T}/${ASSEMBLY_NAME}.dll"
	rm "${T}/${ASSEMBLY_NAME}.dll" || die
}

pkg_prerm()
{
	egacdel "${ASSEMBLY_NAME}, Version=2.1.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
}