From owner-freebsd-ports@FreeBSD.ORG Tue Nov 18 04:28:08 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F990AB6 for ; Tue, 18 Nov 2014 04:28:08 +0000 (UTC) Received: from mx.waitman.net (mx.waitman.net [136.0.16.173]) by mx1.freebsd.org (Postfix) with ESMTP id E4388957 for ; Tue, 18 Nov 2014 04:28:07 +0000 (UTC) Received: by mx.waitman.net (Postfix, from userid 2) id 5BC23435A8; Mon, 17 Nov 2014 12:37:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waitman.net; s=default; t=1416256622; bh=0O8iN2b4FjVYXZKz5uHpA2lilf1il8BxsYgzyf6YV+Q=; h=In-Reply-To:References:Date:Subject:From:To:Cc:Reply-To; b=a1KX7Nun81kiUxwzK/DlCxtb0FtSD58XkOfzw5N1iyNhhCUYfsThdnwV98L+hIcxA 8/Ia7UQ/QxO6azetlvS2q6QyidDkJj9H4fmnFIs/yIqcicCzdYq57sqRavv6rnK6Fh w31Wko/tHq/044c8jvZKl0AY4BdrpzfFgND6ssm0= Received: from 70.90.171.37 by mx.waitman.net with HTTP; Mon, 17 Nov 2014 12:37:02 -0800 Message-ID: In-Reply-To: <7db681007f95ef2c174fad49ea4a1e1a.squirrel@mx.waitman.net> References: <20141118033110.GX24601@funkthat.com> <7db681007f95ef2c174fad49ea4a1e1a.squirrel@mx.waitman.net> Date: Mon, 17 Nov 2014 12:37:02 -0800 Subject: Re: help w/ port just installing files... From: "Waitman Gobble" To: waitman@waitman.net Reply-To: waitman@waitman.net User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: ports@freebsd.org, John-Mark Gurney X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 04:28:08 -0000 On Mon, November 17, 2014 12:14 pm, Waitman Gobble wrote: > > On Mon, November 17, 2014 7:31 pm, John-Mark Gurney wrote: > >> So, I'm trying to get a port that will install the NIST's KAT vectors >> so I can write a test program using them... >> >> I don't know what is the best way to handle plist creation and >> installation. I have this Makefile so far: # Created by: John-Mark >> Gurney >> >> # $FreeBSD$ >> >> >> >> PORTNAME= nist-kat >> DISTVERSION= 1.0 >> CATEGORIES= security >> >> >> >> MAINTAINER= jmg@FreeBSD.org >> COMMENT= Collection of NIST's Know Answer Test Vectors >> >> >> >> #LICENSE= PUBLICDOMAIN >> >> >> >> BASE_URL= http://csrc.nist.gov/groups/STM/cavp/documents >> MASTER_SITES= ${BASE_URL}/aes/:aes >> MASTER_SITES+= ${BASE_URL}/des/:des >> MASTER_SITES+= ${BASE_URL}/mac/:mac >> >> >> >> DISTFILES= KAT_AES.zip:aes >> DISTFILES+= XTSTestVectors.zip:aes >> DISTFILES+= KAT_TDES.zip:des >> DISTFILES+= gcmtestvectors.zip:mac >> DISTFILES+= hmactestvectors.zip:mac >> >> >> >> # We want each dist file in it's own subdir >> EXTRACT_CMD= mkdir $${file%.zip}; ${TAR} >> EXTRACT_AFTER_ARGS=-C $${file%.zip} >> >> >> >> NO_BUILD= >> NO_WRKSUBDIR= >> >> >> >> do-install: >> mkdir -p ${PREFIX}/share/nist-kat && \ cp -Rp ${WRKSRC}/ >> ${PREFIX}/share/nist-kat >> >> >> >> .include >> >> >> >> But the cp command copies more than I want, including the staging dir. >> >> >> >> Does someone know an easier way to do this? >> >> >> >> Thanks. >> >> >> >> -- >> John-Mark Gurney Voice: +1 415 225 5579 >> >> >> >> "All that I will do, has been done, All that I have, has not." >> _______________________________________________ >> freebsd-ports@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-ports >> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" >> >> >> > > > I tested this, it seems to work. But it installs everything in > /usr/local/share/nist-kat without sub-directories. (if you want that?) > > > There's no need to create the directory under /usr/local/share... > > > 'make deinstall' also removes all the rsp files, which is good i think. > > > do-install: > cd ${WRKSRC}/KAT_AES && ${COPYTREE_SHARE} . ${DOCSDIR} && \ cd > ${WRKSRC}/XTSTestVectors && ${COPYTREE_SHARE} . ${DOCSDIR} && \ > cd ${WRKSRC}/KAT_TDES && ${COPYTREE_SHARE} . ${DOCSDIR} && \ cd > ${WRKSRC}/gcmtestvectors && ${COPYTREE_SHARE} . ${DOCSDIR} && \ > cd ${WRKSRC}/hmactestvectors && ${COPYTREE_SHARE} . ${DOCSDIR} > > > > > -- > Waitman Gobble > Los Altos California USA > +1.510-830-7975 > > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > > OOPs, jumped the gun. It's putting in /usr/local/share/doc. If you want in /usr/local/share/${PORT_NAME} then use ${DATADIR} Also, it's not removing them on make deinstall, I was looking in the wrong place. :( if you want them in sub-directories.. do-install: mkdir -p ${DATADIR}/KAT_AES && \ mkdir -p ${DATADIR}/XTSTestVectors && \ mkdir -p ${DATADIR}/KAT_TDES && \ mkdir -p ${DATADIR}/gcmtestvectors && \ mkdir -p ${DATADIR}/hmactestvectors && \ cd ${WRKSRC}/KAT_AES && ${COPYTREE_SHARE} . ${DATADIR}/KAT_AES && \ cd ${WRKSRC}/XTSTestVectors && ${COPYTREE_SHARE} . ${DATADIR}/XTSTestVectors && \ cd ${WRKSRC}/KAT_TDES && ${COPYTREE_SHARE} . ${DATADIR}/KAT_TDES && \ cd ${WRKSRC}/gcmtestvectors && ${COPYTREE_SHARE} . ${DATADIR}/gcmtestvectors && \ cd ${WRKSRC}/hmactestvectors && ${COPYTREE_SHARE} . ${DATADIR}/hmactestvectors -- Waitman Gobble Los Altos California USA +1.510-830-7975