aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/swapexd/Makefile
blob: 08dee419769b620c96429f147404084c0a98328b (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
# Created by: Jesse Smith
# $FreeBSD$

PORTNAME=   swapexd
PORTVERSION=    0.4
CATEGORIES= sysutils
MASTER_SITES=   http://makeapbi.sourceforge.net/${PORTNAME}/

MAINTAINER= jessefrgsmith@yahoo.ca
COMMENT=    Tool for growing and shrinking on-disk swap space

WRKSRC= ${WRKDIR}/${PORTNAME}

PLIST_FILES=    sbin/${PORTNAME} etc/rc.d/swapexd "@sample etc/swapexd.conf.sample"

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/rc.d/swapexd
    @${REINPLACE_CMD} -e "s,/etc/,${PREFIX}/etc/,g" ${WRKSRC}/swapexd.h
.if ${OSVERSION} < 800076
    @${REINPLACE_CMD} -e "s,swapctl -s -m ,swapctl -s -h ,g" ${WRKSRC}/swapexd.c
.endif

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin/
    ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
    ${INSTALL_SCRIPT} ${WRKSRC}/rc.d/swapexd ${STAGEDIR}${PREFIX}/etc/rc.d

.include <bsd.port.post.mk>