From owner-freebsd-ports Thu Sep 12 0:13:34 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1297937B400 for ; Thu, 12 Sep 2002 00:13:30 -0700 (PDT) Received: from wwweasel.geeksrus.net (wwweasel.geeksrus.net [64.8.210.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 487FC43E6A for ; Thu, 12 Sep 2002 00:13:29 -0700 (PDT) (envelope-from alane@wwweasel.geeksrus.net) Received: from wwweasel.geeksrus.net (alane@localhost [127.0.0.1]) by wwweasel.geeksrus.net (8.12.6/8.12.6) with ESMTP id g8C7CokZ094263; Thu, 12 Sep 2002 03:12:50 -0400 (EDT) (envelope-from alane@wwweasel.geeksrus.net) Received: (from alane@localhost) by wwweasel.geeksrus.net (8.12.6/8.12.6/Submit) id g8C7CohP094262; Thu, 12 Sep 2002 03:12:50 -0400 (EDT) (envelope-from alane) Date: Thu, 12 Sep 2002 03:12:50 -0400 From: Alan E To: Marcus vA Cc: freebsd-ports@FreeBSD.ORG Subject: Re: creation of a dynamic pkg-plist Message-ID: <20020912071250.GC87610@wwweasel.geeksrus.net> Reply-To: alane@geeksrus.net References: <20020912071354.23986b26.mva121@gmx.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="uQr8t48UFsdbeI+V" Content-Disposition: inline In-Reply-To: <20020912071354.23986b26.mva121@gmx.net> X-message-flag: Magic 8-Ball says "Outlook not so good." I'll ask it about Exchange next. User-Agent: Mutt/1.5.1i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --uQr8t48UFsdbeI+V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 12, 2002 at 07:13:54AM +0200, Marcus vA wrote: >Hello, > >I hope, I've got the right list for this. > >I would like to know how I can create a kind of dynamic pkg-plist, which >depends on some values the user will give to the make target. Well, the biggest hurdle is that you can't write to the port directory. Same problem with making a dynamic pkg-message. However, there is a way to do it. I did a simple example with the port of invitation_to_ruby. I've attached the Makefile. -- Alan Eldridge Unix/C(++) IT Pro, 20 yrs, seeking new employment. (http://wwweasel.geeksrus.net/~alane/resume.txt) KDE, KDE-FreeBSD Teams (http://www.kde.org, http://freebsd.kde.org/) --uQr8t48UFsdbeI+V Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=Makefile # ex:ts=8 # # New ports collection makefile for: invitation_to_ruby # Date created: 2002/08/28 # Whom: Alan Eldridge # # $FreeBSD$ # PORTNAME= invitation_to_ruby PORTVERSION= 1.0.0 #PORTEPOCH= CATEGORIES= devel MASTER_SITES= ftp://ftp.one.net/pub/users/jweirich/talks/ #MASTER_SITE_SUBDIR= #PKGNAMEPREFIX= #PKGNAMESUFFIX= DISTNAME= invitationtoruby EXTRACT_SUFX= .tgz #DISTFILES= #DIST_SUBDIR= ${PKGNAMEPREFIX}${PORTNAME} #EXTRACT_ONLY= MAINTAINER= ports@geeksrus.net NO_BUILD= yes PLIST= ${WRKDIR}/plist CPIO?= /usr/bin/cpio SORT?= /usr/bin/sort .include pre-install: ${RM} -f ${PLIST} ${ECHO_CMD} "@comment files" >> ${PLIST} cd ${WRKSRC}; ${FIND} . -type f | cut -c2- \ | ${SED} 's|^|${DOCSDIR:S,${PREFIX}/,,}|' \ | ${SORT} >> ${PLIST} ${ECHO_CMD} "@comment directories" >> ${PLIST} cd ${WRKSRC}; ${FIND} . -type d | cut -c2- \ | ${SED} 's|^|@dirrm ${DOCSDIR:S,${PREFIX}/,,}|' \ | ${SORT} -r >> ${PLIST} do-install: ${RM} -fr ${DOCSDIR} ${MKDIR} ${DOCSDIR} cd ${WRKSRC}; find . | ${CPIO} -pdmv -R ${DOCOWN}:${DOCGRP} ${DOCSDIR} ${CHMOD} -R ugo-w,ugo+rX ${DOCSDIR} .include #EOF --uQr8t48UFsdbeI+V-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message