From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id B149E8E78 for ; Thu, 3 Dec 2015 06:04:16 +0100 (CET) Received: by wmuu63 with SMTP id u63so5955190wmu.0 for ; Wed, 02 Dec 2015 21:04:16 -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=75+3GSFkzh4uqmc7/l0eH6nUlbDvd4dBghC5biq07OA=; b=J1SpQL8/VA2bw2vO4MjUCVCbmTYD/D7OKGZq7WWArUkWgK/Y4cW7gpSv/hQ9XF2/aN d3bSuS2QSIyJYYfe5lPqvO3ZhVV6gMbr/jreK/Jje50SNxXRJACt6AcXT5OdRYyIkEqT CkLruJwCaU5zldrgVmmwwSSf3uaIKtOOEFJiyvNLE8KjzbgvSgujQI+W/pja8nMCKmb9 +hiXqode8yqB+50D8SHiYLktmsbL4VVOhaqj8WBzfGfEs+4C9AyVEszOb6Vb8UvmNd3E cERIhqD6Y//XplxqGPU/YRerLyGP7Wos98BM8gtHTctcbgEjGJlJ86iAa6kKsZbjK2jY Cu/Q== 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=75+3GSFkzh4uqmc7/l0eH6nUlbDvd4dBghC5biq07OA=; b=Dqh8dceUDXX8pOZtvcoJfYbLShJGbQ3Vl+G6znhAhGme2pJgbPNhOUb0lb3lJ8ppVz A9Ib6A8Cop/tlLuiw2vqeRj++TT13jC639QwlTwgzgyVzjuOhetjjbNopm2lmrquDGIU UDKvFKYyFO8j81sQJz0QWjP4I+Ov47irN+ndKovh98byJMfMO4wZGpBkOpm6LS31yasB 9XsROt6PGgpPKpt4R/ZAb4lGTk7290whm3xM2ybiZadOT0WXshie3lXNsmbPzWKzGc2+ FX05a4Q1r5UmakjIoSu0rCkZ7sfzkqAXN7bc2UX0qgu7Y/IbB7unDb3MgewGZWB5Bhhc Ru9w== X-Gm-Message-State: ALoCoQnHIcqNeaByzTqH0pQEXhwcv26n1nutk7y2KNTlBs9vBB6Xw1BtRVSFSRufe/DJ/rAybLBc X-Received: by 10.194.205.137 with SMTP id lg9mr8383659wjc.156.1449119056625; Wed, 02 Dec 2015 21:04:16 -0800 (PST) Received: from XPS13.ibrowse.com ([93.158.46.55]) by smtp.gmail.com with ESMTPSA id gl4sm5720379wjd.17.2015.12.02.21.04.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Dec 2015 21:04:16 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 3 Dec 2015 06:02:09 +0100 Message-Id: <1449118929-19962-13-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1449118929-19962-1-git-send-email-thomas.monjalon@6wind.com> References: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> <1449118929-19962-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v2 12/12] 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 05:04:16 -0000 The "make install" is more standard now. So the recipe can be simplified. Signed-off-by: Thomas Monjalon --- 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