aboutsummaryrefslogtreecommitdiff
path: root/sysutils/mmc-utils/Makefile
blob: c12815178a01b7f29bd9e9ed1cce31d0b7b8e9ed (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
# Created by: Marius Strobl <marius@FreeBSD.org>

PORTNAME=	mmc-utils
PORTVERSION=	20191004
DISTVERSIONSUFFIX=	-73d6c59a
CATEGORIES=	sysutils
MASTER_SITES=	LOCAL/marius

MAINTAINER=	marius@FreeBSD.org
COMMENT=	Userspace tools for MMC/SD devices

LICENSE=	BSD3CLAUSE GPLv2
LICENSE_COMB=	multi

IGNORE_DragonFly=	only supported on FreeBSD

USES=		gmake tar:bzip2

PLIST_FILES=	man/man1/mmc.1.gz sbin/mmc

MMC_GITURL=	git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git

post-patch:
.for i in Makefile mmc_cmds.c mmc.c man/mmc.1
	@${REINPLACE_CMD} -e 's|^AM_CFLAGS|#^|; s|path/to|dev|g;\
		s|mmcblk|mmcsd|g' ${WRKSRC}/${i}
.endfor

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/mmc ${STAGEDIR}${PREFIX}/sbin
	${INSTALL_MAN} ${WRKSRC}/man/mmc.1 ${STAGEDIR}${PREFIX}/man/man1

maintainer-fetch:
	@${MAKE} clean
	@${MKDIR} ${WRKSRC}
	@git clone ${MMC_GITURL} ${WRKSRC}
	@cd ${WRKSRC} && git reset --hard ${DISTVERSIONSUFFIX:S|^-||}
	@${TAR} -cyf ${_DISTDIR:S|/$||}/${DISTFILES:M${PORTNAME}-*} \
		-C ${WRKSRC}/.. --exclude .git* .
	@${MAKE} makesum
	@${MAKE} clean

.include <bsd.port.mk>