- drop *-cflags.patch, move all makefile fixes to *-fhs.patch

- propagate libdir to Makefile; no need to set it on cmdline
This commit is contained in:
Štěpán Kasal 2009-02-27 18:21:25 +00:00
parent 610fe97472
commit a58c436b55
3 changed files with 77 additions and 66 deletions

View File

@ -1,31 +0,0 @@
--- gdbm-1.8.0/Makefile.in.cflags Tue Jun 12 19:50:21 2001
+++ gdbm-1.8.0/Makefile.in Tue Jun 12 19:57:45 2001
@@ -17,22 +17,23 @@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
-DEFS =
+DEFS = @DEFS@
# Where the system [n]dbm routines are...
LIBS = @LIBS@ -lc
# SunOS 4 users might wish to add '-fpcc-struct-return' to CFLAGS. see INSTALL.
-CFLAGS = -O
-LDFLAGS =
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
# Common prefix for installation directories
-prefix = /usr/local
+prefix = /usr
exec_prefix = $(prefix)
mandir = $(prefix)/man
# Directory in which to put libgdbm.a.
-libdir = $(exec_prefix)/lib
+libdir = $(prefix)/lib
# The include directory for gdbm.h and dbm.h.
includedir = $(prefix)/include
# Info and man directories.

View File

@ -1,6 +1,20 @@
--- gdbm-1.8.0/Makefile.in.fhs Mon Jun 5 15:12:15 2000
+++ gdbm-1.8.0/Makefile.in Mon Jun 5 15:16:34 2000
@@ -14,10 +14,6 @@
2009-02-27 Stepan Kasal <skasal@redhat.com>
* Makefile.in: respect the *dir variables as set by configure;
clean up.
--- gdbm-1.8.0/Makefile.in.fhs 1999-05-19 05:16:06.000000000 +0200
+++ gdbm-1.8.0/Makefile.in 2009-02-27 18:52:19.000000000 +0100
@@ -1,7 +1,7 @@
#### Start of system configuration section. ####
srcdir = @srcdir@
-top_builddir = @srcdir@
+top_builddir = @top_builddir@
VPATH = @srcdir@
CC = @CC@
@@ -14,36 +14,29 @@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@ -11,46 +25,72 @@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
@@ -33,8 +29,7 @@
-DEFS =
+DEFS = @DEFS@
# Where the system [n]dbm routines are...
-LIBS = @LIBS@ -lc
+LIBS = @LIBS@
# SunOS 4 users might wish to add '-fpcc-struct-return' to CFLAGS. see INSTALL.
-CFLAGS = -O
-LDFLAGS =
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
# Common prefix for installation directories
prefix = /usr/local
exec_prefix = $(prefix)
-prefix = /usr/local
-exec_prefix = $(prefix)
-binprefix = $(exec_prefix)
-manprefix = $(prefix)
+mandir = $(prefix)/man
# Directory in which to put libgdbm.a.
libdir = $(exec_prefix)/lib
@@ -42,7 +37,7 @@
includedir = $(prefix)/include
# Info and man directories.
infodir = $(prefix)/info
-
-# Directory in which to put libgdbm.a.
-libdir = $(exec_prefix)/lib
-# The include directory for gdbm.h and dbm.h.
-includedir = $(prefix)/include
-# Info and man directories.
-infodir = $(prefix)/info
-man3dir = $(prefix)/man/man3
-manext = 3
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+mandir = @mandir@
+libdir = @libdir@
+includedir = @includedir@
+pkgincludedir = $(includedir)/gdbm
+infodir = @infodir@
+man3dir = $(mandir)/man3
manext = 3
#### End of system configuration section. ####
@@ -122,18 +117,14 @@
@@ -120,20 +113,16 @@
progs: $(PROGS)
install: libgdbm.la gdbm.h gdbm.info
$(srcdir)/mkinstalldirs $(libdir) $(includedir) $(man3dir) $(infodir)
$(LIBTOOL) install -c libgdbm.la $(libdir)/libgdbm.la
- $(srcdir)/mkinstalldirs $(libdir) $(includedir) $(man3dir) $(infodir)
- $(LIBTOOL) install -c libgdbm.la $(libdir)/libgdbm.la
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h $(includedir)/gdbm.h
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \
- $(man3dir)/gdbm.3
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \
- $(infodir)/gdbm.info
+ $(INSTALL_DATA) gdbm.h $(includedir)/gdbm.h
+ $(srcdir)/mkinstalldirs $(libdir) $(pkgincludedir) $(man3dir) $(infodir)
+ $(LIBTOOL) install install libgdbm.la $(libdir)/libgdbm.la
+ $(INSTALL_DATA) gdbm.h $(pkgincludedir)/gdbm.h
+ $(INSTALL_DATA) $(srcdir)/gdbm.3 $(man3dir)/gdbm.3
+ $(INSTALL_DATA) $(srcdir)/gdbm.info $(infodir)/gdbm.info
install-compat:
$(srcdir)/mkinstalldirs $(includedir)
- $(srcdir)/mkinstalldirs $(includedir)
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \
- $(includedir)/dbm.h
- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \
- $(includedir)/ndbm.h
+ $(INSTALL_DATA) $(srcdir)/dbm.h $(includedir)/dbm.h
+ $(INSTALL_DATA) $(srcdir)/ndbm.h $(includedir)/ndbm.h
+ $(srcdir)/mkinstalldirs $(pkgincludedir)
+ $(INSTALL_DATA) $(srcdir)/dbm.h $(pkgincludedir)/dbm.h
+ $(INSTALL_DATA) $(srcdir)/ndbm.h $(pkgincludedir)/ndbm.h
#libgdbm.a: $(OBJS) gdbm.h
# rm -f libgdbm.a

