tinycdb/tinycdb.spec
张翼 5a7f78a6e7 Replaced declaration of help subpackage with the package_help macro.
(cherry picked from commit f6d954f49086f6afbb43812a541cadf0d5a892c2)
2025-02-21 14:47:38 +08:00

69 lines
1.8 KiB
RPMSpec

%global _description \
TinyCDB is a very fast and simple package for creating and reading constant data bases, \
a data structure introduced by Dan J. Bernstein in his cdb package. It may be used \
to speed up searches in a sequence of (key,value) pairs with very big number of records.
Name: tinycdb
Version: 0.78
Release: 12
Summary: A very fast and simple package for creating and reading constant databases
License: Public Domain
URL: http://www.corpit.ru/mjt/tinycdb.html
Source0: http://www.corpit.ru/mjt/tinycdb/tinycdb-%{version}.tar.gz
Source1: libcdb.pc
BuildRequires: gcc
%description %_description
%package devel
Summary: Development files for tinycdb
Requires: tinycdb = %{version}-%{release}
%description devel %_description
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
cp %{SOURCE1} debian/
sed -i -e 's\/lib\/%{_lib}\g' debian/libcdb.pc
%build
%make_build staticlib sharedlib cdb-shared CFLAGS="%{optflags}"
%install
install -d %{buildroot}%{_libdir}
%make_install prefix=%{_prefix} libdir=%{_libdir} mandir=%{_mandir} \
install-sharedlib INSTALLPROG=cdb-shared CP="cp -p"
chmod +x %{buildroot}%{_libdir}/*.so.*
install -d %{buildroot}%{_libdir}/pkgconfig
cp -p debian/libcdb.pc %{buildroot}%{_libdir}/pkgconfig/libcdb.pc
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%doc NEWS ChangeLog
%{_bindir}/cdb
%{_libdir}/*.so.*
%files devel
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%exclude %{_libdir}/lib*.a
%files help
%{_mandir}/man1/*.1*
%{_mandir}/man5/*.5*
%{_mandir}/man3/*.3*
%changelog
* Tue Aug 20 2024 zhangyi <yizhang@cqsoftware.com.cn> - 0.78-12
- Replaced declaration of help subpackage with the 'package_help' macro.
* Fri Nov 15 2019 sunguoshuai <sunguoshuai@huawei.com> - 0.78-11
- Package init