From owner-freebsd-questions@freebsd.org Mon Jul 4 16:58:26 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25D77B9125A for ; Mon, 4 Jul 2016 16:58:26 +0000 (UTC) (envelope-from solene@perso.pw) Received: from bsd.zplay.eu (perso.pw [62.210.240.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "bsd.zplay.eu", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 921492F20 for ; Mon, 4 Jul 2016 16:58:25 +0000 (UTC) (envelope-from solene@perso.pw) Received: from bsd.zplay.eu (localhost [127.0.0.1]) by bsd.zplay.eu (OpenSMTPD) with ESMTP id 43bb1de1; Mon, 4 Jul 2016 18:51:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=perso.pw; h=in-reply-to :references:mime-version:content-type:content-transfer-encoding :subject:from:date:to:message-id; s=selector1; bh=t5HfXZ8DiR3W4Y 5bXiSCyotlTXs=; b=wXzD3LwqRN6FV6x8/o86zqoJGgCaaCNT5rQD/eeROeesMT yqulk4VlbItQz8+Z74MRVaPJ1aBAXD2VqlaeA0jSBM/xYi5woAu7hj9EkVYyGtLH 7+EUFPQHXb7I+FQT8aA/CPhqfJwJi5zbYD/6W5JE/dGxnW8jIl6edUQnTN4/g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=perso.pw; h=in-reply-to :references:mime-version:content-type:content-transfer-encoding :subject:from:date:to:message-id; q=dns; s=selector1; b=Pnx2iECa n/7C98H80FXGoW1lj98uJZDkOPxapqVhymUPZn2TZBXK+dhUcf4WhDiJyUxwUn3A I1qflZMX3JfcM3zUO3QJbTYvVzRPGgfwNEDvz1fFGKtoZHpQfMYs2nb9Rc6BNbwX HUxkOkT9rOOZkFX4Fw4dXzrR8yg9/TvdagI= Received: from [100.122.173.87] (80.215.171.176 [80.215.171.176]) by bsd.zplay.eu (OpenSMTPD) with ESMTPSA id ca3692c4 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO; Mon, 4 Jul 2016 18:51:40 +0200 (CEST) User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Subject: Re: Getting port version From: Solene Rapenne Date: Mon, 04 Jul 2016 18:51:34 +0200 To: Baho Utot ,freebsd-questions@freebsd.org Message-ID: <66FB5016-EC67-40C5-B084-5431FBB5D110@perso.pw> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jul 2016 16:58:26 -0000 Hello I am not sure but maybe you can find a tool for building packages in ports-mgmt ? I was thinking about portmaster for example. Kind regards Le 4 juillet 2016 18:23:30 GMT+02:00, Baho Utot a écrit : >I am creating a bourne script ( I would use python but that is not in >base ) to build packages. > >Synth, poudiere etc will not work, this is for a raspberry pi 2 and >those tools don't run on the platform > >I need to get the port version from the port > > 1. so I can construct a string and have a look see if that port >is already in the repository > > 2. I want to know what version I am building > >I have tried: > >#!/bin/sh > >for a in "dns/unbound ports-mgmt/pkg lang/perl5.20" ; do > VERSION="$( grep PORTVERSION= /usr/ports/${a}/Makefile )" > > printf "Package: %s Version: %s\n" "${a}" "${VERSION##*=}" > >done > > >That fails because all ports don't follow that, for instance: > > lang/perl5.20 has PORTVERSION= ${PERL_VERSION} > > ports-mgmt/pkg has DISTVERSION= > >Is there some other way I can fetch the version from the Makefile? > > > >_______________________________________________ >freebsd-questions@freebsd.org mailing list >https://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to >"freebsd-questions-unsubscribe@freebsd.org"