Gentoo Archives: gentoo-commits

From: Heather Cynede <cynede@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/X-PagedList/, eclass/, dev-dotnet/X-PagedList/files/
Date: Mon, 28 Dec 2015 07:54:49
Message-Id: 1451215602.09e634d4a86194144abc1e639ee02ccd04a57ab4.cynede@gentoo
1 commit: 09e634d4a86194144abc1e639ee02ccd04a57ab4
2 Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
3 AuthorDate: Sun Dec 27 11:26:42 2015 +0000
4 Commit: Heather Cynede <cynede <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 27 11:26:42 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=09e634d4
7
8 draft ebuild for X.PagedList
9
10 .../X-PagedList-1.24.0.23549-r201512120.ebuild | 159 +++++++++++++++++++++
11 .../X-PagedList/files/X.PagedList.Mvc.csproj.patch | 79 ++++++++++
12 .../X-PagedList/files/X.PagedList.csproj.patch | 69 +++++++++
13 dev-dotnet/X-PagedList/files/X.PagedList.nuspec | 15 ++
14 dev-dotnet/X-PagedList/metadata.xml | 22 +++
15 eclass/nupkg.eclass | 30 ++++
16 6 files changed, 374 insertions(+)
17
18 diff --git a/dev-dotnet/X-PagedList/X-PagedList-1.24.0.23549-r201512120.ebuild b/dev-dotnet/X-PagedList/X-PagedList-1.24.0.23549-r201512120.ebuild
19 new file mode 100644
20 index 0000000..67da841
21 --- /dev/null
22 +++ b/dev-dotnet/X-PagedList/X-PagedList-1.24.0.23549-r201512120.ebuild
23 @@ -0,0 +1,159 @@
24 +# Copyright 1999-2015 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +# $Id$
27 +
28 +EAPI=5
29 +
30 +inherit versionator dotnet nupkg
31 +
32 +HOMEPAGE="https://github.com/kpi-ua/X.PagedList/"
33 +DESCRIPTION="Nugget for easily paging through any IEnumerable/IQueryable in Asp.Net MVC"
34 +LICENSE="MIT"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~x86"
37 +IUSE="net45 +gac +nupkg +pkg-config debug developer"
38 +USE_DOTNET="net45"
39 +
40 +COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
41 +"
42 +
43 +RDEPEND="${COMMON_DEPEND}
44 +"
45 +
46 +DEPEND="${COMMON_DEPEND}
47 + virtual/pkgconfig
48 +"
49 +
50 +NAME="X.PagedList"
51 +REPOSITORY="https://github.com/ArsenShnurkov/${NAME}"
52 +EGIT_BRANCH="master"
53 +LICENSE_URL="${REPOSITORY}/blob/${EGIT_BRANCH}/LICENSE"
54 +ICONMETA="http://uxrepo.com/static/icon-sets/iconic/svg/list.svg"
55 +ICON_URL="https://github.com/ArsenShnurkov/X.PagedList/blob/switching-from-pcl/misc/list.svg"
56 +
57 +EGIT_COMMIT="48bc7da1bc3b6b294c69796bd9573e670edd3c64"
58 +SRC_URI="${REPOSITORY}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.zip -> ${PF}.zip
59 + mirror://gentoo/mono.snk.bz2"
60 +#S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
61 +S="${WORKDIR}/${NAME}-${EGIT_BRANCH}"
62 +
63 +METAFILETOBUILD=./src/X.PagedList.sln
64 +#OUTPUT_DIR=
65 +
66 +# there is an original file exists: ./src/X.PagedList.Mvc/PagedList.Mvc.nuspec
67 +NUSPEC_FILE_NAME=X.PagedList.nuspec
68 +#NUSPEC_VERSION="${PVR//-r/.}"
69 +NUSPEC_VERSION=$(get_version_component_range 1-3)"${PR//r/.}"
70 +
71 +# rm -rf /var/tmp/portage/dev-dotnet/X-PagedList-1.24.0.23549-r201512120
72 +# emerge =X-PagedList-1.24.0.23549-r201512120
73 +# leafpad /var/tmp/portage/dev-dotnet/X-PagedList-1.24.0.23549-r201512120/temp/build.log &
74 +
75 +src_unpack()
76 +{
77 + default
78 + enuget_download_rogue_binary "Microsoft.Web.Infrastructure" "1.0.0.0"
79 + enuget_download_rogue_binary "Microsoft.AspNet.WebPages" "3.2.3"
80 + enuget_download_rogue_binary "Microsoft.AspNet.Razor" "3.2.3"
81 + enuget_download_rogue_binary "Microsoft.AspNet.Mvc" "5.2.3"
82 +}
83 +
84 +src_prepare() {
85 + einfo "patching project files"
86 + epatch "${FILESDIR}/X.PagedList.csproj.patch"
87 + epatch "${FILESDIR}/X.PagedList.Mvc.csproj.patch"
88 +
89 + # no restoring for this particular project for now, see src_unpack() above instead
90 + # einfo "restoring packages"
91 + # enuget_restore -Verbosity detailed -SolutionDirectory "${S}" "./src/X.PagedList/packages.config"
92 + # enuget_restore "./src/X.PagedList.Mvc/X.PagedList.Mvc.csproj"
93 + # enuget_restore -Verbosity detailed -SolutionDirectory "${S}" "./src/X.PagedList.Mvc/packages.config"
94 +
95 + einfo "preparing nuspec"
96 + cp "${FILESDIR}/${NUSPEC_FILE_NAME}" "${S}/${NUSPEC_FILE_NAME}" || die
97 + patch_nuspec_file "${S}/${NUSPEC_FILE_NAME}"
98 +}
99 +
100 +src_configure() {
101 + :;
102 +}
103 +
104 +src_compile() {
105 + exbuild /p:SignAssembly=true "/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "./src/X.PagedList/X.PagedList.csproj"
106 + exbuild /p:SignAssembly=true "/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "./src/X.PagedList.Mvc/X.PagedList.Mvc.csproj"
107 +
108 + # run nuget_pack
109 + einfo "setting .nupkg version to ${NUSPEC_VERSION}"
110 + enuspec -Prop "version=${NUSPEC_VERSION}" "${S}/${NUSPEC_FILE_NAME}"
111 +}
112 +
113 +src_install() {
114 + enupkg "${WORKDIR}/${NAME}.${NUSPEC_VERSION}.nupkg"
115 +
116 + egacinstall "src/X.PagedList/bin/${DIR}/X.PagedList.dll"
117 + egacinstall "src/X.PagedList.Mvc/bin/${DIR}/X.PagedList.Mvc.dll"
118 +
119 + install_pc_file
120 +}
121 +
122 +patch_nuspec_file()
123 +{
124 + if use nupkg; then
125 + if use debug; then
126 + DIR="Debug"
127 +FILES_STRING=`cat <<-EOF || die "${DIR} files at patch_nuspec_file()"
128 + <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
129 + <file src="src/X.PagedList/bin/${DIR}/X.PagedList.dll" target="lib\net45\" />
130 + <file src="src/X.PagedList.Mvc/bin/${DIR}/X.PagedList.Mvc.dll" target="lib\net45\" />
131 + <file src="src/X.PagedList/bin/${DIR}/X.PagedList.dll.mdb" target="lib\net45\" />
132 + <file src="src/X.PagedList.Mvc/bin/${DIR}/X.PagedList.Mvc.dll.mdb" target="lib\net45\" />
133 + </files>
134 +EOF
135 +`
136 + else
137 + DIR="Release"
138 +FILES_STRING=`cat <<-EOF || die "${DIR} files at patch_nuspec_file()"
139 + <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
140 + <file src="src/X.PagedList/bin/${DIR}/X.PagedList.dll" target="lib\net45\" />
141 + <file src="src/X.PagedList.Mvc/bin/${DIR}/X.PagedList.Mvc.dll" target="lib\net45\" />
142 + </files>
143 +EOF
144 +`
145 + fi
146 +
147 + einfo ${FILES_STRING}
148 + replace "</package>" "${FILES_STRING}</package>" -- $1 || die "replace at patch_nuspec_file()"
149 + fi
150 +}
151 +
152 +PC_FILE_NAME=${PN}
153 +
154 +install_pc_file()
155 +{
156 + if use pkg-config; then
157 + dodir /usr/$(get_libdir)/pkgconfig
158 + ebegin "Installing ${PC_FILE_NAME}.pc file"
159 + sed \
160 + -e "s:@LIBDIR@:$(get_libdir):" \
161 + -e "s:@PACKAGENAME@:${PC_FILE_NAME}:" \
162 + -e "s:@DESCRIPTION@:${DESCRIPTION}:" \
163 + -e "s:@VERSION@:${PV}:" \
164 + -e 's*@LIBS@*-r:${libdir}'"/mono/${PC_FILE_NAME}/X.PagedList.dll:"'${libdir}'"/mono/${PC_FILE_NAME}/X.PagedList.Mvc.dll"'*' \
165 + <<\EOF >"${D}/usr/$(get_libdir)/pkgconfig/${PC_FILE_NAME}.pc" || die
166 +prefix=${pcfiledir}/../..
167 +exec_prefix=${prefix}
168 +libdir=${exec_prefix}/@LIBDIR@
169 +
170 +Name: @PACKAGENAME@
171 +Description: @DESCRIPTION@
172 +Version: @VERSION@
173 +Libs: @LIBS@
174 +EOF
175 +# Package exported to: /var/tmp/portage/dev-dotnet/Open-NAT-1.0.0-r201510290/image//usr/lib64/mono/Open-NAT/Open.Nat.dll -> ../gac/Open.Nat/1.0.0.0__0738eb9f132ed756/Open.Nat.dll
176 +# Installed Open.Nat/bin/Release/Open.Nat.dll into the gac (/var/tmp/portage/dev-dotnet/Open-NAT-1.0.0-r201510290/image//usr/lib64/mono/gac)
177 +
178 + einfo PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "${PC_FILE_NAME}"
179 + PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "${PC_FILE_NAME}" || die ".pc file failed to validate."
180 + eend $?
181 + fi
182 +}
183
184 diff --git a/dev-dotnet/X-PagedList/files/X.PagedList.Mvc.csproj.patch b/dev-dotnet/X-PagedList/files/X.PagedList.Mvc.csproj.patch
185 new file mode 100644
186 index 0000000..b98f034
187 --- /dev/null
188 +++ b/dev-dotnet/X-PagedList/files/X.PagedList.Mvc.csproj.patch
189 @@ -0,0 +1,79 @@
190 +diff --git a/src/X.PagedList.Mvc/X.PagedList.Mvc.csproj b/src/X.PagedList.Mvc/X.PagedList.Mvc.csproj
191 +index 1f6dc03..9ab0dc1 100644
192 +--- a/src/X.PagedList.Mvc/X.PagedList.Mvc.csproj
193 ++++ b/src/X.PagedList.Mvc/X.PagedList.Mvc.csproj
194 +@@ -3,8 +3,6 @@
195 + <PropertyGroup>
196 + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
197 + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
198 +- <ProductVersion>8.0.30703</ProductVersion>
199 +- <SchemaVersion>2.0</SchemaVersion>
200 + <ProjectGuid>{3E8629F8-D927-4D5F-A351-47DDE2AE37D1}</ProjectGuid>
201 + <OutputType>Library</OutputType>
202 + <AppDesignerFolder>Properties</AppDesignerFolder>
203 +@@ -46,36 +44,29 @@
204 + <AssemblyOriginatorKeyFile>PublicPrivateKeyFile.snk</AssemblyOriginatorKeyFile>
205 + </PropertyGroup>
206 + <ItemGroup>
207 +- <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
208 +- <Private>True</Private>
209 +- <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
210 +- </Reference>
211 + <Reference Include="System" />
212 + <Reference Include="System.Core" />
213 + <Reference Include="System.Web" />
214 +- <Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
215 +- <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
216 +- <Private>True</Private>
217 ++ <Reference Include="System.Web.Razor">
218 ++ <HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
219 + </Reference>
220 +- <Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
221 +- <HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
222 +- <Private>True</Private>
223 ++ <Reference Include="Microsoft.Web.Infrastructure">
224 ++ <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
225 + </Reference>
226 +- <Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
227 +- <HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
228 +- <Private>True</Private>
229 ++ <Reference Include="System.Web.Helpers">
230 ++ <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
231 + </Reference>
232 +- <Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
233 ++ <Reference Include="System.Web.WebPages">
234 + <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
235 +- <Private>True</Private>
236 + </Reference>
237 +- <Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
238 ++ <Reference Include="System.Web.WebPages.Deployment">
239 + <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
240 +- <Private>True</Private>
241 + </Reference>
242 +- <Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
243 ++ <Reference Include="System.Web.WebPages.Razor">
244 + <HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
245 +- <Private>True</Private>
246 ++ </Reference>
247 ++ <Reference Include="System.Web.Mvc">
248 ++ <HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
249 + </Reference>
250 + </ItemGroup>
251 + <ItemGroup>
252 +@@ -87,14 +78,14 @@
253 + </ItemGroup>
254 + <ItemGroup>
255 + <None Include="app.config" />
256 +- <None Include="packages.config" />
257 + <None Include="PagedList.Mvc.nuspec" />
258 + <None Include="PublicKeyFile.snk" />
259 + <None Include="PublicPrivateKeyFile.snk" />
260 ++ <None Include="packages.config" />
261 + </ItemGroup>
262 + <ItemGroup>
263 + <ProjectReference Include="..\X.PagedList\X.PagedList.csproj">
264 +- <Project>{55002a4e-d21e-432d-baac-1a9beff4115b}</Project>
265 ++ <Project>{55002A4E-D21E-432D-BAAC-1A9BEFF4115B}</Project>
266 + <Name>X.PagedList</Name>
267 + </ProjectReference>
268 + </ItemGroup>
269
270 diff --git a/dev-dotnet/X-PagedList/files/X.PagedList.csproj.patch b/dev-dotnet/X-PagedList/files/X.PagedList.csproj.patch
271 new file mode 100644
272 index 0000000..c51d506
273 --- /dev/null
274 +++ b/dev-dotnet/X-PagedList/files/X.PagedList.csproj.patch
275 @@ -0,0 +1,69 @@
276 +diff --git a/src/X.PagedList/X.PagedList.csproj b/src/X.PagedList/X.PagedList.csproj
277 +index 3f36f83..d8017f7 100644
278 +--- a/src/X.PagedList/X.PagedList.csproj
279 ++++ b/src/X.PagedList/X.PagedList.csproj
280 +@@ -1,5 +1,5 @@
281 + <?xml version="1.0" encoding="utf-8"?>
282 +-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
283 ++<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
284 + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
285 + <PropertyGroup>
286 + <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
287 +@@ -10,10 +10,8 @@
288 + <AppDesignerFolder>Properties</AppDesignerFolder>
289 + <RootNamespace>PagedList</RootNamespace>
290 + <AssemblyName>X.PagedList</AssemblyName>
291 +- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
292 +- <TargetFrameworkProfile>Profile328</TargetFrameworkProfile>
293 ++ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
294 + <FileAlignment>512</FileAlignment>
295 +- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
296 + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
297 + <RestorePackages>true</RestorePackages>
298 + <NuGetPackageImportStamp>
299 +@@ -45,7 +43,6 @@
300 + <ItemGroup>
301 + <!-- A reference to the entire .NET Framework is automatically included -->
302 + <None Include="App.config" />
303 +- <None Include="packages.config" />
304 + <None Include="PublicKeyFile.snk" />
305 + <None Include="PublicPrivateKeyFile.snk" />
306 + </ItemGroup>
307 +@@ -60,28 +57,7 @@
308 + <Compile Include="Properties\AssemblyInfo.cs" />
309 + <Compile Include="StaticPagedList.cs" />
310 + </ItemGroup>
311 +- <ItemGroup>
312 +- <Reference Include="System.IO, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
313 +- <HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\portable-net40+sl5+win8+wp8+wpa81\System.IO.dll</HintPath>
314 +- <Private>True</Private>
315 +- </Reference>
316 +- <Reference Include="System.Runtime, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
317 +- <HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\portable-net40+sl5+win8+wp8+wpa81\System.Runtime.dll</HintPath>
318 +- <Private>True</Private>
319 +- </Reference>
320 +- <Reference Include="System.Threading.Tasks, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
321 +- <HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\portable-net40+sl5+win8+wp8+wpa81\System.Threading.Tasks.dll</HintPath>
322 +- <Private>True</Private>
323 +- </Reference>
324 +- </ItemGroup>
325 + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
326 +- <Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
327 +- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
328 +- <PropertyGroup>
329 +- <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
330 +- </PropertyGroup>
331 +- <Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
332 +- </Target>
333 + <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
334 + Other similar extension points exist, see Microsoft.Common.targets.
335 + <Target Name="BeforeBuild">
336 +@@ -89,4 +65,7 @@
337 + <Target Name="AfterBuild">
338 + </Target>
339 + -->
340 ++ <ItemGroup>
341 ++ <Reference Include="System" />
342 ++ </ItemGroup>
343 + </Project>
344 +\ No newline at end of file
345
346 diff --git a/dev-dotnet/X-PagedList/files/X.PagedList.nuspec b/dev-dotnet/X-PagedList/files/X.PagedList.nuspec
347 new file mode 100644
348 index 0000000..cbee3f3
349 --- /dev/null
350 +++ b/dev-dotnet/X-PagedList/files/X.PagedList.nuspec
351 @@ -0,0 +1,15 @@
352 +<?xml version="1.0"?>
353 +<package >
354 + <metadata>
355 + <id>X.PagedList</id>
356 + <version>$version$</version>
357 + <authors>Troy Goode, Andrew Gubskiy</authors>
358 + <owners>Troy Goode, Andrew Gubskiy</owners>
359 + <licenseUrl>https://github.com/kpi-ua/X.PagedList/blob/master/LICENSE</licenseUrl>
360 + <projectUrl>https://github.com/kpi-ua/X.PagedList</projectUrl>
361 + <iconUrl>https://github.com/ArsenShnurkov/X.PagedList/blob/switching-from-pcl/misc/list.svg</iconUrl>
362 + <requireLicenseAcceptance>false</requireLicenseAcceptance>
363 + <description>Nugget for easily paging through any IEnumerable/IQueryable in Asp.Net MVC</description>
364 + <copyright>Copyright 2015</copyright>
365 + </metadata>
366 +</package>
367
368 diff --git a/dev-dotnet/X-PagedList/metadata.xml b/dev-dotnet/X-PagedList/metadata.xml
369 new file mode 100644
370 index 0000000..e3f566a
371 --- /dev/null
372 +++ b/dev-dotnet/X-PagedList/metadata.xml
373 @@ -0,0 +1,22 @@
374 +<?xml version="1.0" encoding="UTF-8"?>
375 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
376 +<pkgmetadata>
377 + <herd>dotnet</herd>
378 + <maintainer> <!-- https://wiki.gentoo.org/wiki/User:Cynede -->
379 + <email>cynede@g.o</email>
380 + <name>Heather Cynede</name>
381 + </maintainer>
382 + <upstream>
383 + <bugs-to>https://github.com/kpi-ua/X.PagedList/issues/</bugs-to>
384 + <remote-id type="github">kpi-ua/X.PagedList</remote-id>
385 + </upstream>
386 + <use>
387 + <flag name='pkg-config'>create .pc file(s) for .dll(s) installed to gac</flag>
388 + </use>
389 + <longdescription lang="en">
390 + Nugget for easily paging through any IEnumerable/IQueryable in Asp.Net MVC
391 + </longdescription>
392 + <longdescription lang="ru">
393 + Набор функций для вывода списков в движке Razor (из ASP .NET)
394 + </longdescription>
395 +</pkgmetadata>
396
397 diff --git a/eclass/nupkg.eclass b/eclass/nupkg.eclass
398 index 4142588..0ff0df9 100644
399 --- a/eclass/nupkg.eclass
400 +++ b/eclass/nupkg.eclass
401 @@ -16,6 +16,36 @@ enuget_restore() {
402 nuget restore "$@" || die
403 }
404
405 +# @FUNCTION: enuget_download_rogue_binary
406 +# @DESCRIPTION: downloads a binary package from 3rd untrusted party repository
407 +# accepts Id of package as parameter
408 +enuget_download_rogue_binary() {
409 + if [ -d "/var/calculate/remote/distfiles" ]; then
410 + NUGET_LOCAL_REPOSITORY_PATH=/var/calculate/remote/packages/NuGet
411 + else
412 + # this is for all normal gentoo-based distributions
413 + NUGET_LOCAL_REPOSITORY_PATH=/usr/local/nuget/nupkg
414 + fi
415 + #einfo "Downloading rogue binary '$1' into '${NUGET_LOCAL_REPOSITORY_PATH}'"
416 + # https://www.nuget.org/api/v2/package/{packageID}/{packageVersion}
417 +
418 + # this will give "* ACCESS DENIED: open_wr: /var/calculate/remote/packages/NuGet" message
419 + # wget -c https://www.nuget.org/api/v2/package/$1/$2 -o "${LOCAL_NUGET_REPOSITORY_PATH}"
420 +
421 + einfo "Downloading rogue binary '$1' into '${T}/$1.$2.nupkg'"
422 + wget -c https://www.nuget.org/api/v2/package/$1/$2 --directory-prefix="${T}/" --output-document="$1.$2.nupkg" || die
423 + # -p ignores directory if it is already exists
424 + mkdir -p "${T}/NuGet/" || die
425 + echo <<\EOF >"${T}/NuGet/NuGet.Config" || die
426 +<?xml version="1.0" encoding="utf-8" ?>
427 +<configuration><config>
428 +<add key="repositoryPath" value="${T}" />
429 +</config></configuration>
430 +EOF
431 + einfo "Installing rogue binary '$1' into '${S}'"
432 + nuget install "$1" -Version "$2" -OutputDirectory ${S}
433 +}
434 +
435 # @FUNCTION: enuspec
436 # @DESCRIPTION: run nuget pack
437 # accepts path to .nuspec file as parameter