aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorArsenShnurkov <Arsen.Shnurkov@gmail.com>2015-08-17 18:28:04 +0300
committerArsenShnurkov <Arsen.Shnurkov@gmail.com>2015-08-18 11:26:06 +0300
commit6d5fcbd2c4d9c41f8fcd519738ebf014a279f875 (patch)
tree7778a2a9662fcd999d09912cb41af916ecc699e5 /eclass
parentsync with gentoo-x86 (diff)
downloaddotnet-6d5fcbd2c4d9c41f8fcd519738ebf014a279f875.tar.gz
dotnet-6d5fcbd2c4d9c41f8fcd519738ebf014a279f875.tar.bz2
dotnet-6d5fcbd2c4d9c41f8fcd519738ebf014a279f875.zip
initial attempt
Diffstat (limited to 'eclass')
-rw-r--r--eclass/dotnet.eclass31
-rw-r--r--eclass/nuget.eclass41
2 files changed, 41 insertions, 31 deletions
diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass
index 6222540..2bf9f72 100644
--- a/eclass/dotnet.eclass
+++ b/eclass/dotnet.eclass
@@ -97,37 +97,6 @@ exbuild() {
xbuild /tv:4.0 "/p:TargetFrameworkVersion=v${FRAMEWORK}" "${CARGS}" "${SARGS}" "$@" || die
}
-# @FUNCTION: enuspec
-# @DESCRIPTION: run nuget pack
-enuspec() {
- if use nupkg; then
- if use debug; then
- PROPS=Configuration=Debug
- else
- PROPS=Configuration=Release
- fi
- nuget pack -Properties "${PROPS}" -BasePath "${S}" -OutputDirectory "${WORKDIR}" -NonInteractive -Verbosity detailed "$@" || die
- fi
-}
-
-# @FUNCTION: enupkg
-# @DESCRIPTION: installs .nupkg into local repository
-enupkg() {
- if use nupkg; then
- if [ -d "/var/calculate/remote/distfiles" ]; then
- # Control will enter here if the directory exist.
- # this is necessary to handle calculate linux profiles feature (for corporate users)
- elog "Installing .nupkg into /var/calculate/remote/packages/NuGet"
- insinto /var/calculate/remote/packages/NuGet
- else
- # this is for all normal gentoo-based distributions
- elog "Installing .nupkg into /usr/local/nuget/nupkg"
- insinto /usr/local/nuget/nupkg
- fi
- doins "$@"
- fi
-}
-
# @FUNCTION: egacinstall
# @DESCRIPTION: install package to GAC
egacinstall() {
diff --git a/eclass/nuget.eclass b/eclass/nuget.eclass
index 2df0eb9..c7a3da2 100644
--- a/eclass/nuget.eclass
+++ b/eclass/nuget.eclass
@@ -9,6 +9,46 @@
inherit dotnet
+# @FUNCTION: enuget_restore
+# @DESCRIPTION: run nuget restore
+# accepts path to .sln or .proj or .csproj file to restore as parameter
+enuget_restore() {
+ nuget restore "$@" || die
+}
+
+# @FUNCTION: enuspec
+# @DESCRIPTION: run nuget pack
+# accepts path to .nuspec file as parameter
+enuspec() {
+ if use nupkg; then
+ if use debug; then
+ PROPS=Configuration=Debug
+ else
+ PROPS=Configuration=Release
+ fi
+ nuget pack -Properties "${PROPS}" -BasePath "${S}" -OutputDirectory "${WORKDIR}" -NonInteractive -Verbosity detailed "$@" || die
+ fi
+}
+
+# @FUNCTION: enupkg
+# @DESCRIPTION: installs .nupkg into local repository
+# accepts path to .nupkg file as parameter
+enupkg() {
+ if use nupkg; then
+ if [ -d "/var/calculate/remote/distfiles" ]; then
+ # Control will enter here if the directory exist.
+ # this is necessary to handle calculate linux profiles feature (for corporate users)
+ elog "Installing .nupkg into /var/calculate/remote/packages/NuGet"
+ insinto /var/calculate/remote/packages/NuGet
+ else
+ # this is for all normal gentoo-based distributions
+ elog "Installing .nupkg into /usr/local/nuget/nupkg"
+ insinto /usr/local/nuget/nupkg
+ fi
+ doins "$@"
+ fi
+}
+
# @ECLASS_VARIABLE: NUGET_DEPEND
# @DESCRIPTION Set false to net depend on nuget
: ${NUGET_NO_DEPEND:=}
@@ -28,6 +68,7 @@ fi
# @FUNCTION: nuget_src_unpack
# @DESCRIPTION: Runs nuget.
nuget_src_unpack() {
+ default
nuget install "${NPN}" -Version "${NPV}" -OutputDirectory "${P}"
}