# OpenBSD makefile for: pgp # Version required: # Date created: 19 Mar 1998 # Whom: marc@OpenBSD.ORG # # $OpenBSD: Makefile,v 1.8 1999/04/02 19:44:01 espie Exp $ # for patch-list NEED_VERSION=1.52 DISTNAME= pgp263is PKGNAME= pgp-2.6.3 CATEGORIES= security NO_CDROM= "CRYPTO: Third party crypto not allowed." MASTER_SITES= ftp://ftp.ifi.uio.no/pub/pgp/2.x/src/ \ ftp://ftp.dk.pgpi.com/mirrors/ftp.ifi.uio.no/pub/pgp/2.x/src/ MAINTAINER= ports@openbsd.org RESTRICTED= "Crypto; export-controlled" IS_INTERACTIVE= YES WRKSRC= ${WRKDIR}/src # Need to add rsaref for US residents # .if defined(NO_WARNINGS) || (defined(USA_RESIDENT) && ${USA_RESIDENT} == YES) MASTER_SITES= \ ftp://ftp.ifi.uio.no/pub/pgp/2.x/src/ \ ftp://ftp.dk.pgpi.com/mirrors/ftp.ifi.uio.no/pub/pgp/2.x/src/ \ ftp://nic.funet.fi/pub/crypt/mirrors/ftp.dsi.unimi.it/applied-crypto/ \ ftp://idea.dsi.unimi.it/pub/security/crypt/math/ DISTFILES= \ ${DISTNAME}${EXTRACT_SUFX} \ rsaref2.tar.gz .endif .if !defined(NO_WARNINGS) fetch-depends: .if !defined(USA_RESIDENT) || ${USA_RESIDENT} != YES && ${USA_RESIDENT} != NO @${ECHO} @${ECHO} You must set variable USA_RESIDENT to YES if you are a USA @${ECHO} resident or NO otherwise. USA residents must obtain the @${ECHO} RSAREF2 library to generate this program. \(RSA Inc. holds @${ECHO} a patent on RSA in the USA - using RSA implementations @${ECHO} other than RSAREF in the USA will violate the US patent\). @${ECHO} "" @${ECHO} RSAREF2 will be automatically obtained and used to generate @${ECHO} this program when given the command \"make USA_RESIDENT=YES\" @${ECHO} "" @${FALSE} .endif .endif # 2nd level extract required # post-extract: @if ! ( cd ${WRKDIR} && ${EXTRACT_CMD} -xf pgp263ii.tar ); then \ exit 1; \ fi # common C flags # CFLAGS= -O2 -DUNIX -DPORTABLE -DMERIT -DIDEA32 -DMAX_NAMELEN=255 \ -DPGP_DOC_DIR=\\\"${PGP_DOC_DIR}\\\" # RSAREF parameters # .if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES RSAOBJS= rsaglue2.o RSADIR= ../rsaref2 RSAINCDIR= -I$(RSADIR)/source -I$(RSADIR)/test RSALIBDIR= $(RSADIR)/install/unix RSALIBS= $(RSALIBDIR)/rsaref.a CFLAGS+= -DUSA ${RSAINCDIR} .else RSAOBJS= rsaglue1.o .endif # RSAREF2 doesn't work as is when sizeof( long) != 4 -- fix it # PATCH_LIST=patch-doc .if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES PATCH_LIST+=patch-rsaref2 .else .endif # Before the build figure out if we are on a big endian machine or not # pre-build: @echo "#include " > ${WRKDIR}/.endian.c @echo "BYTE_ORDER" >> ${WRKDIR}/.endian.c @${CC} -E ${WRKDIR}/.endian.c > ${WRKDIR}/.endian.out @if { grep -q 4321 ${WRKDIR}/.endian.out; } then \ echo -DHIGHFIRST > ${WRKDIR}/.endian; \ else \ ${CP} /dev/null ${WRKDIR}/.endian; \ fi PGP_DOC_DIR=${PREFIX}/share/doc/pgp # Build rsaref (if USA) then pgp # do-build: .if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES @(cd ${WRKDIR}/rsaref2/install/unix && \ ${SETENV} ${MAKE_ENV} ${MAKE} -f makefile rsaref.a) .endif @(cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${MAKE} -f makefile all \ RSAOBJS="${RSAOBJS}" RSADIR="${RSADIR}" RSAINCDIR="${RSAINCDIR}" \ RSALIBDIR="${RSALIBDIR}" RSALIBS="${RSALIBS}" \ CFLAGS="${CFLAGS} `cat ${WRKDIR}/.endian`" ) # library and doc files to install # LIBFILES= config.txt de.hlp en.hlp es.hlp fr.hlp keys.asc \ language.txt pgp.hlp DOCFILES= appnote.doc blurb.txt changes.doc faq.txt keyserv.doc \ mitlicen.txt pgformat.doc pgp262i.dif pgp263i.dif \ pgp_vms.hlp pgpdoc1.txt pgpdoc2.txt politic.doc przon26i.asc # install pgp and related doc # do-install: @${INSTALL_PROGRAM} ${WRKSRC}/pgp ${PREFIX}/bin @${INSTALL_MAN} ${WRKDIR}/doc/pgp.1 ${PREFIX}/man/man1 @${MKDIR} -p ${PREFIX}/lib/pgp .for libfile in ${LIBFILES} @${INSTALL_DATA} ${WRKDIR}/${libfile} ${PREFIX}/lib/pgp .endfor @${MKDIR} -p ${PGP_DOC_DIR} @${INSTALL_DATA} ${WRKDIR}/setup.doc ${PGP_DOC_DIR} .for docfile in ${DOCFILES} @${INSTALL_DATA} ${WRKDIR}/doc/${docfile} ${PGP_DOC_DIR} .endfor .include