aboutsummaryrefslogtreecommitdiffstats
path: root/ports-mgmt/pkg_cutleaves/Makefile
blob: 2dd7c0e513781aa1a296af0f76626c2e09e1c294 (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
51
52
53
54
55
56
57
58
59
60
61
# New ports collection makefile for:    pkg_cutleaves
# Date created:     27 July 2003
# Whom:         Stefan Walter <sw@gegenunendlich.de>
#
# $FreeBSD$
#
# This port is self contained in the src directory.
#

PORTNAME=   pkg_cutleaves
PORTVERSION=    20040207
CATEGORIES= sysutils
MASTER_SITES=   # none
DISTFILES=  # none

MAINTAINER= sw@gegenunendlich.de
COMMENT=    Interactive script for deinstalling 'leaf' packages

RUN_DEPENDS=    ${LOCALBASE}/sbin/pkg_deinstall:${PORTSDIR}/sysutils/portupgrade

NO_BUILD=   yes
USE_PERL5=  yes
USE_REINPLACE=  yes

SRC=        ${.CURDIR}/src

MAN1=       pkg_cutleaves.1

PLIST_FILES=    sbin/pkg_cutleaves

do-fetch:
    @${DO_NADA}

pre-patch:
    @${CP} ${SRC}/pkg_cutleaves ${WRKDIR}/pkg_cutleaves
    @${CP} ${SRC}/pkg_cutleaves.1 ${WRKDIR}/pkg_cutleaves.1

post-patch:
    @${REINPLACE_CMD} -e \
      's,/usr/local/etc/pkg_leaves.exclude,${PREFIX}/etc/pkg_leaves.exclude,' \
      ${WRKDIR}/pkg_cutleaves.1
    @${REINPLACE_CMD} -e \
      's,/usr/local/etc/pkg_leaves.exclude,${PREFIX}/etc/pkg_leaves.exclude,' \
      ${WRKDIR}/pkg_cutleaves
    @${REINPLACE_CMD} -e \
      's,/usr/local/sbin/pkg_deinstall,${LOCALBASE}/sbin/pkg_deinstall,' \
      ${WRKDIR}/pkg_cutleaves
    @${REINPLACE_CMD} -e \
      's,/usr/local/sbin/pkgdb,${LOCALBASE}/sbin/pkgdb,' \
      ${WRKDIR}/pkg_cutleaves
    @${REINPLACE_CMD} -e \
      's,/var/db/pkg,${PKG_DBDIR},' \
      ${WRKDIR}/pkg_cutleaves
    @${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \
      ${WRKDIR}/pkg_cutleaves

do-install:
    ${INSTALL_SCRIPT} ${WRKDIR}/pkg_cutleaves ${PREFIX}/sbin/pkg_cutleaves
    ${INSTALL_MAN} ${WRKDIR}/pkg_cutleaves.1 ${MAN1PREFIX}/man/man1

.include <bsd.port.mk>