gdbm/gdbm.spec
wangzhiqiang 2325ca23d6 Fix location tracking in gdbmtool. Fix the recover command
Signed-off-by: wangzhiqiang <wangzhiqiang95@huawei.com>
(cherry picked from commit 09b9806f80585dac73fba6d640574c3d1eb7174f)
2022-06-28 16:19:37 +08:00

125 lines
3.7 KiB
RPMSpec

Name: gdbm
Version: 1.18.1
Release: 6
Epoch: 1
Summary: A library of database functions that work similar to the standard UNIX dbm
License: GPLv3+
URL: http://www.gnu.org/software/gdbm/
Source0: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
Patch0: 0000-Fix-gdbmtool-import-command.patch
Patch1: 0001-fix-gdbm_dump-usage-stack-overflow.patch
Patch2: gdbm_dump-fix-command-line-error-detection.patch
Patch3: 0002-Fix-location-tracking-in-gdbmtool.-Fix-the-recover-c.patch
BuildRequires: gcc libtool gettext readline-devel git bison flex
Provides: %{name}-libs
Provides: %{name}-libs%{?_isa}
Obsoletes: %{name}-libs
%description
GNU dbm (or GDBM, for short) 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.
%package devel
Summary: Header files and libraries for development
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: %{name}-help
Requires(post): info
Requires(preun): info
Obsoletes: %{name}-libs
%description devel
Gdbm-devel contains the header files and libraries for development.
You should install this package if you want to develop applications
base on gdbm database.
%package help
Summary: Documents for %{name}
Buildarch: noarch
Requires: man info
%description help
Man pages and other related documents for %{name}.
%prep
%autosetup -n %{name}-%{version} -p1 -S git
%build
%configure --disable-static --disable-largefile --disable-rpath --enable-libgdbm-compat
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build
%install
%make_install
%find_lang %{name}
# create symlinks for compatibility
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/gdbm
ln -sf ../gdbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/gdbm.h
ln -sf ../ndbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/ndbm.h
ln -sf ../dbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/dbm.h
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
%check
export LD_LIBRARY_PATH=`pwd`/src/.libs/:`pwd`/compat/.libs/
make check
%ldconfig_scriptlets
%post devel
/sbin/install-info %{_infodir}/gdbm.info.gz %{_infodir}/dir \
--entry="* gdbm: (gdbm). The GNU Database." || :
%preun devel
if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/gdbm.info.gz %{_infodir}/dir \
--entry="* gdbm: (gdbm). The GNU Database." || :
fi
%files -f %{name}.lang
%doc NEWS README THANKS AUTHORS NOTE-WARNING
%license COPYING
%{_bindir}/gdbm*
%{_libdir}/libgdbm.so.6*
%{_libdir}/libgdbm_compat.so.4*
%exclude %{_libdir}/*.la
%files devel
%{_libdir}/libgdbm.so
%{_libdir}/libgdbm_compat.so
%{_includedir}/*
%files help
%{_mandir}/man1/gdbm*
%{_mandir}/man3/*
%{_infodir}/*.info*
%changelog
* Mon Jun 27 2022 wangzhiqiang <wangzhiqiang95@huawei.com> - 1:1.18.1-6
- Fix location tracking in gdbmtool. Fix the recover command
* Fri Jun 24 2022 yanxiaodan <yanxiaodan@huawei.com> - 1:1.18.1-5
- gdbm_dump-fix-command-line-error-detection
* Wed Mar 02 2022 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 1.18.1-4
- Fix stack overflow in print_usage
* Thu Nov 25 2021 yangchenguang <yangchenguang@uniontech.com> - 1.18.1-3
- Fix gdbmtool parm import error
* Fri Oct 29 2021 yanglongkang <yanglongkang@huawei.com> - 1.18.1-2
- The devel package dependency is added to the devel package to resolve the installation error
* Wed Jul 29 2020 yanglongkang <yanglongkang@huawei.com> - 1.18.1-1
- update to 1.18.1 version
* Sat Aug 31 2019 guiyao <guiyao@huawei.com> - 1.18-2
- Package init