grep/grep.spec
2022-11-03 14:51:41 +08:00

87 lines
2.0 KiB
RPMSpec

Name: grep
Version: 3.4
Release: 3
Summary: A string search utility
License: GPLv3+
URL: http://www.gnu.org/software/grep/
Source0: https://ftp.gnu.org/gnu/grep/grep-%{version}.tar.xz
Source1: colorgrep.sh
Source2: colorgrep.csh
Source3: grepconf.sh
Patch1: backport-grep-avoid-sticky-problem-with-f-f.patch
BuildRequires: gcc git pcre-devel >= 3.9-10 texinfo gettext
Provides: /bin/egrep /bin/fgrep /bin/grep bundled(gnulib)
%description
Grep searches one or more input files for lines containing a match to
a specified pattern. By default, Grep outputs the matching lines.
%prep
%autosetup -n %{name}-%{version} -p1
%build
%configure --without-included-regex --disable-silent-rules \
CPPFLAGS="-I%{_includedir}/pcre" CFLAGS="$RPM_OPT_FLAGS -fsigned-char"
%make_build
%install
%make_install
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -pm 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -Dpm 755 %{SOURCE3} $RPM_BUILD_ROOT%{_libexecdir}/grepconf.sh
%pre
%preun
%post
%postun
%check
make check
%files
%{_datadir}/locale/*
%config(noreplace) %{_sysconfdir}/profile.d/colorgrep.*sh
%doc NEWS README THANKS TODO
%license COPYING AUTHORS
%{_bindir}/*grep
%{_libexecdir}/grepconf.sh
%{_infodir}/grep.info.gz
%{_mandir}/man1/*grep.1.gz
%changelog
* Thu Nov 3 2022 gaoruoshu<gaoruoshu@huawei.com> - 3.4-3
- Added coloring aliases to fgrep egrep and grep
* Tue Feb 8 2022 yangzhuangzhuang<yangzhuangzhuang1@h-partners.com> - 3.4-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:avoid sticky problem with '-f - -f -'
* Wed Dec 15 2021 yangzhuangzhuang<yangzhuangzhuang1@huawei.com> - 3.4-1
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add -fsigned-char option
* Tue Jan 7 2020 JeanLeo<liujianliu.liu@huawei.com> - 3.4-0
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:update software to version 3.4
* Mon Oct 21 2019 chengquan<chengquan3@huawei.com> - 3.1-10
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix package bug
* Mon Aug 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.1-9
- Package init