Skip to content

Commit

Permalink
Change how Kerberos support is enabled in pkgsrc.
Browse files Browse the repository at this point in the history
Quick guide for compiling packages:
- set KERBEROS=4 or KERBEROS=5 in /etc/mk.conf

Quick guide for configuring Kerberos support in a package Makefile:
- test for KERBEROS value and enable the appropriate version with
  CONFIGURE_ARGS or other means and set USE_KERBEROS=yes
- make sure to disable Kerberos support otherwise (especially if
  using configure, which might automatically detect it)
- BUILD_DEFS and RESTRICTED are set automatically in bsd.pkg.mk
  when USE_KERBEROS=yes is set
  • Loading branch information
kim committed Sep 14, 1999
1 parent 488402e commit f4d3f50
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 60 deletions.
11 changes: 5 additions & 6 deletions databases/openldap/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.11 1999/09/10 10:41:39 hwr Exp $
# $NetBSD: Makefile,v 1.12 1999/09/14 02:32:21 kim Exp $
#

DISTNAME= openldap-1.2.7
Expand All @@ -23,14 +23,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--enable-dns --enable-cldap \
--enable-wrappers --enable-passwd --enable-shell

BUILD_DEFS+= USE_KERBEROS4

.include "../../mk/bsd.prefs.mk"

.if !defined(USE_KERBEROS4)
CONFIGURE_ARGS+=--without-kerberos
.if defined(KERBEROS) && ${KERBEROS} == 4
USE_KERBEROS= yes
CONFIGURE_ARGS+=--with-kerberos
.else
RESTRICTED= uses Kerberos encryption code
CONFIGURE_ARGS+=--without-kerberos
.endif

.include "../../mk/bsd.pkg.mk"
10 changes: 6 additions & 4 deletions devel/cvs-current/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 1999/09/13 14:01:29 kim Exp $
# $NetBSD: Makefile,v 1.4 1999/09/14 02:32:22 kim Exp $
#

DISTNAME= cvs-1.10.6
Expand All @@ -11,17 +11,19 @@ HOMEPAGE= http://www.cyclic.com/cvs/info.html
GNU_CONFIGURE= yes
USE_GTEXINFO= yes

BUILD_DEFS+= USE_KERBEROS4 USE_KERBEROS5 RCS_LOCALID
BUILD_DEFS+= RCS_LOCALID

.include "../../mk/bsd.prefs.mk"

.if defined(USE_KERBEROS4)
.if defined(KERBEROS) && ${KERBEROS} == 4
USE_KERBEROS= yes
CONFIGURE_ARGS+= --with-krb4=/usr --enable-encryption
.else
CONFIGURE_ARGS+= --with-krb4=no
.endif

.if defined(USE_KERBEROS5)
.if defined(KERBEROS) && ${KERBEROS} == 5
USE_KERBEROS= yes
CONFIGURE_ARGS+= --with-gssapi
.else
CONFIGURE_ARGS+= --with-gssapi=no
Expand Down
10 changes: 6 additions & 4 deletions devel/cvs/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.22 1999/08/18 09:04:17 agc Exp $
# $NetBSD: Makefile,v 1.23 1999/09/14 02:32:23 kim Exp $
#

DISTNAME= cvs-1.10
Expand All @@ -11,17 +11,19 @@ HOMEPAGE= http://www.cyclic.com/cvs/info.html
GNU_CONFIGURE= yes
USE_GTEXINFO= yes

BUILD_DEFS+= USE_KERBEROS4 USE_KERBEROS5 RCS_LOCALID
BUILD_DEFS+= RCS_LOCALID

.include "../../mk/bsd.prefs.mk"

.if defined(USE_KERBEROS4)
.if defined(KERBEROS) && ${KERBEROS} == 4
USE_KERBEROS= yes
CONFIGURE_ARGS+= --with-krb4=/usr --enable-encryption
.else
CONFIGURE_ARGS+= --with-krb4=no
.endif

.if defined(USE_KERBEROS5)
.if defined(KERBEROS) && ${KERBEROS} == 5
USE_KERBEROS= yes
CONFIGURE_ARGS+= --with-gssapi
.else
CONFIGURE_ARGS+= --with-gssapi=no
Expand Down
22 changes: 10 additions & 12 deletions mail/cyrus/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# $NetBSD: Makefile,v 1.6 1999/08/18 09:28:02 agc Exp $
# $NetBSD: Makefile,v 1.7 1999/09/14 02:32:23 kim Exp $

DISTNAME= cyrus-imapd-v1.5.14
CATEGORIES= mail
MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
DISTNAME= cyrus-imapd-v1.5.14
CATEGORIES= mail
MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/

MAINTAINER= kim@tac.nyc.ny.us
MAINTAINER= kim@tac.nyc.ny.us

DEPENDS+= tcl-8.0.5:../../lang/tcl80
DEPENDS+= tcl-8.0.5:../../lang/tcl80

