aboutsummaryrefslogtreecommitdiffstats
path: root/devel/android-tools-fastboot/Makefile
blob: a8016e2e80316b55b6185dc27e6f465e0837ce0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# $FreeBSD$

PORTNAME=   android-tools-fastboot
DISTVERSIONPREFIX=  android-
DISTVERSION=    5.1.1_r4
PORTREVISION=   1
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
LICENSE_COMB=   multi

LIB_DEPENDS=    libpcre.so:${PORTSDIR}/devel/pcre

USE_GITHUB= yes
GH_ACCOUNT= android jbeich:extras,libselinux
GH_PROJECT= platform_system_core platform_system_extras:extras \
        platform_external_libselinux:libselinux

USES=       uidfix
BUILD_WRKSRC=   ${WRKSRC}/fastboot
INSTALL_WRKSRC= ${BUILD_WRKSRC}
MAKEFILE=   ${FILESDIR}/Makefile
MAKE_ENV=   FILESDIR="${FILESDIR}" BINDIR="${PREFIX}/bin" \
        LIBPCRE="${LOCALBASE}/lib/libpcre.a"
CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
PLIST_FILES=    bin/fastboot \
        man/man1/fastboot.1.gz
PORTDOCS=   fastboot_protocol.txt

OPTIONS_DEFINE= DOCS

post-extract:
# Adjust paths relative to core
    @(cd ${WRKSRC_extras} && ${COPYTREE_SHARE} . ${WRKSRC})
    @${MV} ${WRKSRC_libselinux} ${WRKSRC}/libselinux

post-install:
    ${INSTALL_MAN} ${_DISTDIR}/${DISTFILES:M*\:manpage:C/:.*//} \
        ${STAGEDIR}${MAN1PREFIX}/man/man1/fastboot.1
    (cd ${INSTALL_WRKSRC} && ${COPYTREE_SHARE} \
        "${PORTDOCS}" ${STAGEDIR}${DOCSDIR})

.include <bsd.port.mk>