diff options
author | ArsenShnurkov <Arsen.Shnurkov@gmail.com> | 2015-12-27 14:26:42 +0300 |
---|---|---|
committer | ArsenShnurkov <Arsen.Shnurkov@gmail.com> | 2015-12-27 14:26:42 +0300 |
commit | 09e634d4a86194144abc1e639ee02ccd04a57ab4 (patch) | |
tree | fe2091ad8fc5454c974ac124c01bd65db4983986 /eclass | |
parent | Merge pull request #150 from ArsenShnurkov/2710-another-resolution (diff) | |
download | dotnet-09e634d4a86194144abc1e639ee02ccd04a57ab4.tar.gz dotnet-09e634d4a86194144abc1e639ee02ccd04a57ab4.tar.bz2 dotnet-09e634d4a86194144abc1e639ee02ccd04a57ab4.zip |
draft ebuild for X.PagedList
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/nupkg.eclass | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/eclass/nupkg.eclass b/eclass/nupkg.eclass index 4142588..0ff0df9 100644 --- a/eclass/nupkg.eclass +++ b/eclass/nupkg.eclass @@ -16,6 +16,36 @@ enuget_restore() { nuget restore "$@" || die } +# @FUNCTION: enuget_download_rogue_binary +# @DESCRIPTION: downloads a binary package from 3rd untrusted party repository +# accepts Id of package as parameter +enuget_download_rogue_binary() { + if [ -d "/var/calculate/remote/distfiles" ]; then + NUGET_LOCAL_REPOSITORY_PATH=/var/calculate/remote/packages/NuGet + else + # this is for all normal gentoo-based distributions + NUGET_LOCAL_REPOSITORY_PATH=/usr/local/nuget/nupkg + fi + #einfo "Downloading rogue binary '$1' into '${NUGET_LOCAL_REPOSITORY_PATH}'" + # https://www.nuget.org/api/v2/package/{packageID}/{packageVersion} + + # this will give "* ACCESS DENIED: open_wr: /var/calculate/remote/packages/NuGet" message + # wget -c https://www.nuget.org/api/v2/package/$1/$2 -o "${LOCAL_NUGET_REPOSITORY_PATH}" + + einfo "Downloading rogue binary '$1' into '${T}/$1.$2.nupkg'" + wget -c https://www.nuget.org/api/v2/package/$1/$2 --directory-prefix="${T}/" --output-document="$1.$2.nupkg" || die + # -p ignores directory if it is already exists + mkdir -p "${T}/NuGet/" || die + echo <<\EOF >"${T}/NuGet/NuGet.Config" || die +<?xml version="1.0" encoding="utf-8" ?> +<configuration><config> +<add key="repositoryPath" value="${T}" /> +</config></configuration> +EOF + einfo "Installing rogue binary '$1' into '${S}'" + nuget install "$1" -Version "$2" -OutputDirectory ${S} +} + # @FUNCTION: enuspec # @DESCRIPTION: run nuget pack # accepts path to .nuspec file as parameter |