aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorArsenShnurkov <Arsen.Shnurkov@gmail.com>2015-10-28 11:23:58 +0300
committerArsenShnurkov <Arsen.Shnurkov@gmail.com>2015-10-28 17:14:10 +0300
commit3056d6a03ad66ac28d3d941722bf453e446403ab (patch)
tree751620ca05240b7df70e58badad7ffa26ae309fe /eclass
parentimprove eclass docs (diff)
downloaddotnet-3056d6a03ad66ac28d3d941722bf453e446403ab.tar.gz
dotnet-3056d6a03ad66ac28d3d941722bf453e446403ab.tar.bz2
dotnet-3056d6a03ad66ac28d3d941722bf453e446403ab.zip
rename ebuild file
Diffstat (limited to 'eclass')
-rw-r--r--eclass/nuget.eclass35
-rw-r--r--eclass/nupkg.eclass53
2 files changed, 54 insertions, 34 deletions
diff --git a/eclass/nuget.eclass b/eclass/nuget.eclass
index 1561fd6..d742265 100644
--- a/eclass/nuget.eclass
+++ b/eclass/nuget.eclass
@@ -18,39 +18,6 @@ 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:=}
@@ -60,7 +27,7 @@ if [[ -n $NUGET_NO_DEPEND ]]; then
fi
NPN=${PN/_/.}
-if [[ $PV == *_alpha* ]]
+if [[ $PV == *_alpha* ]] || [[ $PV == *_beta* ]] || [[ $PV == *_pre* ]]
then
NPV=${PVR/_/-}
else
diff --git a/eclass/nupkg.eclass b/eclass/nupkg.eclass
new file mode 100644
index 0000000..398c4ab
--- /dev/null
+++ b/eclass/nupkg.eclass
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: nupkg.eclass
+# @MAINTAINER: cynede@gentoo.org
+# @BLURB: Functions for building and maintaining local nuget packages repository
+# @DESCRIPTION: Common functionality needed by fake build system.
+
+inherit dotnet
+
+# @FUNCTION: enuspec
+# @DESCRIPTION: run nuget pack
+# accepts path to .nuspec file as parameter
+enuspec() {
+ if use nupkg; then
+ # see http://docs.nuget.org/create/nuspec-reference#specifying-files-to-include-in-the-package
+ # for the explaination why $configuration$ property is passed
+ 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:=}
+
+if [[ -n $NUGET_NO_DEPEND ]]; then
+ DEPEND+=" dev-dotnet/nuget"
+fi