commit: 8e7c529c0919d9011d11883ce03b28eb27b2198e
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Wed Jul 27 04:50:52 2016 +0000
Commit: Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Wed Jul 27 04:50:52 2016 +0000
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=8e7c529c
gac and nupkg installation added
.../libgit2sharp/files/nuspec-file-list.patch | 13 +++++
dev-dotnet/libgit2sharp/libgit2sharp-0.22.ebuild | 61 ++++++++++++++++++++--
2 files changed, 70 insertions(+), 4 deletions(-)
diff --git a/dev-dotnet/libgit2sharp/files/nuspec-file-list.patch
b/dev-dotnet/libgit2sharp/files/nuspec-file-list.patch
new file mode 100644
index 0000000..8623a2b
--- /dev/null
+++ b/dev-dotnet/libgit2sharp/files/nuspec-file-list.patch
@@ -0,0 +1,13 @@
+--- a/nuget.package/LibGit2Sharp.nuspec 2016-03-04 19:26:33.000000000
+0300
++++ b/nuget.package.new/LibGit2Sharp.nuspec 2016-07-27 07:25:06.091068466
+0300
+@@ -14,9 +14,6 @@
+ <tags>libgit2 git wrapper bindings API dvcs vcs</tags>
+ </metadata>
+ <files>
+- <file src="..\README.md" target="App_Readme\LibGit2Sharp.README.md" />
+- <file src="..\LICENSE.md" target="App_Readme\LibGit2Sharp.LICENSE.md" />
+- <file src="..\CHANGES.md" target="App_Readme\LibGit2Sharp.CHANGES.md" />
+- <file src="bin\$configuration$\$id$.pdb" target="lib\net40" />
++ <file src="LibGit2Sharp/bin/$configuration$/$id$.dll" target="lib/net40"
/>
+ </files>
+ </package>
diff --git a/dev-dotnet/libgit2sharp/libgit2sharp-0.22.ebuild
b/dev-dotnet/libgit2sharp/libgit2sharp-0.22.ebuild
index f2c69b7..8e9c5e9 100644
--- a/dev-dotnet/libgit2sharp/libgit2sharp-0.22.ebuild
+++ b/dev-dotnet/libgit2sharp/libgit2sharp-0.22.ebuild
@@ -5,7 +5,8 @@
EAPI=6
USE_DOTNET="net45"
-IUSE="${USE_DOTNET}"
+EBUILD_FRAMEWORK="4.5"
+IUSE="${USE_DOTNET} +gac +nupkg"
inherit nuget nupkg
@@ -15,7 +16,8 @@ DESCRIPTION="A C# PInvoke wrapper library for LibGit2 C
library"
EGIT_COMMIT="8daef23223e1374141bf496e4b310ded9ae4639e"
HOMEPAGE="https://github.com/libgit2/libgit2sharp"
-SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
+ mirror://gentoo/mono.snk.bz2"
#RESTRICT="mirror"
S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
@@ -32,6 +34,12 @@ DEPEND="${CDEPEND}
"
RDEPEND="${CDEPEND}"
+prefix=${PREFIX}/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib/mono/${EBUILD_FRAMEWORK}
+
+NUSPEC_FILE="nuget.package/LibGit2Sharp.nuspec"
+
src_unpack() {
default
# remove rogue binaries
@@ -44,8 +52,19 @@ src_prepare() {
eapply "${FILESDIR}/csproj-remove-nuget-targets-check.patch"
eapply "${FILESDIR}/packages-config-remove-xunit.patch"
eapply "${FILESDIR}/remove-NativeBinaries-package-dependency.patch"
+ eapply "${FILESDIR}/nuspec-file-list.patch"
echo "/usr/lib64/libgit2.so" >"LibGit2Sharp/libgit2_filename.txt" || die
enuget_restore "LibGit2Sharp.sln"
+ sed -i 's=\$id\$=LibGit2Sharp=g' "${NUSPEC_FILE}" || die
+ sed -i "s=\\\$version\\\$=$(get_version_component_range 1-2)=g"
"${NUSPEC_FILE}" || die
+ sed -i 's=\$author\$=nulltoken=g' "${NUSPEC_FILE}" || die
+ sed -i "s=\\\$description\\\$=${DESCRIPTION}=g" "${NUSPEC_FILE}" || die
+ if use debug; then
+ DIR="Debug"
+ else
+ DIR="Release"
+ fi
+ sed -i "s=\\\$configuration\\\$=${DIR}=g" "${NUSPEC_FILE}" || die
default
}
@@ -54,6 +73,40 @@ src_compile() {
sed -i "s#<OutputPath>.*</OutputPath>#<OutputPath>.</OutputPath>#g"
"Lib/CustomBuildTasks/CustomBuildTasks.csproj" || die
exbuild "Lib/CustomBuildTasks/CustomBuildTasks.csproj"
- # main compileation
- exbuild "LibGit2Sharp.sln"
+ # main compilation
+ exbuild_strong "LibGit2Sharp.sln"
+
+ enuspec "${NUSPEC_FILE}"
+}
+
+src_install() {
+ insinto "${libdir}"
+ if use debug; then
+ DIR="Debug"
+ else
+ DIR="Release"
+ fi
+ doins "LibGit2Sharp/bin/${DIR}/LibGit2Sharp.dll"
+
+ enupkg "${WORKDIR}/LibGit2Sharp.0.22.nupkg"
+}
+
+pkg_postinst() {
+ if use gac; then
+ einfo "adding to GAC"
+ gacutil -i "${libdir}/LibGit2Sharp.dll" || die
+ fi
+
+ # cd "${WORKDIR}
+ # nuget push -source "Local NuGet packages" LibGit2Sharp.0.22.nupkg
+}
+
+pkg_postrm() {
+ if use gac; then
+ einfo "removing from GAC"
+ gacutil -u LibGit2Sharp
+ # don't die, it there is no such assembly in GAC
+ fi
+
+ # yes | nuget delete -source "Local NuGet packages" LibGit2Sharp 0.22
}