aboutsummaryrefslogtreecommitdiff
path: root/sysutils/azure-agent
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2017-05-25 20:24:51 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2017-05-25 20:24:51 +0000
commit9b4e39b716248747f9fc15551858df3bd5acc440 (patch)
tree0b07355ae9e38ac4efb52d105f2b06709318a254 /sysutils/azure-agent
parent70c7c8ef63d4b025e0238d0a6fcaa0e424b2615a (diff)
downloadports-9b4e39b716248747f9fc15551858df3bd5acc440.tar.gz
ports-9b4e39b716248747f9fc15551858df3bd5acc440.zip
Notes
Diffstat (limited to 'sysutils/azure-agent')
-rw-r--r--sysutils/azure-agent/Makefile46
-rw-r--r--sysutils/azure-agent/distinfo5
-rw-r--r--sysutils/azure-agent/pkg-message7
3 files changed, 41 insertions, 17 deletions
diff --git a/sysutils/azure-agent/Makefile b/sysutils/azure-agent/Makefile
index 52800d8c1d39..1f3d71d749a4 100644
--- a/sysutils/azure-agent/Makefile
+++ b/sysutils/azure-agent/Makefile
@@ -1,10 +1,11 @@
# $FreeBSD$
PORTNAME= azure-agent
-PORTVERSION= ${GH_TAGNAME}.16
+PORTVERSION= 2.2.8
CATEGORIES= sysutils
+DISTVERSIONPREFIX= v
-MAINTAINER= gjb@FreeBSD.org
+MAINTAINER= honzhan@microsoft.com
COMMENT= The Microsoft Azure Linux Agent
LICENSE= APACHE20
@@ -12,22 +13,37 @@ LICENSE= APACHE20
RUN_DEPENDS= python:lang/python \
sudo:security/sudo \
bash:shells/bash \
+ base64:converters/base64 \
${PYTHON_PKGNAMEPREFIX}pyasn1>=0:devel/py-pyasn1 \
${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
NO_BUILD= yes
-USES= python:2
-
-USE_GITHUB= yes
-GH_ACCOUNT= Azure
-GH_PROJECT= WALinuxAgent
-GH_TAGNAME= 2.0
-
-PLIST_FILES= sbin/waagent
-
-.include <bsd.port.options.mk>
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/waagent ${STAGEDIR}${PREFIX}/sbin
+USES= python:2 shebangfix
+
+SHEBANG_FILES= bin/waagent bin/waagent2.0
+python_OLD_CMD= "/usr/bin/env python"
+
+USE_GITHUB= yes
+GH_ACCOUNT= Azure
+GH_PROJECT= WALinuxAgent
+
+post-patch:
+ ${REINPLACE_CMD} -e "s,/usr/sbin/waagent,${PREFIX}/sbin/waagent,g" \
+ ${WRKSRC}/bin/waagent2.0
+ ${REINPLACE_CMD} -e "s,/usr/sbin,${PREFIX}/sbin/,g" \
+ ${WRKSRC}/init/waagent ${WRKSRC}/init/waagent.service \
+ ${WRKSRC}/setup.py
+ ${REINPLACE_CMD} -e "s,/etc,${PREFIX}/etc,g" \
+ ${WRKSRC}/setup.py
+ ${REINPLACE_CMD} -e "s,/etc/waagent,${PREFIX}/etc/waagent,g" \
+ ${WRKSRC}/bin/waagent2.0 \
+ ${WRKSRC}/azurelinuxagent/common/osutil/default.py \
+ ${WRKSRC}/init/waagent.service
+ ${REINPLACE_CMD} -e "s,/etc/rc.d/waagent,${PREFIX}/etc/rc.d/waagent,g" \
+ ${WRKSRC}/bin/waagent2.0
+ ${REINPLACE_CMD} -e "s,/usr/bin/python,${PREFIX}/bin/python,g" \
+ ${WRKSRC}/init/waagent.service
+
+USE_PYTHON= autoplist distutils
.include <bsd.port.mk>
diff --git a/sysutils/azure-agent/distinfo b/sysutils/azure-agent/distinfo
index fc0e586e10ad..926404323393 100644
--- a/sysutils/azure-agent/distinfo
+++ b/sysutils/azure-agent/distinfo
@@ -1,2 +1,3 @@
-SHA256 (Azure-WALinuxAgent-2.0.16-2.0_GH0.tar.gz) = abb51b068a1c38dd50323722e05bd1066dc179be07e9e8dd1a3d0c92c46724ea
-SIZE (Azure-WALinuxAgent-2.0.16-2.0_GH0.tar.gz) = 100991
+TIMESTAMP = 1495743874
+SHA256 (Azure-WALinuxAgent-v2.2.8_GH0.tar.gz) = 8d8863199ac7d6eca8cbaaa9f843ab3da853060bb2588141e85a6134d2e07b5f
+SIZE (Azure-WALinuxAgent-v2.2.8_GH0.tar.gz) = 638305
diff --git a/sysutils/azure-agent/pkg-message b/sysutils/azure-agent/pkg-message
new file mode 100644
index 000000000000..0260b514832a
--- /dev/null
+++ b/sysutils/azure-agent/pkg-message
@@ -0,0 +1,7 @@
+==========================================================
+To enable waagent, add the following line to rc.conf:
+
+waagent_enable="YES"
+
+This will make sure waagent is started at boot.
+==========================================================