findutils/plocate

This commit is contained in:
Michael A. Peters 2023-05-18 19:54:39 -07:00
parent d70b3af4ae
commit 904d333b95
3 changed files with 233 additions and 0 deletions

81
SPECS/findutils.spec Normal file
View File

@ -0,0 +1,81 @@
%if 0%{?!insinfo:1} == 1
%global insinfo /sbin/install-info
%endif
Name: findutils
Version: 4.9.0
Release: %{?repo}0.rc1%{?dist}
Summary: basic directory searching utilities
Group: System Environment/Utilities
License: GPL-3.0-or-later
URL: https://www.gnu.org/software/findutils/
Source0: https://ftp.gnu.org/gnu/findutils/findutils-%{version}.tar.xz
BuildRequires: libpcre2-devel
Requires(post): %{insinfo}
Requires(preun): %{insinfo}
%description
The GNU Find Utilities are the basic directory searching utilities of
the GNU operating system. These programs are typically used in conjunction
with other programs to provide modular and powerful directory search and
file locating capabilities to other commands.
%prep
%setup -q
%build
%configure \
--localstatedir=%{_sharedstatedir}/locate
make %{?_smp_mflags}
%check
%if 0%{?runtests:1} == 1
make check > %{name}-make.check.log 2>&1
%else
echo "make check not run during package build" > %{name}-make.check.log
%endif
%post
%{insinfo} %{_infodir}/find-maint.info %{_infodir}/dir ||:
%{insinfo} %{_infodir}/find.info %{_infodir}/dir ||:
%preun
if [ $1 = 0 ]; then
%{insinfo} --delete %{_infodir}/find-maint.info %{_infodir}/dir ||:
%{insinfo} --delete %{_infodir}/find.info %{_infodir}/dir ||:
fi
%install
make install DESTDIR=%{buildroot}
%find_lang %{name}
%files -f %{name}.lang
%defattr(-,root,root,-)
%attr(0755,root,root) %{_bindir}/find
%exclude %{_bindir}/locate
%exclude %{_bindir}/updatedb
%attr(0755,root,root) %{_bindir}/xargs
%attr(0755,root,root) %{_libexecdir}/frcode
%exclude %{_infodir}/dir
%attr(0644,root,root) %{_infodir}/find-maint.info*
%attr(0644,root,root) %{_infodir}/find.info*
%attr(0644,root,root) %{_mandir}/man1/find.1*
%exclude %{_mandir}/man1/locate.1*
%exclude %{_mandir}/man1/updatedb.1*
%attr(0644,root,root) %{_mandir}/man1/xargs.1*
%exclude %{_mandir}/man5/locatedb.5*
#%%dir %%{_sharedstatedir}/locate
%license COPYING
%doc AUTHORS ChangeLog COPYING NEWS README THANKS TODO
%doc %{name}-make.check.log
%changelog
* Thu May 18 2023 Michael A. Peters <anymouseprophet@gmail.com> - 4.9.0-0.rc1
- Initial spec file for YJL (RPM bootstrapping LFS/BLFS 11.3)
- Not packaging locate or updatedb (using plocate for them)

82
SPECS/liburing.spec Normal file
View File

