aboutsummaryrefslogtreecommitdiffstats
path: root/security/pgp/Makefile
blob: 163431b2719def052a28d8981dc879773cc947e8 (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
77
78
79
80
# New ports collection makefile for: pgp
# Version required:     MIT 2.6.2 / International 2.6.3ia
# International PGP homepage is http://www.ifi.uio.no/pgp/
#
# Date created:         8 Jul 1995
# Whom:                 ache
#
# $FreeBSD$
#

# Pick an initial default, else it doesn't get set in the INDEX.
DISTNAME=   pgp262s
CATEGORIES= security

MAINTAINER= ache@FreeBSD.org

# Need to define USA_RESIDENT to YES or NO
IS_INTERACTIVE= YES
RESTRICTED=     "Crypto"
MAKEFILE=       makefile
ALL_TARGET=     freebsd-${MACHINE_ARCH} OS_CFLAGS="${CFLAGS}"
PGPLIB=         ${PREFIX}/lib/pgp
MAN1=       pgp.1

do-install:
    cd ${WRKSRC}; install -c -o bin -g bin -m 555 pgp ${PREFIX}/bin
    cd ${WRKSRC}/../doc; \
          install -c -o bin -g bin -m 444 pgp.1 ${PREFIX}/man/man1
    -${MKDIR} ${PGPLIB}
    ${CHMOD} 555 ${PGPLIB}
    cd ${WRKSRC}/..; \
        install -c -o bin -g bin -m 444 pgp.hlp \
                  doc/pgpdoc1.txt doc/pgpdoc2.txt ${PGPLIB}; \
        [ -f ${PGPLIB}/language.txt ] || \
              install -c -o bin -g bin -m 444 language.txt ${PGPLIB}; \
        [ -f ${PGPLIB}/config.txt ] || \
              install -c -o bin -g bin -m 444 config.txt ${PGPLIB}
    -${PREFIX}/bin/pgp > /dev/null  2>&1  # update .idx file

.if !defined(USA_RESIDENT) || ${USA_RESIDENT} != YES && ${USA_RESIDENT} != NO
pre-fetch:
    @${ECHO_MSG}
    @${ECHO_MSG} You must set variable USA_RESIDENT to YES, if you are USA resident
    @${ECHO_MSG} or to NO, if you aren\'t USA resident to build this package
    @${FALSE}
.elif defined(USA_RESIDENT)
.if ${USA_RESIDENT} == YES
DISTNAME=       pgp262s
PKGNAME=    pgp-2.6.2
MASTER_SITES=   ftp://utopia.hacktic.nl/pub/replay/pub/pgp/unix/ \
        ftp://sable.ox.ac.uk/pub/crypto/pgp/unix/
WRKSRC=         ${WRKDIR}/src
BUILD_DEPENDS+= gmake:${PORTSDIR}/devel/gmake
LIB_DEPENDS+=   rsaref.2:${PORTSDIR}/security/rsaref
USE_ZIP=    yes
FILESDIR=       ${.CURDIR}/files.usa
PATCHDIR=       ${.CURDIR}/patches.usa

post-extract:
    cd ${WRKDIR}; $(EXTRACT_CMD) $(EXTRACT_BEFORE_ARGS) -aa $(DISTNAME)i \
        $(EXTRACT_AFTER_ARGS)
    cd ${WRKDIR}; ${RM} -f *.zip

.else
DISTNAME=       pgp263is
PKGNAME=        pgp-2.6.3ia
MASTER_SITES=   ftp://ftp.ifi.uio.no/pub/pgp/2.x/src/ \
        ftp://ftp.kiarchive.ru/pub/unix/crypto/pgp/
WRKSRC=         ${WRKDIR}/src
FILESDIR=       ${.CURDIR}/files.non_usa
PATCHDIR=       ${.CURDIR}/patches.non_usa

post-extract:
    cd ${WRKDIR}; $(TAR) -xf pgp263ii.tar; \
        ${RM} -f pgp263ii.tar

.endif
.endif

.include <bsd.port.mk>