From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) by dpdk.org (Postfix) with ESMTP id B9856AFD2 for ; Wed, 30 Apr 2014 02:46:52 +0200 (CEST) Received: by mail-we0-f180.google.com with SMTP id t61so981323wes.11 for ; Tue, 29 Apr 2014 17:46:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=3AHvSh3KSQZyWRFtKnse7V/cLMCFVvxFQhsNekb8sNo=; b=a+Zuae1VpQxnS0Y22E5c6B9o7XzsGBDSzyjXUEu8yEnqDGC/kHjUA6Rbp8EXPZBS4o O8puKk39Wd3zU/wxJOmga+wayh0g5LsZXVYAEbsx24wcpPmyi0t29IP0dWkMqQu1fglR YM3bFrsKog84ewZd2Cw7uoTnQJo4GHZCcinxyRckj0EHGVXjhWpHPNbHsNgmBGBP5w4U zROEt+jAcjS1iunAgr8rZhUbLC9F9bX6yGPvLEgr/BIn4+xve9Wt0GLbS1avu+IYDIN+ 7mg1Gtug68OyVFeuvho85iZ+aDiSx5poYqa+gZL3Y8nLMgg/60OfPtiZMCF3cIPMAwcT GNcg== X-Gm-Message-State: ALoCoQnafKx9gMFdyyap/w/aL2yJYbtzqiA9eFpgFlfNZubK+3Z+ea8NGJao4sBrv1Dd1cQH2mp5 X-Received: by 10.180.81.228 with SMTP id d4mr766649wiy.49.1398818816638; Tue, 29 Apr 2014 17:46:56 -0700 (PDT) Received: from localhost.localdomain (abo-213-55-68.mts.modulonet.fr. [85.68.55.213]) by mx.google.com with ESMTPSA id hm5sm33521685wjc.17.2014.04.29.17.46.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Apr 2014 17:46:55 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 30 Apr 2014 02:46:43 +0200 Message-Id: <1398818805-18834-3-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1398818805-18834-1-git-send-email-thomas.monjalon@6wind.com> References: <1398818805-18834-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [memnic PATCH v2 2/4] pkg: add recipe for RPM X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 00:46:53 -0000 Packages can be built with: rpmbuild -ta memnic-1.0.tar.gz There are packages for kernel module and PMD versions. Signed-off-by: Thomas Monjalon --- pkg/dpdk-memnic.spec | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 pkg/dpdk-memnic.spec diff --git a/pkg/dpdk-memnic.spec b/pkg/dpdk-memnic.spec new file mode 100644 index 0000000..656411f --- /dev/null +++ b/pkg/dpdk-memnic.spec @@ -0,0 +1,107 @@ +# Copyright 2014 6WIND S.A. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# - Neither the name of 6WIND S.A. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +# OF THE POSSIBILITY OF SUCH DAMAGE. + +Name: memnic +Version: 1.0 +Release: 1 +Packager: packaging@6wind.com +URL: http://dpdk.org/doc/memnic-pmd +Source: http://dpdk.org/browse/memnic/snapshot/%{name}-%{version}.tar.gz + +Summary: MEMNIC +Group: System Environment/Libraries +License: BSD and GPLv2 + +ExclusiveArch: i686, x86_64 +%define target %{_arch}-default-linuxapp-gcc + +%description +Dummy main package. Make only subpackages. + +%package -n dpdk-memnic-1 +BuildRequires: dpdk-core-1.6.0-devel +Requires: dpdk-core-1.6.0 +Summary: MEMNIC driver for Intel(r) Data Plane Development Kit +%description -n dpdk-memnic-1 +MEMNIC is a paravirtualized network interface (PMD) based +on memory copy and introduced by NEC. +It has similar concepts to virtio-net, but does not use the vring framework. +Instead, it is based on a queue of mailboxed packets which are copied +in IVSHMEM between the host and the guest. + +%define datadir %{_datadir}/dpdk +%define docdir %{_docdir}/dpdk + +%package kmod +BuildRequires: kernel-devel +Summary: MEMNIC kernel driver +%description kmod +MEMNIC is a paravirtualized network interface (netdevice driver) based +on memory copy and introduced by NEC. +It has similar concepts to virtio-net, but does not use the vring framework. +Instead, it is based on a queue of mailboxed packets which are copied +in IVSHMEM between the host and the guest. + +%define modroot /lib/modules/%(uname -r) +%define kerneldir %{modroot}/build +%define moddir %{modroot}/extra + +%prep +%setup -qn %{name}-%{version} + +%build +make %{?_smp_mflags} -C pmd RTE_INCLUDE=%{datadir}/%{target}/include +make %{?_smp_mflags} -C %{kerneldir} M=$(pwd)/linux + +%install +rm -rf %{buildroot} +make install -C pmd DESTDIR=%{buildroot} libdir=%{_libdir} docdir=%{docdir} +make modules_install -C %{kerneldir} M=$(pwd)/linux INSTALL_MOD_PATH=%{buildroot} +rm -f %{buildroot}%{modroot}/modules.* + +%files -n dpdk-memnic-1 +%{_libdir}/* +%doc %{docdir} + +%files kmod +%{moddir}/* + +%post dpdk-memnic-1 +/sbin/ldconfig + +%postun dpdk-memnic-1 +/sbin/ldconfig + +%post kmod +/sbin/depmod + +%postun kmod +/sbin/depmod -- 1.9.2