GNU_CONFIGURE= yes
GNU_CONFIGURE= yes

# XXX This package is not ready for general use!
# XXX I've imported it because my work on it has
Expand All @@ -24,15 +24,13 @@ CONFIGURE_ARGS+= --with-statedir=/var/run
CONFIGURE_ARGS+= --includedir=${LOCALBASE}/include/tcl8.0
CONFIGURE_ARGS+= --enable-netscapehack

BUILD_DEFS+= USE_KERBEROS4

.include "../../mk/bsd.prefs.mk"

.if defined(USE_KERBEROS4)
.if defined(KERBEROS) && ${KERBEROS} == 4
USE_KERBEROS= yes
CONFIGURE_ARGS+= --with-login=krb
RESTRICTED= uses Kerberos encryption code
.endif

.include "../../mk/bsd.pkg.mk"

PKGNAME!= ${ECHO} "${DISTNAME}" | ${SED} -e 's/-imapd-v/-/'
PKGNAME!= ${ECHO} "${DISTNAME}" | ${SED} -e 's/-imapd-v/-/'
11 changes: 7 additions & 4 deletions mail/fetchmail/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.52 1999/09/03 22:00:52 tron Exp $
# $NetBSD: Makefile,v 1.53 1999/09/14 02:32:24 kim Exp $
#

DISTNAME= fetchmail-5.0.7
Expand All @@ -15,14 +15,17 @@ BUILD_DEPENDS+= ${LOCALBASE}/bin/autoconf:../../devel/autoconf
GNU_CONFIGURE= yes
CONFIGURE_ENV= LDFLAGS="${CFLAGS}"

BUILD_DEFS+= USE_KERBEROS4 USE_INET6
BUILD_DEFS+= USE_INET6

.include "../../mk/bsd.prefs.mk"

.if defined(USE_KERBEROS4)
.if defined(KERBEROS) && ${KERBEROS} == 4
USE_KERBEROS= yes
CONFIGURE_ARGS+=--with-kerberos=yes
RESTRICTED= uses Kerberos encryption code
.else
CONFIGURE_ARGS+=--with-kerberos=no
.endif

.if defined(USE_INET6) && ${USE_INET6} == YES
CONFIGURE_ARGS+=--enable-inet6
.endif
Expand Down
10 changes: 6 additions & 4 deletions mail/nmh/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.28 1999/08/20 14:05:15 enami Exp $
# $NetBSD: Makefile,v 1.29 1999/09/14 02:32:24 kim Exp $
# FreeBSD Id: Makefile,v 1.2 1997/08/04 06:51:28 markm Exp
#

Expand Down Expand Up @@ -35,14 +35,16 @@ CONFIGURE_ARGS+= --with-editor=${NMH_EDITOR}
CONFIGURE_ARGS+= --with-pager=${NMH_PAGER}
.endif

.if defined(USE_KERBEROS4)
.if defined(KERBEROS) && ${KERBEROS} == 4
USE_KERBEROS= yes
CONFIGURE_ARGS+=--with-krb4=yes
RESTRICTED= uses Kerberos encryption code
.else
CONFIGURE_ARGS+=--with-krb4=no
.endif

DOCDIR= share/doc/nmh

BUILD_DEFS+= USE_KERBEROS4 NMH_MTA NMH_EDITOR NMH_PAGER NMH_HASH_BACKUP
BUILD_DEFS+= NMH_MTA NMH_EDITOR NMH_PAGER NMH_HASH_BACKUP

# Since we patch the autoconf files as well as their outputs, avoid attempt
# to regenerate header input files with 'autoheader' by Makefile.
Expand Down
7 changes: 6 additions & 1 deletion mk/bsd.pkg.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.mk,v 1.337 1999/09/09 02:01:21 hubertf Exp $
# $NetBSD: bsd.pkg.mk,v 1.338 1999/09/14 02:32:24 kim Exp $
#
# This file is in the public domain.
#
Expand Down Expand Up @@ -97,6 +97,11 @@ GMAKE?= gmake
MAKE_PROGRAM= ${MAKE}
.endif

.if defined(USE_KERBEROS)
RESTRICTED?= uses Kerberos encryption code
BUILD_DEFS+= KERBEROS
.endif

.if defined(USE_PERL5)
DEPENDS+= perl-5.00404:${PKGSRCDIR}/lang/perl5
.endif
Expand Down
20 changes: 10 additions & 10 deletions mk/mk.conf.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: mk.conf.example,v 1.73 1999/09/07 14:55:37 jlam Exp $
# $NetBSD: mk.conf.example,v 1.74 1999/09/14 02:32:25 kim Exp $
#

# Sample /etc/mk.conf file, which can be used to set specific values
Expand Down Expand Up @@ -241,6 +241,12 @@
# Possible: not defined, british
# Default: not defined

