2001-04-09 04:36:47 +02:00
|
|
|
# $NetBSD: Makefile,v 1.35 2001/04/09 02:36:47 fredb Exp $
|
1999-04-30 17:19:13 +02:00
|
|
|
#
|
|
|
|
|
2001-03-01 14:57:53 +01:00
|
|
|
DISTNAME= openssl-0.9.5a
|
1999-04-30 17:19:13 +02:00
|
|
|
CATEGORIES= security
|
2000-07-24 13:11:16 +02:00
|
|
|
MASTER_SITES= ftp://ftp.openssl.org/source/ \
|
|
|
|
ftp://ftp.uni-trier.de/pub/unix/security/openssl/
|
1999-04-30 17:19:13 +02:00
|
|
|
|
1999-05-24 22:39:35 +02:00
|
|
|
MAINTAINER= packages@netbsd.org
|
1999-04-30 17:19:13 +02:00
|
|
|
HOMEPAGE= http://www.openssl.org/
|
2001-02-17 18:42:09 +01:00
|
|
|
COMMENT= Secure Socket Layer and cryptographic library
|
1999-04-30 17:19:13 +02:00
|
|
|
|
2001-04-09 04:36:47 +02:00
|
|
|
BUILD_DEPENDS+= perl-5.*:../../lang/perl5
|
|
|
|
|
2001-02-27 19:21:25 +01:00
|
|
|
CONFLICTS= SSLeay-* ssleay-* base64-*
|
1999-04-30 17:19:13 +02:00
|
|
|
|
Reorganize crypto handling, as discussed on tech-pkg. Remove all
RESTRICTED= variables that were predicated on former U.S. export
regulations. Add CRYPTO=, as necessary, so it's still possible to
exclude all crypto packages from a build by setting MKCRYPTO=no
(but "lintpkgsrc -R" will no longer catch them).
Specifically,
- - All packages which set USE_SSL just lose their RESTRICTED
variable, since MKCRYPTO responds to USE_SSL directly.
- - realplayer7 and ns-flash keep their RESTRICTED, which is based
on license terms, but also gain the CRYPTO variable.
- - srp-client is now marked broken, since the distfile is evidently
no longer available. On this, we're no worse off than before.
[We haven't been mirroring the distfile, or testing the build!]
- - isakmpd gets CRYPTO for RESTRICTED, but remains broken.
- - crack loses all restrictions, as it does not evidently empower
a user to utilize strong encryption (working definition: ability
to encode a message that requires a secret key plus big number
arithmetic to decode).
2000-09-09 21:40:14 +02:00
|
|
|
CRYPTO= YES
|
2000-08-19 00:46:29 +02:00
|
|
|
|
2000-10-10 13:42:15 +02:00
|
|
|
# supplies IDEA/RC5
|
|
|
|
LICENCE= fee-based-commercial-use
|
|
|
|
|
2000-12-28 22:35:34 +01:00
|
|
|
# matches what's in `Configure' (except sparc64)
|
|
|
|
ONLY_FOR_PLATFORM= NetBSD-*-alpha NetBSD-*-arm32 NetBSD-*-i386 \
|
1999-06-20 23:06:17 +02:00
|
|
|
NetBSD-*-m68k NetBSD-*-mips NetBSD-*-mipseb \
|
1999-08-24 09:46:41 +02:00
|
|
|
NetBSD-*-mipsel NetBSD-*-ns32k NetBSD-*-powerpc \
|
2000-05-10 14:28:37 +02:00
|
|
|
NetBSD-*-sparc NetBSD-*-vax \
|
|
|
|
SunOS-*
|
1999-04-30 17:19:13 +02:00
|
|
|
|
1999-11-25 19:51:47 +01:00
|
|
|
CONFIGURE_ARGS= -fPIC -DPIC --openssldir=${PREFIX} --prefix=${PREFIX} \
|
|
|
|
${LDFLAGS}
|
2001-01-14 02:52:23 +01:00
|
|
|
CONFIGURE_ENV= CC="${CC}"
|
2000-05-10 14:28:37 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
PATCHDIR= ${WRKDIR}/.patches
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
1999-04-30 17:19:13 +02:00
|
|
|
MAKE_ENV= LD_LIBRARY_PATH=${WRKSRC} MAKELIB=${FILESDIR}/makelib
|
2000-05-10 14:28:37 +02:00
|
|
|
.endif
|
1999-04-30 17:19:13 +02:00
|
|
|
|
2001-01-17 11:46:30 +01:00
|
|
|
.if ${OPSYS} == "SunOS"
|
|
|
|
PATCH_SUM_FILE= ${FILESDIR}/patch-sum.solaris
|
|
|
|
.endif
|
|
|
|
|
2000-05-10 14:28:37 +02:00
|
|
|
PLIST_SRC= ${WRKDIR}/.PLIST_SRC
|
1999-11-26 20:14:56 +01:00
|
|
|
|
2000-05-10 14:28:37 +02:00
|
|
|
.if ${OPSYS} == "NetBSD" && !exists(/usr/libexec/ld.elf_so) && !exists(/usr/libexec/ld.so)
|
2000-08-21 23:01:29 +02:00
|
|
|
IGNORE= ${PKGNAME} requires shared object support
|
1999-04-30 17:19:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(USE_RSAREF2) && ${USE_RSAREF2} == YES
|
1999-12-16 13:03:20 +01:00
|
|
|
DEPENDS= rsaref-2.0p3:../../security/rsaref
|
1999-11-25 19:51:47 +01:00
|
|
|
CONFIGURE_ARGS+= rsaref
|
2000-05-10 14:28:37 +02:00
|
|
|
PLIST_RSAREF= ${PKGDIR}/PLIST.rsaref
|
1999-04-30 17:19:13 +02:00
|
|
|
.endif
|
|
|
|
|
2000-05-10 14:28:37 +02:00
|
|
|
pre-patch:
|
|
|
|
${MKDIR} ${WRKDIR}/.patches
|
|
|
|
@${CP} ${.CURDIR}/patches/patch-* ${WRKDIR}/.patches
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
2001-04-05 15:57:14 +02:00
|
|
|
for FILE in ${.CURDIR}/patches/patch_netbsd-*; do \
|
2000-05-12 08:10:35 +02:00
|
|
|
${CP} $$FILE ${PATCHDIR}/patch-$${FILE##*-}; \
|
2000-05-10 14:28:37 +02:00
|
|
|
done
|
|
|
|
.endif
|
|
|
|
|
1999-04-30 17:19:13 +02:00
|
|
|
# The Perl stuff doesn't work yet (nor did it work properly in SSLeay...)
|
|
|
|
do-configure:
|
2000-08-27 04:46:03 +02:00
|
|
|
@cd ${WRKSRC} && ${PERL5} util/perlpath.pl ${LOCALBASE}/bin
|
1999-04-30 17:19:13 +02:00
|
|
|
@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./config ${CONFIGURE_ARGS}
|
2000-08-27 04:46:03 +02:00
|
|
|
# @cd ${WRKSRC}/perl && ${SETENV} ${CONFIGURE_ENV} ${PERL5} Makefile.PL
|
1999-04-30 17:19:13 +02:00
|
|
|
|
|
|
|
#post-build:
|
|
|
|
# @cd ${WRKSRC}/perl && ${MAKE}
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/apps/openssl ${PREFIX}/bin/
|
|
|
|
@cd ${PREFIX}/bin && \
|
|
|
|
for file in asn1parse base64 bf bf-cbc bf-cfb bf-ecb bf-ofb ca \
|
|
|
|
cast cast-cbc cast5-cbc cast5-cfb cast5-ecb cast5-ofb ciphers crl \
|
|
|
|
crl2pkcs7 des des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb \
|
|
|
|
des-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb \
|
|
|
|
des-ofb des3 desx dgst dh dsa dsaparam enc errstr gendh gendsa \
|
|
|
|
genrsa idea idea-cbc idea-cfb idea-ecb idea-ofb md2 mdc2 nseq \
|
1999-11-25 19:51:47 +01:00
|
|
|
pkcs12 pkcs7 pkcs8 rc2 rc2-cbc rc2-cfb rc2-ecb rc2-ofb rc4 rc5 \
|
|
|
|
rc5-cbc rc5-cfb rc5-ecb rc5-ofb req rmd160 rsa s_client s_server \
|
|
|
|
s_time sess_id sha sha1 speed verify version x509; do \
|
2001-02-20 19:04:17 +01:00
|
|
|
${RM} -f $$file ; \
|
1999-04-30 17:19:13 +02:00
|
|
|
${LN} -sf openssl $$file; \
|
|
|
|
done
|
|
|
|
cd ${WRKSRC}/tools && ${INSTALL_SCRIPT} \
|
|
|
|
c_hash c_info c_issuer c_name c_rehash ${PREFIX}/bin/
|
|
|
|
${SED} -e s,/usr/local,${PREFIX}, ${WRKSRC}/apps/der_chop >${WRKDIR}/der_chop && \
|
|
|
|
${INSTALL_SCRIPT} ${WRKDIR}/der_chop ${PREFIX}/bin/
|
|
|
|
cd ${WRKSRC}/apps && ${INSTALL_SCRIPT} CA.sh CA.pl ${PREFIX}/bin/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/apps/openssl.cnf ${PREFIX}/etc/openssl.cnf.example
|
2000-05-10 14:28:37 +02:00
|
|
|
cd ${WRKSRC} && ${INSTALL_DATA} libcrypto.a libssl.a ${PREFIX}/lib/
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
2001-03-24 04:55:15 +01:00
|
|
|
cd ${WRKSRC} && ${INSTALL_DATA} libcrypto.so.1.0 libssl.so.1.0 ${PREFIX}/lib/
|
|
|
|
.if ${OBJECT_FMT} == "ELF"
|
|
|
|
.for shared_lib in libcrypto.so.1.0 libssl.so.1.0
|
|
|
|
cd ${PREFIX}/lib && ${LN} -s ${shared_lib} ${shared_lib:R} && \
|
|
|
|
${LN} -s ${shared_lib} ${shared_lib:R:R}
|
|
|
|
.endfor
|
|
|
|
.endif
|
2000-05-10 14:28:37 +02:00
|
|
|
.endif
|
2000-02-12 15:08:29 +01:00
|
|
|
.if exists(/usr/bin/ranlib)
|
|
|
|
/usr/bin/ranlib ${PREFIX}/lib/libcrypto.a
|
|
|
|
/usr/bin/ranlib ${PREFIX}/lib/libssl.a
|
|
|
|
.endif
|
1999-11-26 20:14:56 +01:00
|
|
|
.if defined(USE_RSAREF2) && ${USE_RSAREF2} == YES
|
|
|
|
# libRSAglue.a is only useful if you are using the RSAREF2 library.
|
|
|
|
cd ${WRKSRC} && ${INSTALL_DATA} libRSAglue.a ${PREFIX}/lib/
|
|
|
|
.endif
|
1999-04-30 17:19:13 +02:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/include/openssl
|
1999-11-25 19:51:47 +01:00
|
|
|
cd ${WRKSRC}/include/openssl && \
|
|
|
|
for file in \
|
|
|
|
asn1.h asn1_mac.h bio.h blowfish.h bn.h buffer.h cast.h comp.h conf.h \
|
|
|
|
crypto.h des.h dh.h dsa.h e_os.h e_os2.h ebcdic.h err.h evp.h hmac.h \
|
|
|
|
idea.h lhash.h md2.h md5.h mdc2.h objects.h opensslconf.h opensslv.h \
|
|
|
|
pem.h pem2.h pkcs12.h pkcs7.h rand.h rc2.h rc4.h rc5.h ripemd.h rsa.h \
|
|
|
|
safestack.h sha.h ssl.h ssl2.h ssl23.h ssl3.h stack.h tls1.h tmdiff.h \
|
|
|
|
txt_db.h x509.h x509_vfy.h x509v3.h ; do \
|
1999-04-30 17:19:13 +02:00
|
|
|
${INSTALL_DATA} $$file ${PREFIX}/include/openssl/; \
|
|
|
|
done
|
|
|
|
# @cd ${WRKSRC}/perl && ${MAKE} install
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/openssl
|
2000-04-21 04:15:37 +02:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/openssl/apps
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/openssl/crypto
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/openssl/ssl
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/apps/* \
|
|
|
|
${PREFIX}/share/doc/openssl/apps/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/crypto/* \
|
|
|
|
${PREFIX}/share/doc/openssl/crypto/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/ssl/* \
|
|
|
|
${PREFIX}/share/doc/openssl/ssl/
|
|
|
|
for file in README c-indentation.el openssl.txt openssl_button.gif \
|
|
|
|
openssl_button.html ssleay.txt ; do \
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/$$file \
|
|
|
|
${PREFIX}/share/doc/openssl/; \
|
|
|
|
done
|
2000-05-10 14:28:37 +02:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/certs
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/private
|
1999-04-30 17:19:13 +02:00
|
|
|
@if [ ! -f ${PREFIX}/etc/openssl.cnf ]; then \
|
|
|
|
${CP} -p ${PREFIX}/etc/openssl.cnf.example ${PREFIX}/etc/openssl.cnf; \
|
|
|
|
fi
|
|
|
|
|
2000-05-10 14:28:37 +02:00
|
|
|
post-install:
|
|
|
|
${CAT} ${PKGDIR}/PLIST.common ${PKGDIR}/PLIST.${LOWER_OPSYS} \
|
|
|
|
${PLIST_RSAREF} > ${PLIST_SRC}
|
|
|
|
|
1999-04-30 17:19:13 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|
|
|
|
|
|
|
|
test: all
|
2001-03-24 04:55:15 +01:00
|
|
|
@cd ${WRKSRC}/test && ${SETENV} LD_LIBRARY_PATH=${WRKSRC} \
|
|
|
|
MAKELIB=${FILESDIR}/makelib ${MAKE} tests
|
1999-04-30 17:19:13 +02:00
|
|
|
@${ECHO} "*** Tests successful. ***"
|