[compat-gdbm] Add -devel sub-package to be able to build against this package Some packages need to build against

Jan Horak hhorak at fedoraproject.org
Tue Dec 13 09:53:13 UTC 2011


commit 5468326b4976173da7cc05979d17a59736f79342
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date:   Tue Dec 13 10:52:59 2011 +0100

    Add -devel sub-package to be able to build against this package
    Some packages need to build against older gdbm because of license
    incompatibility

 compat-gdbm.spec |   40 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 35 insertions(+), 5 deletions(-)
---
diff --git a/compat-gdbm.spec b/compat-gdbm.spec
index a8d82fe..d194f26 100644
--- a/compat-gdbm.spec
+++ b/compat-gdbm.spec
@@ -1,7 +1,7 @@
 Summary: A GNU set of database routines compatibility library
 Name: compat-gdbm
 Version: 1.8.3
-Release: 9%{?dist}
+Release: 10%{?dist}
 Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
 # Prevent gdbm from storing uninitialized memory content
 # to database files.
@@ -41,6 +41,22 @@ applications which will use such a database.
 This package contains older version of gdbm which was included in
 previous release of Fedora. 
 
+%package devel
+Summary: Development libraries and header files for the gdbm library
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires(post): info
+Requires(preun): info
+
+%description devel
+Gdbm-devel contains the development libraries and header files for
+gdbm, the GNU database system.  These libraries and header files are
+necessary if you plan to do development using the gdbm database.
+
+Install compat-gdbm-devel if you are developing C programs which will 
+use older version of gdbm database library.  You'll also need to install 
+the compat-gdbm package.
+
 %prep
 %setup -q -n gdbm-%{version}
 %patch0 -p1 -b .zeroheaders
@@ -72,10 +88,13 @@ ln -sf libgdbm.so.3.0.0 $RPM_BUILD_ROOT/%{_libdir}/libgdbm.so
 ln -sf libgdbm_compat.so.3.0.0 $RPM_BUILD_ROOT/%{_libdir}/libgdbm_compat.so
 
 # Devel files are almost identical to gdbm-devel package.
-# Packages should be built against gdbm-devel.
-rm -f $RPM_BUILD_ROOT/%{_libdir}/libgdbm.so
-rm -f $RPM_BUILD_ROOT/%{_libdir}/libgdbm_compat.so
-rm -rf $RPM_BUILD_ROOT/%{_includedir}/gdbm*
+# Packages should be built against gdbm-devel if possible, 
+# but because of license incompatibility we need to build 
+# against compat-gdbm sometimes.
+
+ln -sf gdbm/gdbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm.h
+
+# info and man pages are the same as gdbm-devel has
 rm -f $RPM_BUILD_ROOT/%{_infodir}/*.info*
 rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/*
 
@@ -92,7 +111,18 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libgdbm_compat.la
 %{_libdir}/libgdbm.so.3*
 %{_libdir}/libgdbm_compat.so.3*
 
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/libgdbm.so
+%{_libdir}/libgdbm_compat.so
+%{_includedir}/gdbm*
+
 %changelog
+* Mon Dec 12 2011 Honza Horak <hhorak at redhat.com> - 1.8.3-10
+- Add -devel sub-package to be able to build against this package
+  Some packages need to build against older gdbm because of license 
+  incompatibility
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.8.3-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list