Subject: Re: Opera update: no more banners
To: Roland Illig <rillig@NetBSD.org>
From: Geert Hendrickx <geert.hendrickx@ua.ac.be>
List: tech-pkg
Date: 09/22/2005 16:16:08
On Thu, Sep 22, 2005 at 01:36:01PM +0200, Roland Illig wrote:
> Geert Hendrickx wrote:
> >On Wed, Sep 21, 2005 at 09:29:46AM +0200, Ignatios Souvatzis wrote:
> >
> >>On Wed, Sep 21, 2005 at 07:56:41AM +0200, Geert Hendrickx wrote:
> >>
> >>
> >>>Can you update pkgsrc/licenses/opera-license too?  The new license was
> >>>attached to my original mail.  
> >>
> >>I feel this is the wrong thing to do. Instead, put the new one into
> >>pkgsrc/licenses/new-opera-license, and make the new pkg version refer to
> >>that one.
> >
> >
> >I was thinking about this too.  This makes the users aware of the change.
> >But I'd prefer free-opera-license as a more meaningful name.  
> 
> And I would prefer to put single-package licenses into the package 
> directory, either as category/package/LICENSE or as 
> category/package/files/LICENSE.
> 
> The appended patch introduces a new variable LICENSE_FILE which serves 
> exactly this purpose.
> 
> Roland

> Index: bsd.pkg.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
> retrieving revision 1.1719
> diff -u -p -r1.1719 bsd.pkg.mk
> --- bsd.pkg.mk	16 Sep 2005 06:09:02 -0000	1.1719
> +++ bsd.pkg.mk	22 Sep 2005 11:33:01 -0000
> @@ -3945,19 +3945,20 @@ print-summary-data:
>  	@${ECHO} "prefix ${PKGPATH} ${PREFIX}"
>  .endif
>  
> +LICENSE_FILE?=		${PKGSRCDIR}/licenses/${LICENSE}
> +
>  .if !target(show-license)
>  show-license show-licence:
> -	@if [ "${LICENSE}" != "" ]; then				\
> -		if ${TEST} -f ${PKGSRCDIR}/licenses/${LICENSE}; then	\
> -			if [ "${PAGER}" != "" ]; then			\
> -				${PAGER} ${PKGSRCDIR}/licenses/${LICENSE};\
> -			else						\
> -				${CAT} ${PKGSRCDIR}/licenses/${LICENSE};\
> -			fi						\
> -		else							\
> -			${ECHO} "Generic ${LICENSE} information not available"; \
> -			${ECHO} "See the package description (pkg_info -d ${PKGNAME}) for more information."; \
> -		fi							\
> +	@license=${LICENSE:Q};						\
> +	license_file=${LICENSE_FILE:Q};					\
> +	pager=${PAGER:Q};						\
> +	case "$$pager" in "") pager=${CAT:Q};; esac;			\
> +	case "$$license" in "") exit 0;; esac;				\
> +	if ${TEST} -f "$$license_file"; then				\
> +		$$pager "$$license_file";				\
> +	else								\
> +		${ECHO} "Generic $$license information not available";	\
> +		${ECHO} "See the package description (pkg_info -d ${PKGNAME}) for more information."; \
>  	fi
>  .endif
>