Date: Thu, 12 Sep 2002 03:12:50 -0400 From: Alan E <alane@geeksrus.net> To: Marcus vA <mva121@gmx.net> Cc: freebsd-ports@FreeBSD.ORG Subject: Re: creation of a dynamic pkg-plist Message-ID: <20020912071250.GC87610@wwweasel.geeksrus.net> In-Reply-To: <20020912071354.23986b26.mva121@gmx.net> References: <20020912071354.23986b26.mva121@gmx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <ports@geeksrus.net> # # $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 <bsd.port.pre.mk> 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 <bsd.port.post.mk> #EOF --uQr8t48UFsdbeI+V-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020912071250.GC87610>