@ -0,0 +1,82 @@
%global gittag 2.3
Name: liburing
Version: %{gittag}
Release: %{?repo}0.dev1%{?dist}
Summary: Linux-native io_uring I/O access library
Group: System Environment/Libraries
License: (GPL-2.0-only with exceptions and LGPL-2.0-or-later) or MIT
URL: https://git.kernel.dk/cgit/liburing/
Source0: https://git.kernel.dk/cgit/liburing/snapshot/liburing-2.3.tar.bz2
#BuildRequires:
#Requires:
%description
Provides native async IO for the Linux kernel, in a fast and efficient
manner, for both buffered and O_DIRECT.
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
This package provides header files to include and libraries to link with
for the Linux-native io_uring.
%prep
%setup -q
%build
# it doesn't like %%configure
CFLAGS="${CFLAGS:--O2 -g}" ; export CFLAGS ;
CXXFLAGS="${CXXFLAGS:--O2 -g}" ; export CXXFLAGS ;
FFLAGS="${FFLAGS:--O2 -g }" ; export FFLAGS ;
FCFLAGS="${FCFLAGS:--O2 -g }" ; export FCFLAGS ;
LDFLAGS="${LDFLAGS:-}" ; export LDFLAGS;
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--libdevdir=%{_libdir} \
--mandir=%{_mandir} \
--includedir=%{_includedir}
make %{?_smp_mflags}
#%%check
#make test > %%{name}-make.test.log 2>&1
%install
make install DESTDIR=%{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%attr(0755,root,root) %{_libdir}/liburing.so.2.3
%{_libdir}/liburing.so.2
%license COPYING COPYING.GPL LICENSE
%doc CHANGELOG CITATION.cff COPYING* LICENSE README SECURITY.md
%files devel
%defattr(-,root,root,-)
%attr(0644,root,root) %{_includedir}/liburing.h
%dir %{_includedir}/liburing
%attr(0644,root,root) %{_includedir}/liburing/*.h
%exclude %{_libdir}/liburing.a
%{_libdir}/liburing.so
%attr(0644,root,root) %{_libdir}/pkgconfig/liburing.pc
%attr(0644,root,root) %{_mandir}/man2/*.2*
%attr(0644,root,root) %{_mandir}/man3/*.3*
%attr(0644,root,root) %{_mandir}/man7/*.7*
%license COPYING COPYING.GPL LICENSE
%doc CHANGELOG CITATION.cff COPYING* LICENSE README SECURITY.md
%changelog
* Thu May 18 2023 Michael A. Peters <anymouseprophet@gmail.com> - 2.3-0.dev1
- Initial spec file for YJL

70
SPECS/plocate.spec Normal file
View File

@ -0,0 +1,70 @@
%if 0%{?!__meson:1} == 1
%global __meson %{_bindir}/meson
%endif
%if 0%{?!__ninja:1} == 1
%global __ninja %{_bindir}/ninja
%endif
Name: plocate
Version: 1.1.18
Release: %{?repo}0.dev1%{?dist}
Summary: A much faster locate
Group: System Environment/Utilities
License: GPL-2.0-or-later and GPL-2.0-only
URL: https://plocate.sesse.net/
Source0: https://plocate.sesse.net/download/plocate-1.1.18.tar.gz
BuildRequires: %{__meson}
BuildRequires: %{__ninja}
BuildRequires: pkgconfig(liburing)
#Requires:
%description
plocate is a locate based on posting lists. Compared to mlocate,
it is much faster, and its index is much smaller. updatedb speed
is similar (or you can convert mlocate's index to plocate format
using plocate-build). It supports most mlocate options;
see --help or the man page (man -l plocate.1) for more information.
%prep
%setup -q
%build
%{__meson} setup \
--prefix=%{_prefix} \
obj
cd obj
%{__ninja}
# -Dinstall_cron=true \
%install
cd obj
DESTDIR=%{buildroot} %{__ninja} install
ln -s plocate %{buildroot}%{_bindir}/locate
ln -s plocate.1 %{buildroot}%{_mandir}/man1/locate.1
%files
%defattr(-,root,root,-)
%attr(0755,root,root) %{_bindir}/plocate
%{_bindir}/locate
%attr(0755,root,root) %{_sbindir}/plocate-build
%attr(0755,root,root) %{_sbindir}/updatedb
%attr(0644,root,root) %{_mandir}/man1/plocate.1*
%{_mandir}/man1/locate.1*
%attr(0644,root,root) %{_mandir}/man5/updatedb.conf.5*
%attr(0644,root,root) %{_mandir}/man8/plocate-build.8*
%attr(0644,root,root) %{_mandir}/man8/updatedb.8*
%dir %{_sharedstatedir}/plocate
%attr(0644,root,root) %{_sharedstatedir}/plocate/CACHEDIR.TAG
%doc
%changelog
* Thu May 18 2023 Michael A. Peters <anymouseprophet@gmail.com> - 1.1.18-0.dev1
- Initial spec file for YJL
- Need to setup perms/cronjob (cronjob until systemd)