From patchwork Thu Sep 10 23:12:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 7156261 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E55309F314 for ; Thu, 10 Sep 2015 23:18:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E1A302086C for ; Thu, 10 Sep 2015 23:18:34 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71B492085A for ; Thu, 10 Sep 2015 23:18:33 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 47E5B18307C; Thu, 10 Sep 2015 16:18:33 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ml01.01.org (Postfix) with ESMTP id 855DE183024 for ; Thu, 10 Sep 2015 16:18:31 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 10 Sep 2015 16:18:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,507,1437462000"; d="scan'208";a="642587395" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.137]) by orsmga003.jf.intel.com with ESMTP; 10 Sep 2015 16:18:30 -0700 Subject: [PATCH] ndctl: sles spec file updates From: Dan Williams To: linux-nvdimm@lists.01.org Date: Thu, 10 Sep 2015 19:12:47 -0400 Message-ID: <20150910231224.33942.63148.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-8-g92dd MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Include copyright header, license files as %doc Signed-off-by: Dan Williams --- contrib/Makefile | 5 +++-- contrib/genspec.c | 2 +- contrib/ndctl.spec.in | 38 +++++++++++++++++++++----------------- contrib/sles/header | 18 ++++++++++++++++++ 4 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 contrib/sles/header diff --git a/contrib/Makefile b/contrib/Makefile index 958281765b9b..766e186d0389 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -7,6 +7,7 @@ PROG=genspec SPEC_IN=ndctl.spec.in RHEL_SPEC=rhel/$(SPEC_IN:.in=) SLES_SPEC=sles/$(SPEC_IN:.in=) +SLES_IN=sles/header COMMIT_ID=git log --pretty=format:"%h" -n 1 all: $(RHEL_SPEC) $(SLES_SPEC) @@ -15,9 +16,9 @@ $(RHEL_SPEC) : $(SPEC_IN) $(PROG) @mkdir -p rhel cat $(SPEC_IN) | $(dir $(PROG))$(PROG) `$(COMMIT_ID)` rhel > $@ -$(SLES_SPEC) : $(SPEC_IN) $(PROG) +$(SLES_SPEC) : $(SLES_IN) $(SPEC_IN) $(PROG) @mkdir -p sles - cat $(SPEC_IN) | $(dir $(PROG))$(PROG) `$(COMMIT_ID)` sles > $@ + cat $(SLES_IN) $(SPEC_IN) | $(dir $(PROG))$(PROG) `$(COMMIT_ID)` sles > $@ $(PROG) : $(OBJS) Makefile $(CC) $(LDFLAGS) $(OBJS) -o $@ diff --git a/contrib/genspec.c b/contrib/genspec.c index b3e85da3c9ff..829f648f0a2f 100644 --- a/contrib/genspec.c +++ b/contrib/genspec.c @@ -42,7 +42,7 @@ int main(int argc, char **argv) else if (strncmp("%define dname", buf, 12) == 0) fprintf(stdout, "%%define dname %s\n", dname[os]); else if (strncmp("%license", buf, 8) == 0 && !license[os]) - /* skip */; + fprintf(stdout, "%%doc %s", &buf[8]); else if (strncmp("echo \"\" > version", buf, 17) == 0) fprintf(stdout, "echo \"%s\" > version\n", VERSION); else diff --git a/contrib/ndctl.spec.in b/contrib/ndctl.spec.in index 61fa525d1e87..3d0687ebdc47 100644 --- a/contrib/ndctl.spec.in +++ b/contrib/ndctl.spec.in @@ -7,22 +7,18 @@ Version: Release: 1%{?dist} Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory) License: GPL-2.0 -URL: https://github.com/pmem/ndctl - -%if %{defined gitcommit} +Group: Hardware/Other +Url: https://github.com/pmem/ndctl # Snapshot tarball can be created using: ./make-git-shapshot.sh [gitcommit] Source0: %{name}-git%{gitcommit}.tar.xz -%else -Source0: https://github.com/pmem/ndctl/archive/%{name}-%{version}.tar.gz -%endif - -BuildRequires: libtool -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: pkgconfig -BuildRequires: pkgconfig(libudev) -BuildRequires: pkgconfig(uuid) -BuildRequires: pkgconfig(libkmod) + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libkmod) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(uuid) %description Utility library for managing the "libnvdimm" subsystem. The "libnvdimm" @@ -34,6 +30,7 @@ Firmware Interface Table). %package -n %dname Summary: Development files for libndctl License: LGPL-2.1+ +Group: Development/Libraries/Other Requires: %{lname}%{?_isa} = %{version}-%{release} %description -n %dname @@ -44,10 +41,10 @@ developing applications that use %{name}. %package -n %lname Summary: Management library for "libnvdimm" subsystem devices (Non-volatile Memory) License: LGPL-2.1+ +Group: System/Libraries %description -n %lname -Libraries for %{name} - +Libraries for %{name}. %prep %setup -q %{?gitcommit:-n %{name}-git%{gitcommit}} @@ -58,31 +55,38 @@ echo "" > version %configure --disable-static make %{?_smp_mflags} - %install %make_install find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +%check +make check %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig %files +%defattr(-,root,root) %license licenses/GPLv2 licenses/BSD-MIT licenses/CC0 %{_bindir}/ndctl %files -n %lname +%defattr(-,root,root) %doc README.md %license COPYING licenses/BSD-MIT licenses/CC0 %{_libdir}/libndctl.so.* %files -n %dname +%defattr(-,root,root) %license COPYING %{_includedir}/ndctl/ %{_libdir}/libndctl.so %{_libdir}/pkgconfig/libndctl.pc %changelog +* Wed Sep 09 2015 dan.j.williams@intel.com +- Stop emitting git commit info by default + * Mon Aug 03 2015 dan.j.williams@intel.com - Initial rpm release diff --git a/contrib/sles/header b/contrib/sles/header new file mode 100644 index 000000000000..18efb453f705 --- /dev/null +++ b/contrib/sles/header @@ -0,0 +1,18 @@ +# +# spec file for package ndctl +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 Intel Corporation +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +