# $FreeBSD: head/devel/android-tools-fastboot/Makefile 411229 2016-03-16 12:58:16Z jbeich $ PORTNAME= android-tools-fastboot DISTVERSIONPREFIX= android- DISTVERSION?= 6.0.0_r26 PORTREVISION?= 0 CATEGORIES= devel MASTER_SITES= https://anonscm.debian.org/cgit/android-tools/android-tools.git/plain/debian/:manpage DISTFILES= fastboot.1?id=706e754:manpage EXTRACT_ONLY= ${DISTFILES:N*\:manpage:C/:.*//} MAINTAINER= jbeich@FreeBSD.org COMMENT= Android Fastboot protocol CLI tool LICENSE= APACHE20 BSD2CLAUSE PD LICENSE_COMB= multi LICENSE_FILE_PD= ${WRKSRC}/libselinux/NOTICE LIB_DEPENDS= libpcre.so:devel/pcre USE_GITHUB= yes GH_ACCOUNT= android jbeich:extras,libselinux GH_PROJECT= platform_system_core platform_system_extras:extras \ platform_external_libselinux:libselinux # Emulate GH_COMMIT without causing desync .ifdef DISTVERSIONSUFFIX GH_REVISION= ${DISTVERSIONSUFFIX:S/-g//} # snapshot .else GH_REVISION= f7f765fd62bf # generated by: make update-revision .endif CONFLICTS_INSTALL?= ${PORTNAME}-devel-* USES= compiler:c++11-lib pkgconfig uidfix BUILD_WRKSRC= ${WRKSRC}/fastboot INSTALL_WRKSRC= ${BUILD_WRKSRC} MAKEFILE= ${.CURDIR}/files/Makefile # XXX ?= when bmake-only MAKE_ENV= BINDIR="${PREFIX}/bin" EXTRADIR="${FILESDIR}" \ FILESDIR="${DOCSDIR}" REVISION="${GH_REVISION}" \ MANDIR="${PREFIX}/man/man" \ LIBPCRE="${LOCALBASE}/lib/libpcre.a" PLIST_FILES= bin/fastboot \ man/man1/fastboot.1.gz PORTDOCS= * SUB_FILES= pkg-message OPTIONS_DEFINE= BASH DOCS OPTIONS_SUB= yes .if make(makesum) # for optional distfiles .MAKEFLAGS: WITH="${OPTIONS_DEFINE}" .endif BASH_GH_ACCOUNT= mbrubeck:bashcomp BASH_GH_PROJECT= android-completion:bashcomp BASH_GH_TAGNAME= 3b0fabe:bashcomp BASH_PLIST_FILES= etc/bash_completion.d/fastboot BASH_VARS= LICENSE+=MIT DOCS_MAKE_ARGS_OFF= FILES="" FILESDIR="" post-extract: @${CP} ${_DISTDIR}/${DISTFILES:M*\:manpage:C/:.*//} \ ${BUILD_WRKSRC}/${DISTFILES:M*\:manpage:C/\?.*//} # Adjust paths relative to core @(cd ${WRKSRC_extras} && ${COPYTREE_SHARE} . ${WRKSRC}) @${MV} ${WRKSRC_libselinux} ${WRKSRC}/libselinux post-install-BASH-on: ${MKDIR} ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES:H} ${INSTALL_DATA} ${WRKSRC_bashcomp}/android \ ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES} update-revision: # 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/=.*/= $$(\ ${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 # XXX Work around !target(makesum) .ifndef DISTVERSIONSUFFIX makesum: update-revision .endif