tcsh/tcsh.spec

154 lines
4.1 KiB
RPMSpec
Raw Normal View History

2019-09-30 11:18:15 -04:00
Name: tcsh
2021-01-27 17:15:13 +08:00
Version: 6.22.03
2021-06-12 18:34:54 +08:00
Release: 2
2019-09-30 11:18:15 -04:00
Summary: C shell with file name completion and command line editing
License: BSD
URL: http://www.tcsh.org/
2021-01-27 17:15:13 +08:00
Source0: http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/%{name}/%{name}-%{version}.tar.gz
2019-09-30 11:18:15 -04:00
2021-06-12 18:34:54 +08:00
BuildRequires: gettext-devel ncurses-devel autoconf gdb gcc
2019-09-30 11:18:15 -04:00
Requires(post): coreutils grep
Requires(postun): sed
Provides: /bin/csh /bin/tcsh
Provides: csh = %{version}
2020-08-04 15:19:34 +08:00
Patch0: fix-testcase-fail-if-noroot.patch
Patch1: fix-nice-case-fail-if-noroot.patch
2019-09-30 11:18:15 -04:00
%description
Tcsh is an enhanced but completely compatible version of the Berkeley
C-Shell, with the addition of a command line editor, command and file
name completion, listing, etc., and a bunch of small additions to the
shell itself.
%package help
Summary: help document for tcsh
BuildArch: noarch
%description help
help document for tcsh.
%prep
%autosetup -p1
%build
%configure
%make_build all
%install
%make_install
gzip $RPM_BUILD_ROOT%{_mandir}/man1/tcsh.1
rm -f $RPM_BUILD_ROOT%{_bindir}/tcsh.old
ln -sf tcsh $RPM_BUILD_ROOT%{_bindir}/csh
ln -sf tcsh.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/csh.1.gz
localedir="$RPM_BUILD_ROOT%{_datadir}/locale";
for lang in $(ls $localedir); do
if [ -d $localedir/$lang ]; then
dir="$localedir/$lang/LC_MESSAGES"
if [[ -f "$dir/tcsh.cat" ]]; then
mv $dir/tcsh.cat $dir/tcsh
echo "%lang($lang) %{_datadir}/locale/$lang/LC_MESSAGES/tcsh"
fi
fi
done > %{name}.lang
2020-03-21 21:02:17 +08:00
%check
%make_build check
2019-09-30 11:18:15 -04:00
%pre
%preun
%post
if [[ "$1" -eq 1 ]]; then
if [[ ! -f %{_sysconfdir}/shells ]]; then
echo "/bin/csh" >> %{_sysconfdir}/shells
echo "/bin/tcsh" >> %{_sysconfdir}/shells
echo "%{_bindir}/csh" >> %{_sysconfdir}/shells
echo "%{_bindir}/tcsh" >> %{_sysconfdir}/shells
else
grep -q "^/bin/csh$" %{_sysconfdir}/shells || echo "/bin/csh" >> %{_sysconfdir}/shells
grep -q "^/bin/tcsh$" %{_sysconfdir}/shells || echo "/bin/tcsh" >> %{_sysconfdir}/shells
grep -q "^%{_bindir}/csh$" %{_sysconfdir}/shells || echo "%{_bindir}/csh" >> %{_sysconfdir}/shells
grep -q "^%{_bindir}/tcsh$" %{_sysconfdir}/shells || echo "%{_bindir}/tcsh" >> %{_sysconfdir}/shells
fi
fi
%postun
if [[ "$1" -eq 0 && -f %{_sysconfdir}/shells ]]; then
sed -i -e '\!^/bin/csh$!d' %{_sysconfdir}/shells
sed -i -e '\!^/bin/tcsh$!d' %{_sysconfdir}/shells
sed -i -e '\!^%{_bindir}/csh$!d' %{_sysconfdir}/shells
sed -i -e '\!^%{_bindir}/tcsh$!d' %{_sysconfdir}/shells
fi
%files -f %{name}.lang
%defattr(-,root,root)
%doc Copyright FAQ Fixes README.md complete.tcsh
%{_bindir}/tcsh
%{_bindir}/csh
%files help
%defattr(-,root,root)
%{_mandir}/man1/*.1*
%changelog
2021-06-12 18:34:54 +08:00
* Sat Jun 12 2021 shixuantong<shixuantong@huawei> - 6.22.03-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add gcc to BuildRequires
2021-01-27 17:15:13 +08:00
* Wed Jan 27 2021 fuanan <fuanan3@huawei.com> - 6.22.03-1
- Update to version 6.22.03
2020-12-09 20:24:10 +08:00
* Wed Dec 9 2020 zoulin <zoulin13@huawei.com> - 6.22.02-2
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: Revise Source0
2020-08-04 15:19:34 +08:00
* Tue Aug 4 2020 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 6.22.02-1
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: update version to 6.22.02
2020-06-29 20:22:56 +08:00
* Mon Jun 29 2020 chenditang <chenditang1@huawei.com> - 6.21.00-6
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: fix nice case fail if noroot
2020-03-21 21:02:17 +08:00
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 6.21.00-5
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: fix testcase fail if noroot
2020-03-21 14:37:25 +08:00
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 6.21.00-4
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: add build requires of gdb
2020-01-08 19:18:10 +08:00
* Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 6.21.00-3
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: revise source0
2019-12-25 16:08:50 +08:00
* Wed Dec 18 2019 jiangchuangang <jiangchuangang@huawei.com> - 6.21.00-2
- Type:enhancement
- ID:NA
- SUG:restart
- DESC:Synchronize patches
2019-09-30 11:18:15 -04:00
* Wed Sep 04 2019 Huiming Xue <xiehuiming@huawei.com> - 6.21.00.1
- modify spec file
* Tue Sep 03 2019 Huiming Xue <xiehuiming@huawei.com> - 6.20.00.11
- Package init