Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2006 23:23:03 +0300
From:      Boris Samorodov <bsam@ipt.ru>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: [patch] for bsd.linux-rpm.mk (add auto sources fetching)
Message-ID:  <61349928@ho.ipt.ru>
In-Reply-To: <20060316181625.41102cfd@Magellan.Leidinger.net> (Alexander Leidinger's message of "Thu, 16 Mar 2006 18:16:25 %2B0100")
References:  <39907788@serv3.int.kfs.ru> <20060316181625.41102cfd@Magellan.Leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=

On Thu, 16 Mar 2006 18:16:25 +0100 Alexander Leidinger wrote:
> Am Thu, 16 Mar 2006 18:25:23 +0300
> schrieb Boris Samorodov <bsam@ipt.ru>:

> > +.  if defined(PACKAGE_BUILDING) && ${AUTO_LINUX_SRC} == "yes"
> > +DISTFILES+=		${DISTNAME}${SRC_SUFX}
> > +MASTER_SITE_SUBDIR+=	3/SRPMS
> > +ALWAYS_KEEP_DISTFILES=	yes
> >  .  endif

> You are assuming this will only be used for some specific directory
> layouts without the possibility to override this. I suggest to
> introduce an overridable variable... maybe MASTER_SITE_SRC_SUBDIR or
> whatever which will be added to MASTER_SITE_SUBDIR then. 

> Maybe you can change the patch to have a look at a SRC_DISTFILES
> variable and add this content to the DISTFILES in the PACKAGE_BUILDING
> case instead of hardcoding one file.

Agreed to both. New patch is attached.

If auto fetching go well, then variable AUTO_LINUX_SRC may be
deletted. But for now it may be used if something go wrong with auto
fetching.


WBR
-- 
Boris B. Samorodov, Research Engineer
InPharmTech Co,     http://www.ipt.ru
Telephone & Internet Service Provider

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=patch
Content-Description: patch for bsd.linux-rpm.mk

--- bsd.linux-rpm.mk.orig	Thu Mar 16 22:13:54 2006
+++ bsd.linux-rpm.mk	Thu Mar 16 23:05:48 2006
@@ -12,6 +12,7 @@
 RPM2CPIO?=			${LOCALBASE}/bin/rpm2cpio
 
 EXTRACT_SUFX?=		.${LINUX_RPM_ARCH}.rpm
+SRC_SUFX?=		.src.rpm
 
 USE_LINUX?=			yes
 USE_LINUX_PREFIX=	yes
@@ -35,8 +36,18 @@
 
 MASTER_SITES?=			${MASTER_SITE_FEDORA_LINUX}
 MASTER_SITE_SUBDIR?=	3/${LINUX_RPM_ARCH}/os/Fedora/RPMS/
+MASTER_SITE_SRC_SUBDIR?=	3/SRPMS updates/3/SRPMS
 PKGNAMEPREFIX?=			linux-
 
+# DISTFILES and SRC_DISTFILES assume that there is only one bindist
+# and one src file exists.
+# Please, define them at the port's Makefile in case
+# the assumption is not true.
+
+DISTFILES?=		${DISTNAME}${EXTRACT_SUFX}
+SRC_DISTFILES?=		${DISTNAME}${SRC_SUFX}
+DIST_SUBDIR?=		rpm
+
 EXTRACT_DEPENDS+=		${RPM2CPIO}:${PORTSDIR}/archivers/rpm
 
 EXTRACT_CMD?=			${RPM2CPIO}
@@ -85,6 +116,17 @@
 		${FIND} * ! type d | ${SORT} > ${PLIST}.new; \
 		${FIND} -d * -type d | ${SED} -e 's|^|@dirrm |' >> ${PLIST}.new; \
 	done
+.  endif
+
+# Source distribution files must be defined at the port's distfiles
+# to build package at FreeBSD build package servers
+
+AUTO_LINUX_SRC?=	yes
+
+.  if defined(PACKAGE_BUILDING) && ${AUTO_LINUX_SRC} == "yes"
+DISTFILES+=		${SRC_DISTFILES}
+MASTER_SITE_SUBDIR+=	${MASTER_SITE_SRC_SUBDIR}
+ALWAYS_KEEP_DISTFILES=	yes
 .  endif
 
 .endif

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61349928>