From owner-freebsd-audit Mon Jun 17 13: 5:22 2002 Delivered-To: freebsd-audit@freebsd.org Received: from leviathan.inethouston.net (leviathan.inethouston.net [66.64.12.249]) by hub.freebsd.org (Postfix) with ESMTP id 3D1C637B400; Mon, 17 Jun 2002 13:05:09 -0700 (PDT) Received: by leviathan.inethouston.net (Postfix, from userid 1001) id AE7553198E1; Mon, 17 Jun 2002 15:00:41 -0500 (CDT) Date: Mon, 17 Jun 2002 15:00:41 -0500 From: "David W. Chapman Jr." To: audit@freebsd.org Cc: ports@freebsd.org Subject: Early work on making bsd.port.mk like kmod Message-ID: <20020617200041.GF17783@leviathan.inethouston.net> Reply-To: "David W. Chapman Jr." Mail-Followup-To: audit@freebsd.org, ports@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline X-Operating-System: FreeBSD 4.5-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This is my first attempt any any type of shell scripting or bsd.port.mk work so take that into consideration when you review. This is just the early phase of making bsd.port.mk like kmod ports and does not have anything fancy, its more for concept right now. I would like to see if anyone agrees with the approach I'm taking right now and suggestions are welcome. -- David W. Chapman Jr. dwcjr@inethouston.net Raintree Network Services, Inc. dwcjr@freebsd.org FreeBSD Committer --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bsd.port.mk.patch" Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.414 diff -u -r1.414 bsd.port.mk --- bsd.port.mk 13 Jun 2002 18:20:40 -0000 1.414 +++ bsd.port.mk 17 Jun 2002 19:58:05 -0000 @@ -527,6 +527,9 @@ # when you noticed the distfile you just fetched has # a different checksum and you intend to verify if # the port still works with it. +# Not sure where this should go, so here is a good start +# USE_KMOD - Port uses kernel sources to build. +# KMOD_DIR - Directory for kmod files to be installed to. # Start of pre-makefile section. .if !defined(AFTERPORTMK) @@ -781,6 +784,17 @@ #RESTRICTED= "Contains cryptography." .endif +.if defined(USE_KMOD) +.if !exists(/usr/src/sys/Makefile) +BROKEN= "Kernel source files required" +.endif +.if ${OSVERSION} >= 500000 +KMOD_DIR?= /boot/kernel +.else +KMOD_DIR?= /modules +.endif +.endif + .if defined(EMACS_PORT_NAME) .include "${PORTSDIR}/Mk/bsd.emacs.mk" .endif @@ -3310,6 +3324,9 @@ @>${TMPPLIST} @for man in ${__MANPAGES}; do \ ${ECHO_CMD} $${man} >> ${TMPPLIST}; \ + done + @for kmod in ${INSTALL_KMOD}; do \ + ${ECHO_CMD} @unexec ${RM} ${KMOD_DIR}/`${BASENAME} $$kmod` >> ${TMPPLIST}; \ done .for _PREFIX in ${PREFIX} .if ${_TMLINKS:M${_PREFIX}*}x != x --oyUTqETQ0mS9luUI-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message