From owner-freebsd-emulation@FreeBSD.ORG Thu Mar 16 20:26:38 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A52E16A422 for ; Thu, 16 Mar 2006 20:26:38 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from mail.ipt.ru (mail.ipt.ru [80.253.10.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D5F943D48 for ; Thu, 16 Mar 2006 20:26:37 +0000 (GMT) (envelope-from bsam@ipt.ru) Received: from bsam by ipt.ru with local (Exim 4.60 (FreeBSD)) (envelope-from ) id 1FJyzv-0000jq-Dz; Thu, 16 Mar 2006 23:23:03 +0300 To: Alexander Leidinger References: <39907788@serv3.int.kfs.ru> <20060316181625.41102cfd@Magellan.Leidinger.net> From: Boris Samorodov Date: Thu, 16 Mar 2006 23:23:03 +0300 In-Reply-To: <20060316181625.41102cfd@Magellan.Leidinger.net> (Alexander Leidinger's message of "Thu, 16 Mar 2006 18:16:25 +0100") Message-ID: <61349928@ho.ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: freebsd-emulation@freebsd.org Subject: Re: [patch] for bsd.linux-rpm.mk (add auto sources fetching) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 20:26:38 -0000 --=-=-= On Thu, 16 Mar 2006 18:16:25 +0100 Alexander Leidinger wrote: > Am Thu, 16 Mar 2006 18:25:23 +0300 > schrieb Boris Samorodov : > > +. 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 --=-=-=--