[stout/el6] modified as suggested in rhbz #988545 comment 17 and following. commented macros properly replaced s
Björn Esser
besser82 at fedoraproject.org
Tue Aug 13 09:02:19 UTC 2013
commit 02eac6a1cee2a99cd42b3f8d5af64306cfa1153e
Author: Björn Esser <bjoern.esser at gmail.com>
Date: Tue Aug 13 10:54:04 2013 +0200
modified as suggested in rhbz #988545 comment 17 and following.
commented macros properly
replaced spaces with tabs
stout.spec | 91 +++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 63 insertions(+), 28 deletions(-)
---
diff --git a/stout.spec b/stout.spec
index 9b7a8f3..8c781c3 100644
--- a/stout.spec
+++ b/stout.spec
@@ -3,45 +3,67 @@
%global commit 7c9d71c8fda7719e5cc071b39377e85a7a450781
%global shortcommit %(c=%{commit}; echo ${c:0:7})
-Name: stout
-Summary: C++ headers for building sturdy software
-Version: 0.1.1
-Release: 4.%{shortcommit}%{?dist}
+Name: stout
+Version: 0.1.1
+Release: 5.%{shortcommit}%{?dist}
+Summary: C++ headers for building sturdy software
+%{?el5:Group: Development/Libraries}
-Group: Development/Libraries
-License: ASL 2.0
-URL: https://github.com/3rdparty/stout
+License: ASL 2.0
+URL: https://github.com/3rdparty/stout
## Will use this when pull-request in merged by upstream
# https://github.com/3rdparty/stout/pull/4
-#Source0: %{url}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
+#Source0: %%{url}/archive/%%{commit}/%%{name}-%%{version}-%%{shortcommit}.tar.gz
#
# We'll use this during devel :)
#
-Source0: https://github.com/besser82/stout/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
-%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
-BuildArch: noarch
+Source0: https://github.com/besser82/stout/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
-BuildRequires: automake
-BuildRequires: zlib-devel
-BuildRequires: libcurl-devel
+%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
+BuildRequires: automake
+BuildRequires: zlib-devel
+BuildRequires: libcurl-devel
-Provides: %{name}-devel = %{version}-%{release}
+%description
+Headers used for for development of sturdy applications, and leveraged
+by Mesos.
+
+%{name} is a header only library that is contains a series of primitives
+to assist in the development of building sturdy C++ applications. Currently
+this application is leveraged by Mesos.
-Requires: boost-devel
-Requires: protobuf-devel
-## TBD - glog removed in the future
-Requires: glog-devel
-Requires: gmock-devel
-Requires: gtest-devel
-Requires: zlib-devel
-Requires: libcurl-devel
+Note: as that project has only headers (i.e., no library/binary object),
+this package (i.e., the -devel package) is the one containing all of the
+project. There's no package with a library to link for this.
-%description
+
+%package -n %{name}-devel
+Summary: C++ headers for building sturdy software
+%{?el5:Group: Development/Libraries}
+
+# el5 doesn't like noarch subpkgs
+%{?!el5:BuildArch: noarch}
+
+# obsoleting previous versions because change to devel subpkg
+# el5 pkg will be arched, so we should use %%{?_isa}in this case
+Obsoletes: %{name} <= 0.1.1-4.7c9d71c
+Provides: %{name}%{?el5:%{?_isa}} = %{version}-%{release}
+
+Requires: boost-devel%{?el5:%{?_isa}}
+Requires: protobuf-devel%{?el5:%{?_isa}}
+# TBD - glog removed in the future
+Requires: glog-devel%{?el5:%{?_isa}}
+Requires: gmock-devel%{?el5:%{?_isa}}
+Requires: gtest-devel%{?el5:%{?_isa}}
+Requires: zlib-devel%{?el5:%{?_isa}}
+Requires: libcurl-devel%{?el5:%{?_isa}}
+
+%description -n %{name}-devel
Headers used for for development of sturdy applications, and leveraged
by Mesos.
-Stout is a header only library that is contains a series of primitives
+%{name} is a header only library that is contains a series of primitives
to assist in the development of building sturdy C++ applications. Currently
this application is leveraged by Mesos.
@@ -66,6 +88,11 @@ make %{?_smp_mflags}
%if 0%{?el5}
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
+
+# having pkgconfig-file in %%{_datadir} will conflict with multiarch on el5
+# moving stuff to %%{_libdir} in this case
+ mkdir -p %{buildroot}%{_libdir}/pkgconfig
+ cp -a %{buildroot}%{_datadir}/pkgconfig/* %{buildroot}%{_libdir}/pkgconfig
%else
%make_install
%endif
@@ -75,13 +102,21 @@ make %{?_smp_mflags}
%{?el5:rm -rf %{buildroot}}
-%files
-%{_datadir}/pkgconfig/*
-%{_includedir}/%{name}/
+%files -n %{name}-devel
%doc LICENSE README.md examples
+%{?el5:%{_libdir}/pkgconfig/*}
+%{?el5:%exclude %{_datadir}/pkgconfig/*}
+%{?!el5:%{_datadir}/pkgconfig/*}
+%{_includedir}/%{name}/
%changelog
+* Tue Aug 13 2013 Björn Esser <bjoern.esser at gmail.com> - 0.1.1-5.7c9d71c
+- modified as suggested in rhbz #988545 comment 17 and following.
+ See: https://bugzilla.redhat.com/show_bug.cgi?id=988545#c17
+- commented macros properly
+- replaced spaces with tabs
+
* Mon Aug 12 2013 Björn Esser <bjoern.esser at gmail.com> - 0.1.1-4.7c9d71c
- nuked %%{?_isa}-macros from noarch-pkg
More information about the scm-commits
mailing list