aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/mldonkey-serverspy/Makefile
blob: 1702e55a429f79e2e4ec1963d100710ac4a1e527 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# New ports collection makefile for:    MLDonkey Server Spy
# Date created:             Fri Feb 21 14:47:25 UTC 2003
# Whom:         Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   mldonkey
PORTVERSION=    1.2
PORTREVISION=   4
CATEGORIES= net-p2p perl5
MASTER_SITES=   http://freebsd.unixfreunde.de/sources/
PKGNAMESUFFIX=  -serverspy
DISTNAME=   mlservspy-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    MLDonkey Server Spy broadcasts your whereabouts on the eDonkey network

DEPRECATED= No more public distfiles
EXPIRATION_DATE=    2011-09-01

RUN_DEPENDS=    \
    ${SITE_PERL}/${PERL_ARCH}/Image/Magick.pm:${PORTSDIR}/graphics/ImageMagick \
    ${SITE_PERL}/${PERL_ARCH}/auto/TimeDate:${PORTSDIR}/devel/p5-TimeDate \
    ${SITE_PERL}/AppConfig.pm:${PORTSDIR}/devel/p5-AppConfig \
    ${SITE_PERL}/Net/FTP.pm:${PORTSDIR}/net/p5-Net

LICENSE=    GPLv2

USE_PERL5=  yes
NO_BUILD=   yes

BINARY_NAME=    mlservspy.pl
CONFIG_NAME=    mlservspy.ini
IMAGE_NAME= mlservspy.jpg
DATA_FILES= mlservspy.ini mlservspy.jpg

post-patch:
# point to correct perl path
    @${PERL} -pi -e \
        's|/usr/bin/perl|${PERL}|' \
        ${WRKSRC}/${BINARY_NAME}
# comment and change default path
# remove needless spaces in line ends
    @${PERL} -pi -e \
        's|^(path).*$$|#\1=~/.mldonkey-serverspy/|; \
        s|[\s\t]+\n$$|\n|' \
        ${WRKSRC}/mlservspy.ini

post-configure:
    @${SED} \
        -e 's|%%PREFIX%%|${PREFIX}|' \
        -e 's|%%CONFIG%%|${CONFIG_NAME}|' \
        -e 's|%%IMAGE%%|${IMAGE_NAME}|' \
        ${FILESDIR}/wrapper.sh > ${WRKDIR}/wrapper.sh

do-install:
.ifndef(NOPORTDOCS)
    @${MKDIR} ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
    @${CHMOD} 0755 ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
    @${INSTALL_DATA} ${WRKSRC}/README.txt \
        ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
.endif
# install data files (images, sample configuration, etc)
    @${MKDIR} ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
.for file in ${DATA_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${file} \
        ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
.endfor
# install script
    @${INSTALL_SCRIPT} ${WRKSRC}/${BINARY_NAME} \
        ${PREFIX}/bin/${BINARY_NAME}-real
    @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh \
        ${PREFIX}/bin/${BINARY_NAME}

.include <bsd.port.mk>