summaryrefslogtreecommitdiff
path: root/sysutils/linrename/Makefile
blob: 8aa2d64187fefeed6bb016b20526244b35cb7057 (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
# Created by: Jonathan Liu <Net147@hotmail.com>
# $FreeBSD$

PORTNAME=	linrename
PORTVERSION=	2.22.2
CATEGORIES=	sysutils
#MASTER_SITES=	KERNEL_ORG/linux/utils/util-linux/v${PORTVERSION}
MASTER_SITES=	http://ftp.ntu.edu.tw/ftp/linux/%SUBDIR%/ \
		http://ftp.sunet.se/pub/Linux/kernel.org/linux/%SUBDIR%/ \
		http://kernel.org/pub/linux/%SUBDIR%/ \
		${MASTER_SITE_RINGSERVER:S,%SUBDIR%,linux/kernel.org/&,}
MASTER_SITE_SUBDIR=	utils/util-linux/v${PORTVERSION:R}
DISTNAME=	util-linux-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Rename multiple files using substitution

BUILD_WRKSRC=	${WRKSRC}/misc-utils
INSTALL_WRKSRC=	${WRKSRC}/misc-utils

USE_XZ=		yes

CPPFLAGS+=	-I../include \
		-DHAVE_DIRFD -DHAVE_ERR_H -DHAVE_LANGINFO_H -DHAVE_LOCALE_H \
		-DPACKAGE_STRING=\"util-linux\ ${PORTVERSION}\"

MAN1=		${PORTNAME}.1
PLIST_FILES=	bin/${PORTNAME}

post-patch:
	${LN} -sf rename.1 ${BUILD_WRKSRC}/${PORTNAME}.1

do-build:
	(cd ${BUILD_WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o ${PORTNAME} \
		rename.c ${LDFLAGS})

do-install:
	(cd ${INSTALL_WRKSRC} \
		&& ${INSTALL_PROGRAM} ${PORTNAME} ${PREFIX}/bin \
		&& ${INSTALL_MAN} ${PORTNAME}.1 ${MANPREFIX}/man/man1)

.include <bsd.port.mk>