aboutsummaryrefslogtreecommitdiff
path: root/devel/android-tools-fastboot/Makefile
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-12-22 10:49:09 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-12-22 10:49:09 +0000
commita34da07c60e7d602d0ddc9919a01d2d0a34bac6a (patch)
treec3bd0638d6e9b201ecf7f417242e6ac4272f4083 /devel/android-tools-fastboot/Makefile
parent66cde68327853e3144e2d5fe12730670e008108b (diff)
downloadports-a34da07c60e7d602d0ddc9919a01d2d0a34bac6a.tar.gz
ports-a34da07c60e7d602d0ddc9919a01d2d0a34bac6a.zip
devel/android-tools-adb: update SDK version as part of makesum
- Extract platform SDK version out of platform/build repo - Move version logic out of sub-makefile - Simplify GH_REVISION
Notes
Notes: svn path=/head/; revision=456975
Diffstat (limited to 'devel/android-tools-fastboot/Makefile')
-rw-r--r--devel/android-tools-fastboot/Makefile24
1 files changed, 14 insertions, 10 deletions
diff --git a/devel/android-tools-fastboot/Makefile b/devel/android-tools-fastboot/Makefile
index c63e84cdfe82..742a4346dc7a 100644
--- a/devel/android-tools-fastboot/Makefile
+++ b/devel/android-tools-fastboot/Makefile
@@ -25,13 +25,6 @@ GH_PROJECT= platform_system_core platform_system_extras:extras \
GH_TAGNAME?= android-7.1.2_r17:libselinux
GH_SUBDIR= libselinux:libselinux
-# Emulate GH_COMMIT without causing desync
-.ifdef DISTVERSIONSUFFIX
-GH_REVISION= ${DISTVERSIONSUFFIX:S/-g//} # snapshot
-.else
-GH_REVISION= 86c2b588a369 # generated by: make update-revision
-.endif
-
CONFLICTS_INSTALL?= ${PORTNAME}-devel-*
USES= compiler:c++11-lib pkgconfig uidfix
@@ -40,7 +33,8 @@ INSTALL_WRKSRC= ${BUILD_WRKSRC}
CPPFLAGS+= -D_GLIBCXX_USE_C99 # XXX ports/193528
MAKEFILE?= ${.CURDIR}/files/Makefile
MAKE_ENV= BINDIR="${PREFIX}/bin" EXTRADIR="${FILESDIR}" \
- FILESDIR="${DOCSDIR}" REVISION="${GH_REVISION}" \
+ FILESDIR="${DOCSDIR}" \
+ VERSION="${SDK_REVISION}-0 ${GH_REVISION}-android" \
MANDIR="${PREFIX}/man/man" \
LIBPCRE="${LOCALBASE}/lib/libpcre.a"
PLIST_FILES= bin/fastboot \
@@ -48,6 +42,10 @@ PLIST_FILES= bin/fastboot \
PORTDOCS= *
SUB_FILES= pkg-message
+# Generated by "make update-revision" for "fastboot --version"
+SDK_REVISION?= 27.0.0
+GH_REVISION= ${DISTVERSIONSUFFIX:U86c2b588a369:S/-g//}
+
OPTIONS_DEFINE= BASH DOCS
OPTIONS_SUB= yes
@@ -75,13 +73,19 @@ post-install-BASH-on:
${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES}
update-revision:
+ @${REINPLACE_CMD} -i '' -e "/^SDK_REVISION?=/s/=.*/= $$(\
+ ${FETCH_CMD} -qo- \
+ https://github.com/${GH_ACCOUNT}/platform_build/raw/${GH_TAGNAME}/core/version_defaults.mk | \
+ ${SED} -n 's/^[[:space:]]*PLATFORM_SDK_VERSION := //p' \
+ ).0.0/" \
+ ${.CURDIR}/Makefile
# https://developer.github.com/v3/repos/commits/#get-a-single-commit
# Pretend to be curl(1) for pretty-printed JSON to help parse with sed(1)
- @${REINPLACE_CMD} -i '' -e "/^GH_REVISION.*$@/s/=.*/= $$(\
+ @${REINPLACE_CMD} -i '' -e "/^GH_REVISION=/s/:U[^}:]*/:U$$(\
${SETENV} HTTP_USER_AGENT=curl ${FETCH_CMD} -qo- \
https://api.github.com/repos/${GH_ACCOUNT}/${GH_PROJECT}/commits/${GH_TAGNAME} | \
${SED} -n '/sha/ { s/.*\"\([0-9a-f]\{12\}\).*/\1/p; q; }' \
- ) # generated by: make $@/" \
+ )/" \
${.CURDIR}/Makefile
.include <bsd.port.mk>