From owner-freebsd-emulation@FreeBSD.ORG Thu Mar 16 15:25:36 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 A4BB216A42C for ; Thu, 16 Mar 2006 15:25:36 +0000 (UTC) (envelope-from bsam@ns.kfs.ru) Received: from ns.kfs.ru (kfs.kfs.ru [62.183.117.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DC8843DAF for ; Thu, 16 Mar 2006 15:25:25 +0000 (GMT) (envelope-from bsam@ns.kfs.ru) Received: from bsam by ns.kfs.ru with local (Exim 4.54 (FreeBSD)) id 1FJuLr-0000sE-6p for freebsd-emulation@FreeBSD.org; Thu, 16 Mar 2006 18:25:23 +0300 To: freebsd-emulation@FreeBSD.org From: Boris Samorodov Date: Thu, 16 Mar 2006 18:25:23 +0300 Message-ID: <39907788@serv3.int.kfs.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: "Boris B. Samorodov" Cc: Subject: [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 15:25:36 -0000 --=-=-= Hi! Many of the linux ports doesn't deal with the source files. The proposed patch to bsd.linux-rpm.mk resolve this problem. Only the source distname must be added to the port's distfile. All fetching is made automagically at FreeBSD portbuilding server farm. Note: the patch may fetch only single source file. Well, the majority of the linux ports match this rule... Comments are welcome. 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 Wed Jan 25 20:41:34 2006 +++ bsd.linux-rpm.mk Thu Mar 16 17:30:47 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 @@ -36,6 +37,8 @@ MASTER_SITES?= ${MASTER_SITE_FEDORA_LINUX} MASTER_SITE_SUBDIR?= 3/${LINUX_RPM_ARCH}/os/Fedora/RPMS/ PKGNAMEPREFIX?= linux- +DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} +DIST_SUBDIR?= rpm EXTRACT_DEPENDS+= ${RPM2CPIO}:${PORTSDIR}/archivers/rpm @@ -85,6 +108,24 @@ ${FIND} * ! type d | ${SORT} > ${PLIST}.new; \ ${FIND} -d * -type d | ${SED} -e 's|^|@dirrm |' >> ${PLIST}.new; \ done +. endif + +# GPL insists on having sources along with binary packages +# Source distribution files *must* be defined at the port's distfile +# to build package at FreeBSD build package servers +# +# XXX Change me: +# this code works only for ports with single src file! +# For multiple src files one should use the same technique, +# define DISTFILES at the port's Makefile and define +# AUTO_LINUX_SRC= no + +AUTO_LINUX_SRC?= yes + +. if defined(PACKAGE_BUILDING) && ${AUTO_LINUX_SRC} == "yes" +DISTFILES+= ${DISTNAME}${SRC_SUFX} +MASTER_SITE_SUBDIR+= 3/SRPMS +ALWAYS_KEEP_DISTFILES= yes . endif .endif --=-=-=--