View File

@ -1,13 +1,10 @@
%{expand: %%global _includedir %{_includedir}/gdbm}
Summary: A GNU set of database routines which use extensible hashing.
Name: gdbm
Version: 1.8.0
Release: 30%{?dist}
Release: 31%{?dist}
Source: ftp://ftp.gnu.org/gnu/gdbm-%{version}.tar.gz
Patch0: gdbm-1.8.0-jbj.patch
Patch1: gdbm-1.8.0-fhs.patch
Patch2: gdbm-1.8.0-cflags.patch
Patch3: gdbm-1.8.0-64offset.patch
License: GPLv2+
URL: http://www.gnu.org/software/gdbm/
@ -44,25 +41,27 @@ gdbm database library. You'll also need to install the gdbm package.
%setup -q
%patch0 -p 1 -b .jbj
%patch1 -p 1 -b .fhs
%patch2 -p 1 -b .cflags
%patch3 -p1 -b .offset
%build
# refresh config.sub, the original one does not recognize "redhat"
# as vendorname:
for f in /usr/share/automake-1.1?/config.sub; do
:
done
cp -p $f .
libtoolize --force --copy
aclocal
autoreconf
autoconf
%configure
# We need to override libdir, which for whatever reason is set to $(prefix)/lib
# instead of the value passed to configure above.
make libdir=%{_libdir}
make
%install
rm -rf ${RPM_BUILD_ROOT}
%makeinstall install-compat
ln -sf gdbm/gdbm.h $RPM_BUILD_ROOT/%{_oldincludedir}/gdbm.h
ln -sf gdbm/gdbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm.h
ln -sf libgdbm.so.2.0.0 $RPM_BUILD_ROOT/%{_libdir}/libgdbm.so
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgdbm.la
@ -88,8 +87,7 @@ fi
%defattr(-,root,root)
%{_libdir}/libgdbm.so
%{_libdir}/libgdbm.a
%{_oldincludedir}/gdbm.h
%{_includedir}
%{_includedir}/gdbm*
%{_infodir}/*.info*
%{_mandir}/man3/*
@ -97,6 +95,10 @@ fi
rm -rf ${RPM_BUILD_ROOT}
%changelog
* Fri Feb 27 2009 Stepan Kasal <skasal@redhat.com> - 1.8.0-31
- drop *-cflags.patch, move all makefile fixes to *-fhs.patch
- propagate libdir to Makefile; no need to set it on cmdline
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild