public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/Open-NAT/
@ 2015-10-29 11:15 Heather Cynede
  0 siblings, 0 replies; 2+ messages in thread
From: Heather Cynede @ 2015-10-29 11:15 UTC (permalink / raw
  To: gentoo-commits

commit:     fe426d6dab349a336a2e18d70705f2d06037efa5
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Thu Oct 29 07:56:55 2015 +0000
Commit:     Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Thu Oct 29 07:56:55 2015 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=fe426d6d

initial code

 .../Open-NAT/Open-NAT-1.0.0-r201510290.ebuild      | 131 +++++++++++++++++++++
 dev-dotnet/Open-NAT/metadata.xml                   |  25 ++++
 2 files changed, 156 insertions(+)

diff --git a/dev-dotnet/Open-NAT/Open-NAT-1.0.0-r201510290.ebuild b/dev-dotnet/Open-NAT/Open-NAT-1.0.0-r201510290.ebuild
new file mode 100644
index 0000000..4061b2b
--- /dev/null
+++ b/dev-dotnet/Open-NAT/Open-NAT-1.0.0-r201510290.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# mono-env
+inherit  dotnet nupkg
+
+HOMEPAGE="https://lontivero.github.io/Open.NAT"
+DESCRIPTION="Lightweight and easy-to-use class library to allow port forwarding in NAT devices with UPNP and/or PMP"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="net45 +gac +nupkg +pkg-config debug developer"
+USE_DOTNET="net45"
+
+COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
+"
+
+RDEPEND="${COMMON_DEPEND}
+"
+
+DEPEND="${COMMON_DEPEND}
+	virtual/pkgconfig
+"
+
+NAME="Open.NAT"
+REPOSITORY="https://github.com/ArsenShnurkov/${NAME}"
+LICENSE_URL="${REPOSITORY}/blob/master/LICENSE"
+ICONMETA="https://github.com/lontivero/Open.NAT/tree/gh-pages/images/logos"
+ICON_URL="https://raw.githubusercontent.com/lontivero/Open.NAT/gh-pages/images/logos/256.jpg"
+
+EGIT_BRANCH="gentoo-mono4"
+EGIT_COMMIT="8b1120fa0f2d457fa2c703718bbf3ce079ac5aae"
+SRC_URI="${REPOSITORY}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.zip -> ${PF}.zip
+	mirror://gentoo/mono.snk.bz2"
+#S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+S="${WORKDIR}/${NAME}-${EGIT_BRANCH}"
+
+#METAFILETOBUILD="./Open.Nat.sln"
+METAFILETOBUILD="./Open.Nat/Open.Nat.csproj"
+
+OUTPUT_DIR=Open.Nat/bin
+GAC_DLL_NAME=Open.Nat
+
+NUSPEC_FILE="${S}/Open.Nat/Open.Nat.nuspec"
+NUSPEC_VERSION="${PVR//-r/.}"
+
+src_prepare() {
+	enuget_restore "${METAFILETOBUILD}"
+
+	patch_nuspec_file ${NUSPEC_FILE}
+}
+
+src_configure() {
+	:;
+}
+
+src_compile() {
+	exbuild /p:SignAssembly=true "/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}"
+
+	# run nuget_pack
+	enuspec -Prop version=${NUSPEC_VERSION} ${NUSPEC_FILE}
+}
+
+src_install() {
+	enupkg "${WORKDIR}/${NAME}.${NUSPEC_VERSION}.nupkg"
+
+	egacinstall "${OUTPUT_DIR}/${DIR}/${GAC_DLL_NAME}.dll"
+
+	install_pc_file
+}
+
+patch_nuspec_file()
+{
+	if use nupkg; then
+		if use debug; then
+			DIR="Debug"
+		else
+			DIR="Release"
+		fi
+		patch <<EOF $1 || die "patching of $1 failed"
+diff --git a/Open.Nat/Open.Nat.nuspec b/Open.Nat/Open.Nat.nuspec
+index 1da1488..c562699 100644
+--- a/Open.Nat/Open.Nat.nuspec
++++ b/Open.Nat/Open.Nat.nuspec
+@@ -64,4 +64,8 @@
+       Tracing improvements
+     </releaseNotes>
+   </metadata>
++       <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
++               <file src="${OUTPUT_DIR}/${DIR}/*.dll" target="lib\net45\" />
++               <file src="${OUTPUT_DIR}/${DIR}/*.mdb" target="lib\net45\" />
++       </files>
+ </package>
+EOF
+	fi
+}
+
+PC_FILE_NAME=${PN}
+
+install_pc_file()
+{
+	if use pkg-config; then
+		dodir /usr/$(get_libdir)/pkgconfig
+		ebegin "Installing ${PC_FILE_NAME}.pc file"
+		sed \
+			-e "s:@LIBDIR@:$(get_libdir):" \
+			-e "s:@PACKAGENAME@:${PC_FILE_NAME}:" \
+			-e "s:@DESCRIPTION@:${DESCRIPTION}:" \
+			-e "s:@VERSION@:${PV}:" \
+			-e 's;@LIBS@;-r:${libdir}'"/mono/${PC_FILE_NAME}/${GAC_DLL_NAME}.dll;" \
+			<<\EOF >"${D}/usr/$(get_libdir)/pkgconfig/${PC_FILE_NAME}.pc" || die
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
+libdir=${exec_prefix}/@LIBDIR@
+
+Name: @PACKAGENAME@
+Description: @DESCRIPTION@
+Version: @VERSION@
+Libs: @LIBS@
+EOF
+# 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
+# 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)
+
+		einfo PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "${PC_FILE_NAME}"
+		PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config --exists "${PC_FILE_NAME}" || die ".pc file failed to validate."
+		eend $?
+	fi
+}

diff --git a/dev-dotnet/Open-NAT/metadata.xml b/dev-dotnet/Open-NAT/metadata.xml
new file mode 100644
index 0000000..4fc4830
--- /dev/null
+++ b/dev-dotnet/Open-NAT/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>dotnet</herd>
+	<maintainer> <!-- https://wiki.gentoo.org/wiki/User:Cynede -->
+		<email>cynede@gentoo.org</email>
+		<name>Heather Cynede</name>
+	</maintainer>
+	<upstream>
+		<maintainer status="inactive">
+			<email>unknown</email>
+			<name>Lucas Ontivero</name>
+		</maintainer>
+		<bugs-to>https://github.com/lontivero/Open.NAT/issues/</bugs-to>
+		<remote-id type="github">lontivero/Open.NAT</remote-id>
+	</upstream>
+	<use>
+	</use>
+	<longdescription lang="en">
+                Lightweight and easy-to-use class library to allow port forwarding in NAT devices with UPNP and/or PMP
+        </longdescription>
+	<longdescription lang="ru">
+                Библиотека-клиент для пробрасывания портов через файрволл  по протоколам UPnP и/или PMP
+        </longdescription>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/Open-NAT/
@ 2015-10-29 11:15 Heather Cynede
  0 siblings, 0 replies; 2+ messages in thread
From: Heather Cynede @ 2015-10-29 11:15 UTC (permalink / raw
  To: gentoo-commits

commit:     9cd937a743af2b0df2a9793bba2fe46c8a67d00e
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Thu Oct 29 08:45:51 2015 +0000
Commit:     Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Thu Oct 29 08:45:51 2015 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=9cd937a7

repoman -d fixes

 .../Open-NAT/Open-NAT-1.0.0-r201510290.ebuild      | 26 +++++++++-------------
 dev-dotnet/Open-NAT/metadata.xml                   |  1 +
 2 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/dev-dotnet/Open-NAT/Open-NAT-1.0.0-r201510290.ebuild b/dev-dotnet/Open-NAT/Open-NAT-1.0.0-r201510290.ebuild
index 4061b2b..15bd573 100644
--- a/dev-dotnet/Open-NAT/Open-NAT-1.0.0-r201510290.ebuild
+++ b/dev-dotnet/Open-NAT/Open-NAT-1.0.0-r201510290.ebuild
@@ -8,7 +8,7 @@ EAPI=5
 inherit  dotnet nupkg
 
 HOMEPAGE="https://lontivero.github.io/Open.NAT"
-DESCRIPTION="Lightweight and easy-to-use class library to allow port forwarding in NAT devices with UPNP and/or PMP"
+DESCRIPTION="Lightweight and easy-to-use class library to use port forwarding in NAT devices with UPNP and/or PMP"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
@@ -80,21 +80,15 @@ patch_nuspec_file()
 		else
 			DIR="Release"
 		fi
-		patch <<EOF $1 || die "patching of $1 failed"
-diff --git a/Open.Nat/Open.Nat.nuspec b/Open.Nat/Open.Nat.nuspec
-index 1da1488..c562699 100644
---- a/Open.Nat/Open.Nat.nuspec
-+++ b/Open.Nat/Open.Nat.nuspec
-@@ -64,4 +64,8 @@
-       Tracing improvements
-     </releaseNotes>
-   </metadata>
-+       <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
-+               <file src="${OUTPUT_DIR}/${DIR}/*.dll" target="lib\net45\" />
-+               <file src="${OUTPUT_DIR}/${DIR}/*.mdb" target="lib\net45\" />
-+       </files>
- </package>
-EOF
+		FILES_STRING=`cat <<-EOF || die "files at patch_nuspec_file()"
+		       <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
+		               <file src="${OUTPUT_DIR}/${DIR}/*.dll" target="lib\net45\" />
+		               <file src="${OUTPUT_DIR}/${DIR}/*.mdb" target="lib\net45\" />
+		       </files>
+		EOF
+		`
+		einfo ${FILES_STRING}
+		replace "</package>" "${FILES_STRING}</package>" -- $1 || die "replace at patch_nuspec_file()"
 	fi
 }
 

diff --git a/dev-dotnet/Open-NAT/metadata.xml b/dev-dotnet/Open-NAT/metadata.xml
index 4fc4830..a3ca47f 100644
--- a/dev-dotnet/Open-NAT/metadata.xml
+++ b/dev-dotnet/Open-NAT/metadata.xml
@@ -15,6 +15,7 @@
 		<remote-id type="github">lontivero/Open.NAT</remote-id>
 	</upstream>
 	<use>
+		<flag name='pkg-config'>create .pc file(s) for .dll(s) installed to gac</flag>
 	</use>
 	<longdescription lang="en">
                 Lightweight and easy-to-use class library to allow port forwarding in NAT devices with UPNP and/or PMP


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-29 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29 11:15 [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/Open-NAT/ Heather Cynede
  -- strict thread matches above, loose matches on Subject: below --
2015-10-29 11:15 Heather Cynede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox