projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
29741a4
)
[MacSDK] Update Nuget to 4.5, switch to binary release instead of building
author
Alexis Christoforides
<alexis@thenull.net>
Mon, 22 May 2017 20:04:30 +0000
(16:04 -0400)
committer
Alexis Christoforides
<alexis@thenull.net>
Mon, 22 May 2017 20:04:51 +0000
(16:04 -0400)
packaging/MacSDK/nuget.py
patch
|
blob
|
history
diff --git
a/packaging/MacSDK/nuget.py
b/packaging/MacSDK/nuget.py
index 321bedfa12d6ea59649e87b6dba9020e98f10df3..a603b1e86ee4bbb55d584b8cb8469e522902bb7f 100644
(file)
--- a/
packaging/MacSDK/nuget.py
+++ b/
packaging/MacSDK/nuget.py
@@
-1,18
+1,26
@@
+import fileinput
-class NuGetPackage(GitHubPackage):
+
+class NuGetBinary (Package):
def __init__(self):
def __init__(self):
- GitHubPackage.__init__(self,
- 'mono', 'nuget',
- '2.12.0',
- '9e2d2c1cc09d2a40eeb72e8c5db789e3b9bf2586',
- configure='')
+ Package.__init__(self, name='NuGet', version='4.5.0', sources=[
+ 'https://dist.nuget.org/win-x86-commandline/v%{version}/NuGet.exe'])
def build(self):
def build(self):
- self.sh('%{make} update_submodules')
- self.sh('%{make} PREFIX=%{package_prefix}')
+ pass
def install(self):
def install(self):
- self.sh('%{makeinstall} PREFIX=%{staged_prefix}')
+ source = os.path.join(self.workspace, 'NuGet.exe')
+ target = os.path.join(self.staged_prefix, 'lib/mono/nuget/NuGet.exe')
+ ensure_dir(os.path.dirname(target))
+ shutil.move(source, target)
-NuGetPackage()
+ launcher = os.path.join(self.staged_prefix, "bin/nuget")
+ ensure_dir(os.path.dirname(launcher))
+ with open(launcher, "w") as output:
+ output.write("#!/bin/sh\n")
+ output.write(
+ 'exec "{0}/bin/mono" $MONO_OPTIONS "{1}" "$@"\n'.format(self.staged_prefix, target))
+ os.chmod(launcher, 0o755)
+NuGetBinary()