pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44698: Alternative PKGFILE [patch]

>Number:         44698
>Category:       pkg
>Synopsis:       Alternative PKGFILEs [patch]
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 08 12:10:00 +0000 2011
>Originator:     Aleksey Cheusov
>Release:        NetBSD 5.1
System: NetBSD 5.1 NetBSD 5.1 (GENERIC) #0: Mon Jan 31 
23:53:52 EET 2011 
Architecture: x86_64
Machine: amd64
With minor fixes my bulk build tool wip/distbb provides a way to build
the same package with different options in one bulk build. The
following command

  distbb -p 'wm/fvwm

builds fvwm package in 3 different way: with default options, with
-gtk option and with -gtk -rplay options. The problem here is that all
three binaries have the same file name. So, the result of such bulk
build is unpredictable.

Unfortunately the only way to change the file name for the binary is
to change PKGNAME. I consider this way ugly and dangerous. Patch below
provides new variable FILEBASE overridable by user.  With this patch
applied the following command builds 3 fvwm packages normally.

  distbb -p 'wm/fvwm

Of course it can also be used when packages are build manually.

   cd /usr/pkgsrc/wm/fvwm
   make package PKG_OPTIONS.fvwm='-gtk -rplay' FILEBASE=fvwm%mini

Index: mk/flavor/pkg/
RCS file: /cvsroot/pkgsrc/mk/flavor/pkg/,v
retrieving revision 1.20
diff -u -r1.20
--- mk/flavor/pkg/    9 Feb 2010 23:02:13 -0000       1.20
+++ mk/flavor/pkg/    8 Mar 2011 12:01:01 -0000
@@ -11,7 +11,8 @@
 .  endif
 PKG_SUFX?=             .tgz
+FILEBASE?=             ${PKGBASE}

Home | Main Index | Thread Index | Old Index