commit:     1cba3b19946d6311d5542658c3c713b86252d876
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Tue Aug 30 22:02:43 2016 +0000
Commit:     Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Tue Aug 30 22:02:43 2016 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=1cba3b19

initial version

 .../files/Microsoft.AspNet.Razor.nuspec            | 20 +++++
 dev-dotnet/system-web-razor/metadata.xml           | 12 +++
 .../system-web-razor-3.2.3_p2014092400.ebuild      | 93 ++++++++++++++++++++++
 3 files changed, 125 insertions(+)

diff --git a/dev-dotnet/system-web-razor/files/Microsoft.AspNet.Razor.nuspec 
b/dev-dotnet/system-web-razor/files/Microsoft.AspNet.Razor.nuspec
new file mode 100644
index 0000000..d3ac34b
--- /dev/null
+++ b/dev-dotnet/system-web-razor/files/Microsoft.AspNet.Razor.nuspec
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd";>
+  <metadata>
+    <id>Microsoft.AspNet.Razor</id>
+    <version>$BuildVersion$</version>
+    <title>Microsoft ASP.NET Razor</title>
+    <authors>Microsoft</authors>
+    <owners>Microsoft,aspnet</owners>
+    
<licenseUrl>http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm</licenseUrl>
+    <projectUrl>http://www.asp.net/web-pages</projectUrl>
+    <iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
+    <requireLicenseAcceptance>true</requireLicenseAcceptance>
+    <description>This package contains the runtime assemblies for ASP.NET Web 
Pages. ASP.NET Web Pages and the new Razor syntax provide a fast, terse, clean 
and lightweight way to combine server code with HTML to create dynamic web 
content.</description>
+    <summary>This package contains the runtime assemblies for ASP.NET Web 
Pages.</summary>
+    <releaseNotes>Please visit http://go.microsoft.com/fwlink/?LinkID=403011 
to view the release notes.</releaseNotes>
+    <copyright>© Microsoft Corporation. All rights reserved.</copyright>
+    <language>en-US</language>
+    <tags>Microsoft AspNet WebPages AspNetWebPages Razor</tags>
+  </metadata>
+</package>
\ No newline at end of file

diff --git a/dev-dotnet/system-web-razor/metadata.xml 
b/dev-dotnet/system-web-razor/metadata.xml
new file mode 100644
index 0000000..166e76b
--- /dev/null
+++ b/dev-dotnet/system-web-razor/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+           <email>[email protected]</email>
+           <description>Gentoo Dotnet Project</description>
+       </maintainer>
+       <use>
+               <flag name='developer'>enables debug information for any of 
debug and release builds</flag>
+               <flag name='nupkg'>creates local nuget package</flag>
+       </use>
+</pkgmetadata>

diff --git 
a/dev-dotnet/system-web-razor/system-web-razor-3.2.3_p2014092400.ebuild 
b/dev-dotnet/system-web-razor/system-web-razor-3.2.3_p2014092400.ebuild
new file mode 100644
index 0000000..46efc4d
--- /dev/null
+++ b/dev-dotnet/system-web-razor/system-web-razor-3.2.3_p2014092400.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit mono-env gac nupkg
+
+REPO_NAME="aspnetwebstack"
+HOMEPAGE="https://github.com/ASP-NET-MVC/aspnetwebstack";
+
+EGIT_BRANCH="master"
+EGIT_COMMIT="4e40cdef9c8a8226685f95ef03b746bc8322aa92"
+SRC_URI="${HOMEPAGE}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.tar.gz -> 
${PF}.tar.gz"
+RESTRICT="mirror"
+#S="${WORKDIR}/${REPO_NAME}-${EGIT_COMMIT}"
+S="${WORKDIR}/${REPO_NAME}-${EGIT_BRANCH}"
+
+SLOT="0"
+
+DESCRIPTION="parser and code generation infrastructure for Razor markup syntax"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~x86"
+#USE_DOTNET="net45 net40 net20"
+USE_DOTNET="net45"
+
+IUSE="+${USE_DOTNET} developer debug"
+
+COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
+"
+RDEPEND="${COMMON_DEPEND}
+"
+DEPEND="${COMMON_DEPEND}
+"
+
+DLL_NAME=System.Web.Razor
+DLL_PATH=bin
+FILE_TO_BUILD=./src/System.Web.Razor/System.Web.Razor.csproj
+METAFILETOBUILD="${S}/${FILE_TO_BUILD}"
+
+NUSPEC_ID=Microsoft.AspNet.Razor
+
+COMMIT_DATE_INDEX="$(get_version_component_count ${PV} )"
+COMMIT_DATE="$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )"
+NUSPEC_VERSION=$(get_version_component_range 1-3)"${COMMIT_DATE//p/.}"
+
+src_prepare() {
+       cp "${FILESDIR}/${NUSPEC_ID}.nuspec" "${S}" || die
+       chmod -R +rw "${S}" || die
+       patch_nuspec_file "${S}/${NUSPEC_ID}.nuspec"
+       eapply_user
+}
+
+patch_nuspec_file()
+{
+    if use nupkg; then
+       if use debug; then
+           DIR="Debug"
+       else
+           DIR="Release"
+       fi
+       FILES_STRING=`sed 's/[\/&]/\\\\&/g' <<-EOF || die "escaping replacement 
string characters"
+         <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
+           <file src="${DLL_PATH}/${DIR}/${DLL_NAME}.dll*" target="lib/net45/" 
/>
+         </files>
+       EOF
+       `
+       sed -i 's/<\/package>/'"${FILES_STRING//$'\n'/\\$'\n'}"'\n&/g' $1 || 
die "escaping line endings"
+    fi
+}
+
+src_compile() {
+       exbuild "${METAFILETOBUILD}"
+
+       einfo nuspec: "${S}/${NUSPEC_ID}.nuspec"
+       einfo nupkg: "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg"
+
+       enuspec -Prop BuildVersion=${NUSPEC_VERSION} "${S}/${NUSPEC_ID}.nuspec"
+}
+
+src_install() {
+       if use debug; then
+               DIR="Debug"
+       else
+               DIR="Release"
+       fi
+
+#      if use gac; then
+#              egacinstall "${S}/build/bin/${DIR}/Mono 4.x/NLog.dll"
+#              egacinstall "${S}/build/bin/${DIR}/Mono 4.x/NLog.Extended.dll"
+#      fi
+
+       enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg"
+}

Reply via email to