1 |
commit: 9278ba01842058a9f2d17b803c1abfe189c5755c |
2 |
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Jan 15 14:02:53 2016 +0000 |
4 |
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 23 12:59:52 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=9278ba01 |
7 |
|
8 |
some draft (nonworking) |
9 |
|
10 |
dev-util/mono-packaging-tools/metadata.xml | 14 ++++ |
11 |
.../mono-packaging-tools-0.2.1_p20160115.ebuild | 95 ++++++++++++++++++++++ |
12 |
2 files changed, 109 insertions(+) |
13 |
|
14 |
diff --git a/dev-util/mono-packaging-tools/metadata.xml b/dev-util/mono-packaging-tools/metadata.xml |
15 |
index b1262f1..1082890 100644 |
16 |
--- a/dev-util/mono-packaging-tools/metadata.xml |
17 |
+++ b/dev-util/mono-packaging-tools/metadata.xml |
18 |
@@ -5,4 +5,18 @@ |
19 |
<email>dotnet@g.o</email> |
20 |
<description>Gentoo Dotnet Project</description> |
21 |
</maintainer> |
22 |
+ <upstream> |
23 |
+ <bugs-to>https://github.com/ArsenShnurkov/mono-packaging-tools/issues</bugs-to> |
24 |
+ <remote-id type="github">ArsenShnurkov/mono-packaging-tools</remote-id> |
25 |
+ </upstream> |
26 |
+ <use> |
27 |
+ <flag name='aot'>compile to machine code and store to disk during install, to save time later during startups</flag> |
28 |
+ <flag name='pkg-config'>create .pc file(s) for .dll(s) installed to gac</flag> |
29 |
+ </use> |
30 |
+ <longdescription lang="en"> |
31 |
+ Various utils for packaging mono projects |
32 |
+ </longdescription> |
33 |
+ <longdescription lang="ru"> |
34 |
+ Вспомогательные утилиты для использования в ebuild-ах для clr-приложений |
35 |
+ </longdescription> |
36 |
</pkgmetadata> |
37 |
|
38 |
diff --git a/dev-util/mono-packaging-tools/mono-packaging-tools-0.2.1_p20160115.ebuild b/dev-util/mono-packaging-tools/mono-packaging-tools-0.2.1_p20160115.ebuild |
39 |
new file mode 100644 |
40 |
index 0000000..e6ecf52 |
41 |
--- /dev/null |
42 |
+++ b/dev-util/mono-packaging-tools/mono-packaging-tools-0.2.1_p20160115.ebuild |
43 |
@@ -0,0 +1,95 @@ |
44 |
+# Copyright 1999-2016 Gentoo Foundation |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+# $Id$ |
47 |
+ |
48 |
+EAPI=6 # >=portage-2.2.25 |
49 |
+KEYWORDS="~x86 ~amd64" |
50 |
+ |
51 |
+USE_DOTNET="net45" |
52 |
+# debug = debug configuration (symbols and defines for debugging) |
53 |
+# test = allow NUnit tests to run |
54 |
+# developer = generate symbols information (to view line numbers in stack traces, either in debug or release configuration) |
55 |
+# aot = compile to machine code and store to disk during install, to save time later during startups |
56 |
+# nupkg = create .nupkg file from .nuspec |
57 |
+# gac = install into gac |
58 |
+# pkg-config = register in pkg-config database |
59 |
+IUSE="${USE_DOTNET} debug test +developer +aot +nupkg +gac +pkg-config" |
60 |
+ |
61 |
+inherit nupkg |
62 |
+ |
63 |
+HOMEPAGE="http://arsenshnurkov.github.io/mono-packaging-tools" |
64 |
+DESCRIPTION="mono packaging helpers" |
65 |
+LICENSE="GPL-3" |
66 |
+LICENSE_URL="https://raw.githubusercontent.com/ArsenShnurkov/mono-packaging-tools/master/LICENSE" |
67 |
+ |
68 |
+SLOT="0" |
69 |
+ |
70 |
+REPOSITORY_NAME="mono-packaging-tools" |
71 |
+REPOSITORY_URL="https://github.com/ArsenShnurkov/${REPOSITORY_NAME}" |
72 |
+EGIT_COMMIT="17bfa8a2c3a7c3f6507e0226764066750ef91f03" |
73 |
+SRC_URI="${REPOSITORY_URL}/archive/${EGIT_COMMIT}.zip -> ${P}.zip |
74 |
+ mirror://gentoo/mono.snk.bz2" |
75 |
+S="${WORKDIR}/${REPOSITORY_NAME}-${EGIT_COMMIT}" |
76 |
+ |
77 |
+COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 ) |
78 |
+ >=dev-dotnet/eto-parse-1.4.0[nupkg] |
79 |
+ " |
80 |
+DEPEND="${COMMON_DEPENDENCIES} |
81 |
+ " |
82 |
+RDEPEND="${COMMON_DEPENDENCIES} |
83 |
+ " |
84 |
+ |
85 |
+METAFILETOBUILD="${S}/${SLN_FILE}" |
86 |
+ |
87 |
+METAFILETOBUILD="mono-packaging-tools.sln" |
88 |
+NUSPEC_FILENAME="${PN}.nuspec" |
89 |
+NUSPEC_ID="${REPOSITORY_NAME}" |
90 |
+COMMIT_DATE_INDEX="$(get_version_component_count ${PV} )" |
91 |
+COMMIT_DATE="$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )" |
92 |
+NUSPEC_VERSION="$(get_version_component_range 1-3)${COMMIT_DATE//p/.}${PR//r/}" |
93 |
+ICON_FILENAME="${PN}.png" |
94 |
+ICON_FINALNAME="${NUSPEC_ID}.${NUSPEC_VERSION}.png" |
95 |
+ICON_PATH="$(get_nuget_trusted_icons_location)/${ICON_FINALNAME}" |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ #change version in .nuspec |
99 |
+ # PV = Package version (excluding revision, if any), for example 6.3. |
100 |
+ # It should reflect the upstream versioning scheme |
101 |
+ sed "s/@VERSION@/${PV}/g" "${FILESDIR}/${NUGET_PACKAGE_ID}.nuspec" >"${S}/${NUGET_PACKAGE_ID}.nuspec" || die |
102 |
+ |
103 |
+ enuget_restore "${METAFILETOBUILD}" |
104 |
+} |
105 |
+ |
106 |
+src_compile() { |
107 |
+ exbuild "${METAFILETOBUILD}" |
108 |
+ enuspec "${NUGET_PACKAGE_ID}.nuspec" |
109 |
+} |
110 |
+ |
111 |
+install_tool() { |
112 |
+ MONO=/usr/bin/mono |
113 |
+ doins $1/bin/${DIR}/* |
114 |
+ if use developer; then |
115 |
+ make_wrapper $1 "${MONO} --debug /usr/share/${PN}/$1.exe" |
116 |
+ else |
117 |
+ make_wrapper $1 "${MONO} /usr/share/${PN}/$1.exe" |
118 |
+ fi; |
119 |
+} |
120 |
+ |
121 |
+src_install() { |
122 |
+ if use debug; then |
123 |
+ DIR="Debug" |
124 |
+ else |
125 |
+ DIR="Release" |
126 |
+ fi |
127 |
+ |
128 |
+ insinto "/usr/share/${PN}/" |
129 |
+ install_tool mpt-gitmodules |
130 |
+ install_tool mpt-sln |
131 |
+ install_tool mpt-csproj |
132 |
+ install_tool mpt-machine |
133 |
+ install_tool mpt-nuget |
134 |
+ |
135 |
+ enupkg "${WORKDIR}/${PN}.${PV}.nupkg" |
136 |
+ |
137 |
+ dodoc README.md |
138 |
+} |