#KERBEROS= # Used in many packages to specify use of
# a Kerberos (or compatible) subsystem.
# Requires Kerberos libraries in /usr/lib.
# Possible: 4, 5, not defined
# Default: not defined

#LIBWRAP_FWD= # Used in ssh package to make libwrap also
# compare against forwarded connection attempts
# Possible: not defined, YES
Expand Down Expand Up @@ -337,10 +343,9 @@ PAPERSIZE= A4 # Default paper size for packages.
# Possible: YES, or NO.
# Default: NO

#USE_KERBEROS4= # Used in many packages to specify use of
# Kerberos 4 (or a compatible) subsystem.
# Requires Kerberos libraries in /usr/lib.
# Possible: defined, not defined
#USE_INET6= # Enable IPv6 support on certain packages.
# Use IPv6-ready kernel if you define this.
# Possible: not defined, YES
# Default: not defined

#USE_INN= # Used in trn and nn to specify use of
Expand Down Expand Up @@ -393,11 +398,6 @@ PAPERSIZE= A4 # Default paper size for packages.
# Possible: defined, not defined
# Default: not defined

#USE_INET6= # Enable IPv6 support on certain packages.
# Use IPv6-ready kernel if you define this.
# Possible: not defined, YES
# Default: not defined

#
# Overrides for faster or cheaper sites.
#
Expand Down
8 changes: 3 additions & 5 deletions net/radius/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.12 1999/08/18 09:28:02 agc Exp $
# $NetBSD: Makefile,v 1.13 1999/09/14 02:32:26 kim Exp $
#
# Tempted to install another radius package?
#
Expand Down Expand Up @@ -31,14 +31,12 @@ MAKE_ENV+= RADLIBS="${RADLIBS} -lskey" LIBS=-lcrypt \
INSTALL="${INSTALL} -c"

# XXX Kerberos IV support is known to be broken.
#.if defined(USE_KERBEROS4)
#.if defined(KERBEROS) && ${KERBEROS} == 4
#USE_KERBEROS= yes
#CFLAGS+= -DM_KERB -I/usr/include/kerberosIV
#RADLIBS= -lkrb -ldes
#RESTRICTED= uses Kerberos encryption code
#.endif

BUILD_DEFS+= USE_KERBEROS4

.include "../../mk/bsd.prefs.mk"

pre-patch:
Expand Down
10 changes: 5 additions & 5 deletions net/zephyr/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.16 1999/08/18 09:28:02 agc Exp $
# $NetBSD: Makefile,v 1.17 1999/09/14 02:32:26 kim Exp $
#

DISTNAME= zephyr-2.0.4
Expand All @@ -8,14 +8,14 @@ MASTER_SITES= ftp://athena-dist.mit.edu/pub/ATHENA/zephyr/dist/
MAINTAINER= mycroft@netbsd.org
HOMEPAGE= http://web.mit.edu/olh/Zephyr/index.html

BUILD_DEFS+= USE_KERBEROS4

.include "../../mk/bsd.prefs.mk"

.if defined(USE_KERBEROS4)
.if defined(KERBEROS) && ${KERBEROS} == 4
USE_KERBEROS= yes
CONFIGURE_ARGS+="--with-krb4"
CONFIGURE_ENV+= CPPFLAGS=-I/usr/include/kerberosIV
RESTRICTED= uses Kerberos encryption code
.else
CONFIGURE_ARGS+="--without-krb4"
.endif

USE_X11= yes
Expand Down
14 changes: 9 additions & 5 deletions security/sudo/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.17 1999/09/13 13:30:45 kim Exp $
# $NetBSD: Makefile,v 1.18 1999/09/14 02:32:26 kim Exp $
# FreeBSD Id: Makefile,v 1.9 1997/11/12 03:24:41 obrien Exp
#

Expand All @@ -15,8 +15,6 @@ BUILD_DEPENDS+= ${LOCALBASE}/bin/autoconf:../../devel/autoconf

.include "../../mk/bsd.prefs.mk"

BUILD_DEFS+= USE_KERBEROS4 USE_KERBEROS5

GNU_CONFIGURE= yes

.if ${OPSYS} == "NetBSD"
Expand All @@ -25,12 +23,18 @@ CONFIGURE_ARGS+=--with-skey
CONFIGURE_ARGS+=--without-skey
.endif

.if defined(USE_KERBEROS4)
.if defined(KERBEROS) && ${KERBEROS} == 4
USE_KERBEROS= yes
CONFIGURE_ARGS+=--with-kerb4
.else
CONFIGURE_ARGS+=--without-kerb4
.endif

.if defined(USE_KERBEROS5)
.if defined(KERBEROS) && ${KERBEROS} == 5
USE_KERBEROS= yes
CONFIGURE_ARGS+=--with-kerb5
.else
CONFIGURE_ARGS+=--without-kerb5
.endif

CONFIGURE_ARGS+=--with-C2 --with-nbsdops --disable-path-info
Expand Down

0 comments on commit f4d3f50

Please sign in to comment.