From 9910208fd7b6484093022c42aa26b5dd2f1645b4 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 21 Jun 2012 18:20:55 +0100 Subject: [PATCH] fixed requirements and add ndbm.h for perl - remove obsolete yaml files Change-Id: Ic419ddf114195f60d646690d259a482b947f68e4 --- packaging/Makefile | 6 - packaging/gdbm-1.8.3-no-build-date.patch | 14 ++ packaging/gdbm-1.8.3.dif | 16 +-- packaging/gdbm-destdir.patch | 43 ------ packaging/gdbm-fix_testprogs.patch | 12 +- packaging/gdbm-protoize_dbm_headers.patch | 10 +- packaging/gdbm-prototype_static_functions.patch | 4 +- packaging/gdbm-stamp.patch | 10 -- packaging/gdbm.changes | 23 ++-- packaging/gdbm.spec | 174 ++++++++++++------------ packaging/gdbm.yaml | 25 ---- 11 files changed, 131 insertions(+), 206 deletions(-) delete mode 100644 packaging/Makefile create mode 100644 packaging/gdbm-1.8.3-no-build-date.patch delete mode 100644 packaging/gdbm-destdir.patch delete mode 100644 packaging/gdbm-stamp.patch delete mode 100644 packaging/gdbm.yaml diff --git a/packaging/Makefile b/packaging/Makefile deleted file mode 100644 index 05bf9d1..0000000 --- a/packaging/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -PKG_NAME := gdbm -SPECFILE = $(addsuffix .spec, $(PKG_NAME)) -YAMLFILE = $(addsuffix .yaml, $(PKG_NAME)) - -include /usr/share/packaging-tools/Makefile.common - diff --git a/packaging/gdbm-1.8.3-no-build-date.patch b/packaging/gdbm-1.8.3-no-build-date.patch new file mode 100644 index 0000000..5b44fd9 --- /dev/null +++ b/packaging/gdbm-1.8.3-no-build-date.patch @@ -0,0 +1,14 @@ +Index: version.c +=================================================================== +--- version.c.orig 2002-10-16 00:00:42.000000000 +0200 ++++ version.c 2010-08-30 01:41:23.653696000 +0200 +@@ -29,8 +29,4 @@ + #include "autoconf.h" + + /* Keep a string with the version number in it! */ +-const char * gdbm_version = "GDBM version 1.8.3. 10/15/2002" +-#if defined(__STDC__) && defined(__DATE__) && defined(__TIME__) +- " (built " __DATE__ " " __TIME__ ")" +-#endif +- ; ++const char * gdbm_version = "GDBM version 1.8.3. 10/15/2002"; diff --git a/packaging/gdbm-1.8.3.dif b/packaging/gdbm-1.8.3.dif index 29348f6..b0df537 100644 --- a/packaging/gdbm-1.8.3.dif +++ b/packaging/gdbm-1.8.3.dif @@ -1,5 +1,5 @@ ---- a/gdbmopen.c -+++ b/gdbmopen.c 2005/08/23 08:25:23 +--- gdbmopen.c ++++ gdbmopen.c 2005/08/23 08:25:23 @@ -212,7 +212,7 @@ file_block_size = block_size; @@ -9,8 +9,8 @@ if (dbf->header == NULL) { gdbm_close (dbf); ---- a/gdbmreorg.c -+++ b/gdbmreorg.c 2005/08/24 16:07:12 +--- gdbmreorg.c ++++ gdbmreorg.c 2005/08/24 16:07:12 @@ -112,7 +112,7 @@ /* Get the mode for the old file and open the new database. */ @@ -20,8 +20,8 @@ fileinfo.st_mode, dbf->fatal_err); if (new_dbf == NULL) ---- a/Makefile.in -+++ b/Makefile.in 2005/08/23 08:25:23 +--- Makefile.in ++++ Makefile.in 2005/08/23 08:25:23 @@ -15,8 +15,8 @@ INSTALL_DATA = @INSTALL_DATA@ @@ -95,8 +95,8 @@ lintgdbm: lint $(DEFS) $(LFLAGS) $(DBM_CF) $(NDBM_CF) $(GDBM_CF) testgdbm.c ---- a/systems.h -+++ b/systems.h 2005/08/23 08:25:23 +--- systems.h ++++ systems.h 2005/08/23 08:25:23 @@ -23,7 +23,7 @@ Computer Science Department Western Washington University diff --git a/packaging/gdbm-destdir.patch b/packaging/gdbm-destdir.patch deleted file mode 100644 index 40052b6..0000000 --- a/packaging/gdbm-destdir.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- gdbm-1.8.3/Makefile.in.org 2009-02-08 02:26:13.000000000 -0800 -+++ gdbm-1.8.3/Makefile.in 2009-02-08 02:26:36.000000000 -0800 -@@ -127,27 +127,27 @@ all: libgdbm.la libgdbm_compat.la - progs: $(PROGS) - - install: libgdbm.la gdbm.h gdbm.info -- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \ -- $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \ -- $(INSTALL_ROOT)$(infodir) -+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \ -+ $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \ -+ $(DESTDIR)$(infodir) - $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm.la \ -- $(INSTALL_ROOT)$(libdir)/libgdbm.la -+ $(DESTDIR)$(libdir)/libgdbm.la - $(INSTALL_DATA) gdbm.h \ -- $(INSTALL_ROOT)$(includedir)/gdbm.h -+ $(DESTDIR)$(includedir)/gdbm.h - $(INSTALL_DATA) $(srcdir)/gdbm.3 \ -- $(INSTALL_ROOT)$(man3dir)/gdbm.3 -+ $(DESTDIR)$(man3dir)/gdbm.3 - $(INSTALL_DATA) $(srcdir)/gdbm.info \ -- $(INSTALL_ROOT)$(infodir)/gdbm.info -+ $(DESTDIR)$(infodir)/gdbm.info - - install-compat: -- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \ -- $(INSTALL_ROOT)$(includedir) -+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \ -+ $(DESTDIR)$(includedir) - $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm_compat.la \ -- $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la -+ $(DESTDIR)$(libdir)/libgdbm_compat.la - $(INSTALL_DATA) $(srcdir)/dbm.h \ -- $(INSTALL_ROOT)$(includedir)/dbm.h -+ $(DESTDIR)$(includedir)/dbm.h - $(INSTALL_DATA) $(srcdir)/ndbm.h \ -- $(INSTALL_ROOT)$(includedir)/ndbm.h -+ $(DESTDIR)$(includedir)/ndbm.h - - #libgdbm.a: $(OBJS) gdbm.h - # rm -f libgdbm.a - diff --git a/packaging/gdbm-fix_testprogs.patch b/packaging/gdbm-fix_testprogs.patch index ab31d7d..2872256 100644 --- a/packaging/gdbm-fix_testprogs.patch +++ b/packaging/gdbm-fix_testprogs.patch @@ -1,5 +1,5 @@ ---- a/testdbm.c -+++ b/testdbm.c +--- testdbm.c ++++ testdbm.c @@ -31,6 +31,9 @@ #include "autoconf.h" @@ -67,8 +67,8 @@ key_data.dptr = key_line; key_data.dsize = strlen (key_line)+1; if (delete (key_data) != 0) ---- a/testgdbm.c -+++ b/testgdbm.c +--- testgdbm.c ++++ testgdbm.c @@ -37,10 +37,22 @@ #include "getopt.h" @@ -92,8 +92,8 @@ gdbm_file_info *gdbm_file; /* Debug procedure to print the contents of the current hash bucket. */ ---- a/testndbm.c -+++ b/testndbm.c +--- testndbm.c ++++ testndbm.c @@ -42,6 +42,9 @@ #if HAVE_FCNTL_H #include diff --git a/packaging/gdbm-protoize_dbm_headers.patch b/packaging/gdbm-protoize_dbm_headers.patch index ddcad7e..a8af2d8 100644 --- a/packaging/gdbm-protoize_dbm_headers.patch +++ b/packaging/gdbm-protoize_dbm_headers.patch @@ -1,5 +1,5 @@ ---- a/dbm.h -+++ b/dbm.h +--- dbm.h ++++ dbm.h @@ -1,7 +1,7 @@ /* dbm.h - The include file for dbm users. */ @@ -49,9 +49,9 @@ +extern datum nextkey __P((datum key)); -extern int dbmclose (); -+extern int dbmclose __P((DBM *)); ---- a/ndbm.h -+++ b/ndbm.h ++extern int dbmclose __P((void)); +--- ndbm.h ++++ ndbm.h @@ -1,7 +1,7 @@ /* ndbm.h - The include file for ndbm users. */ diff --git a/packaging/gdbm-prototype_static_functions.patch b/packaging/gdbm-prototype_static_functions.patch index 3cf6b98..d672dc1 100644 --- a/packaging/gdbm-prototype_static_functions.patch +++ b/packaging/gdbm-prototype_static_functions.patch @@ -1,5 +1,5 @@ ---- a/gdbmseq.c -+++ b/gdbmseq.c +--- gdbmseq.c ++++ gdbmseq.c @@ -41,6 +41,8 @@ at ELEM_LOC of the current bucket and using RETURN_VAL as the place to put the data that is found. */ diff --git a/packaging/gdbm-stamp.patch b/packaging/gdbm-stamp.patch deleted file mode 100644 index a2ac7e0..0000000 --- a/packaging/gdbm-stamp.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/version.c -+++ b/version.c -@@ -31,6 +31,6 @@ - /* Keep a string with the version number in it! */ - const char * gdbm_version = "GDBM version 1.8.3. 10/15/2002" - #if defined(__STDC__) && defined(__DATE__) && defined(__TIME__) -- " (built " __DATE__ " " __TIME__ ")" -+ " (built in 2010)" - #endif - ; diff --git a/packaging/gdbm.changes b/packaging/gdbm.changes index 22b75a0..1348e17 100644 --- a/packaging/gdbm.changes +++ b/packaging/gdbm.changes @@ -1,17 +1,14 @@ -* Mon May 30 2011 Carsten Munk - 1.8.3 -- Fix ARM build: Drop awkward part of gdbm-destdir.patch which overrode - autoconf details and hardcoded X86 CFLAGS. Verified to work on both - IA and ARM. +* Sun Jun 24 2012 Anas Nashif 637e5c0 +- re-add manifest -* Sat Feb 27 2010 Anas Nashif - 1.8.3 -- Remove timestamp from binaries to avoid rebuilds +* Thu Jun 21 2012 Anas Nashif 79a9fd4 +- fixed requirements and add ndbm.h for perl -* Tue Feb 09 2010 Anas Nashif - 1.8.3 -- Use spectacle -- Force compile with optimized CFLAGS +* Wed May 30 2012 Ryan Ware 2f3f9e4 +- Add default Smack manifest for gdbm.spec -* Sat Feb 07 2009 Arjan van de Ven 1.8.3 -- Use specbuilder +* Mon May 21 2012 Kim Kibum 1160f19 +- Upload Tizen:Base source +[ Hyesook Choi ] +- Initial empty repository -* Thu Jan 08 2009 Anas Nashif 1.8.3 -- Spec cleanup diff --git a/packaging/gdbm.spec b/packaging/gdbm.spec index 57f8da2..df9a8db 100644 --- a/packaging/gdbm.spec +++ b/packaging/gdbm.spec @@ -1,113 +1,111 @@ -# -# Do NOT Edit the Auto-generated Part! -# Generated by: spectacle version 0.22 -# -# >> macros -# << macros - -Name: gdbm -Summary: GNU Database Routines -Version: 1.8.3 -Release: 1 -Group: System/Libraries -License: GPLv2+ and LGPLv2+ -URL: http://directory.fsf.org/GNU/gdbm.html -Source0: http://ftp.gnu.org/pub/gnu/gdbm/gdbm-%{version}.tar.bz2 -Source100: gdbm.yaml -Source1001: packaging/gdbm.manifest -Patch0: gdbm-%{version}.dif -Patch1: gdbm-protoize_dbm_headers.patch -Patch2: gdbm-prototype_static_functions.patch -Patch3: gdbm-fix_testprogs.patch -Patch4: gdbm-destdir.patch -Patch5: gdbm-stamp.patch -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig - +Name: gdbm +Url: http://directory.fsf.org/GNU/gdbm.html +Version: 1.8.3 +Release: 0 +Summary: GNU dbm key/data database +License: GPL-2.0+ +Group: System/Libraries +Source: ftp://prep.ai.mit.edu/gnu/gdbm/gdbm-%{version}.tar.bz2 +Source1001: gdbm.manifest +Patch0: gdbm-%{version}.dif +Patch1: gdbm-protoize_dbm_headers.patch +Patch2: gdbm-prototype_static_functions.patch +Patch3: gdbm-fix_testprogs.patch +Patch4: gdbm-1.8.3-no-build-date.patch +BuildRequires: libtool %description -A static and dynamic library for the GNU database routines. - +GNU dbm is a library of database functions that use extensible +hashing and work similar to the standard UNIX dbm. These routines are +provided to a programmer needing to create and manipulate a hashed +database. + +The basic use of GDBM is to store key/data pairs in a data file. Each +key must be unique and each key is paired with only one data item. + +The library provides primitives for storing key/data pairs, searching +and retrieving the data by its key and deleting a key along with its +data. It also supports sequential iteration over all key/data pairs in +a database. + +For compatibility with programs using old UNIX dbm functions, the +package also provides traditional dbm and ndbm interfaces. + +%package -n libgdbm +Summary: GNU dbm key/data database +License: GPL-2.0+ +Group: System/Libraries +# O/P added in 12.2 +Obsoletes: gdbm < %version-%release +Provides: gdbm = %version-%release + +%description -n libgdbm +GNU dbm is a library of database functions that use extensible +hashing and work similar to the standard UNIX dbm. These routines are +provided to a programmer needing to create and manipulate a hashed +database. + +The basic use of GDBM is to store key/data pairs in a data file. Each +key must be unique and each key is paired with only one data item. + +The library provides primitives for storing key/data pairs, searching +and retrieving the data by its key and deleting a key along with its +data. It also supports sequential iteration over all key/data pairs in +a database. + +For compatibility with programs using old UNIX dbm functions, the +package also provides traditional dbm and ndbm interfaces. %package devel -Summary: Include Files and Libraries mandatory for Development -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Summary: Include Files and Libraries mandatory for Development +License: GPL-2.0+ ; LGPL-2.1+ +Group: Development/Libraries/C and C++ +Requires: gdbm = %{version} +Provides: gdbm:/usr/lib/libgdbm.so %description devel This package contains all necessary include files and libraries needed to develop applications that require these. - %prep -%setup -q -n %{name}-%{version} - -# gdbm-%{version}.dif -%patch0 -p1 -# gdbm-protoize_dbm_headers.patch -%patch1 -p1 -# gdbm-prototype_static_functions.patch -%patch2 -p1 -# gdbm-fix_testprogs.patch -%patch3 -p1 -# gdbm-destdir.patch -%patch4 -p1 -# gdbm-stamp.patch -%patch5 -p1 -# >> setup -# << setup +%setup -q +%patch0 +%patch1 +%patch2 +%patch3 +%patch4 %build -cp %{SOURCE1001} . -# >> build pre +cp %{S:1001} . aclocal -autoreconf --force --install -export CFLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack" -# << build pre +%reconfigure --enable-libgdbm-compat --disable-static +make %{?_smp_mflags}; -%configure --disable-static -make %{?jobs:-j%jobs} - -# >> build post -# << build post %install -rm -rf %{buildroot} -# >> install pre -# << install pre -%make_install - -# >> install post -%make_install - -%docs_package -# << install post +make install INSTALL_ROOT=$RPM_BUILD_ROOT +make install-compat INSTALL_ROOT=$RPM_BUILD_ROOT +rm -rf %{buildroot}%{_libdir}/*.la +%remove_docs -%post -p /sbin/ldconfig +%post -n libgdbm -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%postun -n libgdbm -p /sbin/ldconfig - - - - -%files -%manifest gdbm.manifest -%defattr(-,root,root,-) -# >> files +%files -n libgdbm +%manifest %{name}.manifest %doc COPYING -%{_prefix}/%{_lib}/libgdbm.so.3 -%{_prefix}/%{_lib}/libgdbm.so.3.0.0 -# << files - +%_libdir/libgdbm.so.3 +%_libdir/libgdbm.so.3.0.0 +%_libdir/libgdbm_compat.so.3 +%_libdir/libgdbm_compat.so.3.0.0 %files devel -%manifest gdbm.manifest -%defattr(-,root,root,-) -# >> files devel +%manifest %{name}.manifest +%{_prefix}/include/dbm.h +%{_prefix}/include/gdbm.h +%{_prefix}/include/ndbm.h %{_prefix}/%{_lib}/libgdbm.so -/usr/include/gdbm.h -# << files devel - +%{_prefix}/%{_lib}/libgdbm_compat.so diff --git a/packaging/gdbm.yaml b/packaging/gdbm.yaml deleted file mode 100644 index 629a39f..0000000 --- a/packaging/gdbm.yaml +++ /dev/null @@ -1,25 +0,0 @@ -Name: gdbm -Summary: GNU Database Routines -Version: 1.8.3 -Release: 1 -Group: System/Libraries -License: GPLv2+ and LGPLv2+ -URL: http://directory.fsf.org/GNU/gdbm.html -Sources: - - http://ftp.gnu.org/pub/gnu/gdbm/gdbm-%{version}.tar.bz2 -Patches: - - gdbm-%{version}.dif - - gdbm-protoize_dbm_headers.patch - - gdbm-prototype_static_functions.patch - - gdbm-fix_testprogs.patch - - gdbm-destdir.patch - - gdbm-stamp.patch -Description: A static and dynamic library for the GNU database routines. - -SubPackages: - - Name: devel - Summary: Include Files and Libraries mandatory for Development - Group: Development/Libraries - Description: | - This package contains all necessary include files and libraries needed - to develop applications that require these. -- 2.7.4