# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 # debug = debug configuration (symbols and defines for debugging) # developer = generate symbols information (to view line numbers in stack traces, either in debug or release configuration) # test = allow NUnit tests to run # nupkg = create .nupkg file from .nuspec # gac = install into gac # pkg-config = register in pkg-config database USE_DOTNET="net45" IUSE="${USE_DOTNET} debug developer test +pkg-config" inherit gac machine nupkg versionator NAME="npgsql" NUSPEC_ID="${NAME}" HOMEPAGE="https://github.com/npgsql/${NAME}" EGIT_COMMIT="a7e147759c3756b6d22f07f5602aacd21f93d48d" SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz nupkg? ( https://www.npgsql.org/css/img/postgresql-header.png ) gac? ( mirror://gentoo/mono.snk.bz2 )" RESTRICT="mirror" S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" SLOT="0" DESCRIPTION="allows any program developed for .NET framework to access a PostgreSQL database" LICENSE="npgsql" LICENSE_URL="https://github.com/npgsql/npgsql/blob/develop/LICENSE.txt" KEYWORDS="~amd64" COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 EOF ` sed -i 's/<\/package>/'"${FILES_STRING//$'\n'/\\$'\n'}"'\n&/g' $1 || die "escaping line endings" fi } pkg_postinst() { egacadd "${PREFIX}/usr/lib/mono/${EBUILD_FRAMEWORK}/Npgsql.dll" emachineadd "Npgsql" "Npgsql Data Provider" "${PREFIX}/usr/lib/mono/${EBUILD_FRAMEWORK}/Npgsql.dll" } pkg_prerm() { egacdel "Npgsql" emachinedel "Npgsql" "Npgsql Data Provider" "${PREFIX}/usr/lib/mono/${EBUILD_FRAMEWORK}/Npgsql.dll" }