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
>Organization:
>Environment:
System: NetBSD asrock.chizhovka.net 5.1 NetBSD 5.1 (GENERIC) #0: Mon Jan 31
23:53:52 EET 2011
cheusov%asrock.chizhovka.net@localhost:/srv/obj/sys/arch/amd64/compile/GENERIC
amd64
Architecture: x86_64
Machine: amd64
>Description:
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
wm/fvwm:PKG_OPTIONS.fvwm=-gtk~-rplay
wm/fvwm:PKG_OPTIONS.fvwm=-gtk'
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
wm/fvwm:PKG_OPTIONS.fvwm=-gtk~-rplay,FILEBASE=fvwm%mini
wm/fvwm:PKG_OPTIONS.fvwm=-gtk,FILEBASE=fvwm%nogtk'
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
>Fix:
Index: mk/flavor/pkg/package.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/flavor/pkg/package.mk,v
retrieving revision 1.20
diff -u -r1.20 package.mk
--- mk/flavor/pkg/package.mk 9 Feb 2010 23:02:13 -0000 1.20
+++ mk/flavor/pkg/package.mk 8 Mar 2011 12:01:01 -0000
@@ -11,7 +11,8 @@
. endif
.endif
PKG_SUFX?= .tgz
-PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
+FILEBASE?= ${PKGBASE}
+PKGFILE?= ${PKGREPOSITORY}/${FILEBASE}-${PKGVERSION}${PKG_SUFX}
PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR}
PKGREPOSITORYSUBDIR?= All
Home |
Main Index |
Thread Index |
Old Index