From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 795668E9E for ; Thu, 3 Dec 2015 14:47:12 +0100 (CET) Received: by wmec201 with SMTP id c201so27737231wme.0 for ; Thu, 03 Dec 2015 05:47:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CaC/LGXig8MJXFznyuv5Kq8HCcot7+yjpVsXt58sPFA=; b=GcObwNjs7Gh+pAcgcdWYYAEe+J/qmG64Lubq6WEimcidIklbDW8nL5s15RZrkjCWyB y6Do9me1nXF9CqF5ZPlx8+QNHNYl6ESbkbRnbp75hj8roXsSiJ2YnXdQD9D4yGSSq63s f/NXjLudMcj/4jxqL2icpRuwugyUzhb1iij38FEPPfn/ekhxsSN4ujYJ6JTP98ovJ30R faDQbLJCE3+86cJ6ctzOlp3mF/zJ21o/pueiCt8cMkbOt24wLDbohDthB30iw89SrRPW hupOJ6QOgmq5FK0P2XwukyV1G3YfEOL5fT4hiU8CdzEFy6yjIIGy046JcJd464UVke15 duew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CaC/LGXig8MJXFznyuv5Kq8HCcot7+yjpVsXt58sPFA=; b=UFLg+BFjK/WUG+YVXCwwYeh6Vsmb77OHtILcTZno3izERnVh6BDFBK14fdsJ4EAZwB urGuclaFMXO6pRPR+GtUPKTI+7meJhLaknVLPDxDYsNMcZ1eGc47krS2x17zT7pKy+0w UySCGVSB8615K6V97Zo2sGVbXQ0hMm/qTNcpZ+CFTVPpLbTMwUXhK5ZWY/lEGoB3cH94 8lLkwnzAJImrxe0Ve1mXUOgGYTV0H56eje6Ayv3hPG/GuBxpFIDIAgwmXYREyMaF5GxP Qa/NtN3o0urbKC8L4jJNI/MdTrLLPKtAOsa8HDz0GLRfp2J0T7jACi9C4QYcT9xY6dJO I7mg== X-Gm-Message-State: ALoCoQknFt5WIAWbE2MjbbMeWlTwsf7S8vOVhHKTGyaGu9wTaLUxFYLxNxvuKAQx9HuIEituGpAO X-Received: by 10.28.32.22 with SMTP id g22mr11929399wmg.43.1449150432391; Thu, 03 Dec 2015 05:47:12 -0800 (PST) Received: from XPS13.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id k133sm8063912wmg.18.2015.12.03.05.47.11 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Dec 2015 05:47:11 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 3 Dec 2015 14:45:39 +0100 Message-Id: <1449150340-21984-13-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1449150340-21984-1-git-send-email-thomas.monjalon@6wind.com> References: <1449118929-19962-1-git-send-email-thomas.monjalon@6wind.com> <1449150340-21984-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v3 12/13] pkg: update RPM with standard install 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: Thu, 03 Dec 2015 13:47:12 -0000 The "make install" is more standard now. So the recipe can be simplified. Signed-off-by: Thomas Monjalon Acked-by: Panu Matilainen --- pkg/dpdk.spec | 59 ++++++++++++++++------------------------------------------- 1 file changed, 16 insertions(+), 43 deletions(-) diff --git a/pkg/dpdk.spec b/pkg/dpdk.spec index 7437025..e68985f 100644 --- a/pkg/dpdk.spec +++ b/pkg/dpdk.spec @@ -41,8 +41,9 @@ Group: System Environment/Libraries License: BSD and LGPLv2 and GPLv2 ExclusiveArch: i686, x86_64 -%global target %{_arch}-native-linuxapp-gcc %global machine default +%global target %{_arch}-%{machine}-linuxapp-gcc +%global config %{_arch}-native-linuxapp-gcc BuildRequires: kernel-devel, kernel-headers, libpcap-devel, xen-devel BuildRequires: doxygen, python-sphinx, inkscape @@ -69,16 +70,11 @@ BuildArch: noarch DPDK doc is divided in two parts: API details in doxygen HTML format and guides in sphinx HTML/PDF formats. -%global destdir %{buildroot}%{_prefix} -%global moddir /lib/modules/%(uname -r)/extra -%global datadir %{_datadir}/dpdk -%global docdir %{_docdir}/dpdk - %prep %setup -q %build -make O=%{target} T=%{target} config +make O=%{target} T=%{config} config sed -ri 's,(RTE_MACHINE=).*,\1%{machine},' %{target}/.config sed -ri 's,(RTE_APP_TEST=).*,\1n,' %{target}/.config sed -ri 's,(RTE_BUILD_SHARED_LIB=).*,\1y,' %{target}/.config @@ -93,51 +89,28 @@ make O=%{target} doc %install rm -rf %{buildroot} -make O=%{target} DESTDIR=%{destdir} -mkdir -p %{buildroot}%{moddir} -mv %{destdir}/%{target}/kmod/*.ko %{buildroot}%{moddir} -rmdir %{destdir}/%{target}/kmod -mkdir -p %{buildroot}%{_sbindir} -ln -s %{datadir}/tools/*nic_bind.py %{buildroot}%{_sbindir}/dpdk_nic_bind -mkdir -p %{buildroot}%{_bindir} -mv %{destdir}/%{target}/app/testpmd %{buildroot}%{_bindir} -rmdir %{destdir}/%{target}/app -mv %{destdir}/%{target}/include %{buildroot}%{_includedir} -mv %{destdir}/%{target}/lib %{buildroot}%{_libdir} -mkdir -p %{buildroot}%{docdir} -rm -rf %{destdir}/%{target}/doc/*/*/.{build,doc}* -mv %{destdir}/%{target}/doc/html/* %{buildroot}%{docdir} -mv %{destdir}/%{target}/doc/*/*/*pdf %{buildroot}%{docdir}/guides -rm -rf %{destdir}/%{target}/doc -mkdir -p %{buildroot}%{datadir} -mv %{destdir}/%{target}/.config %{buildroot}%{datadir}/config -mv %{destdir}/%{target} %{buildroot}%{datadir} -mv %{destdir}/scripts %{buildroot}%{datadir} -mv %{destdir}/mk %{buildroot}%{datadir} -cp -a examples %{buildroot}%{datadir} -cp -a tools %{buildroot}%{datadir} -ln -s %{datadir}/config %{buildroot}%{datadir}/%{target}/.config -ln -s %{_includedir} %{buildroot}%{datadir}/%{target}/include -ln -s %{_libdir} %{buildroot}%{datadir}/%{target}/lib +make install O=%{target} DESTDIR=%{buildroot} \ + prefix=%{_prefix} bindir=%{_bindir} sbindir=%{_sbindir} \ + includedir=%{_includedir}/dpdk libdir=%{_libdir} \ + datadir=%{_datadir}/dpdk docdir=%{_docdir}/dpdk %files -%dir %{datadir} -%{datadir}/config -%{datadir}/tools -%{moddir}/* +%dir %{_datadir}/dpdk +%{_datadir}/dpdk/tools +/lib/modules/%(uname -r)/extra/* %{_sbindir}/* %{_bindir}/* %{_libdir}/* %files devel -%{_includedir}/* -%{datadir}/mk -%{datadir}/scripts -%{datadir}/%{target} -%{datadir}/examples +%{_includedir}/dpdk +%{_datadir}/dpdk/mk +%{_datadir}/dpdk/scripts +%{_datadir}/dpdk/%{target} +%{_datadir}/dpdk/examples %files doc -%doc %{docdir} +%doc %{_docdir}/dpdk %post /sbin/ldconfig -- 2.5.2