# Upstream SCM
# Upstream is currently using SVN
# SVN path: http://svn.sourceforge.jp/svnroot/yash/yash/trunk
%global repoid 48417
%global mainver 1
%undefine minorver
Name: yash
Version: 2.22
Release: %{?minorver:0.}%{mainver}%{?minorver:.%{minorver}}%{?dist}
Summary: Yet Another SHell
Group: System Environment/Shells
License: GPLv2+
URL: http://yash.sourceforge.jp/
Source0: http://dl.sourceforge.jp/yash/%{repoid}/%{name}-%{version}%{?minorver}.tar.gz
Source1: http://dl.sourceforge.jp/yash/%{repoid}/%{name}-doc-%{version}%{?minorver}-ja.tar.gz
# Patches
BuildRequires: ncurses-devel
# Write needed Requires for scriptlets explicitly
Requires(post): grep
Requires(post): coreutils
Requires(postun): sed
%description
Yash is a command line shell that conforms to the POSIX.1 (IEEE Std
1003.1, 2008 Edition) standard for the most part.
Yash also has its own features beyond POSIX, such as:
* global aliases
* random numbers
* socket redirections and other special redirections
* right prompt
* command completion
%package doc
Summary: Documentation for %{name}
Group: Documentation
License: CC-BY-SA
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
%description doc
This package contains document files for %{name}.
%prep
%setup -q -n %{name}-%{version}%{?minorver} -a 1
%build
# This package use configure not based on autotools...
# won't accept --libdir=
env \
CC="%{__cc} -std=c99" \
CFLAGS="%{optflags}" \
\
./configure \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
--bindir=/bin \
--datarootdir=%{_datarootdir} \
make -k %{?_smp_mflags}
%install
make install \
DESTDIR=$RPM_BUILD_ROOT \
CPPROG="cp -p"
%clean
rm -rf $RPM_BUILD_ROOT
%check
make test || { sleep 3 ; cat tests/test.log ; sleep 3; exit 1; }
%post
if [ -f %{_sysconfdir}/shells ]
then
grep -q '^/bin/yash$' %{_sysconfdir}/shells || echo '/bin/yash' >> %{_sysconfdir}/shells
else
echo '/bin/yash' > %{_sysconfdir}/shells
fi
exit 0
%postun
[ "$1" = 0 ] || exit 0
[ -f %{_sysconfdir}/shells ] || exit 0
sed -i -e '\@/bin/yash$@d' %{_sysconfdir}/shells
exit 0
%files
%defattr(-,root,root,-)
%doc COPYING
%doc NEWS
%doc README
%lang(ja) %doc NEWS.ja
%lang(ja) %doc README.ja
/bin/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/completion/
%files doc
%defattr(-,root,root,-)
%lang(ja) %doc %{name}-doc-%{version}%{?minorver}/*
%changelog
* Sun Jul 25 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.22-1
- 2.22
* Tue Jul 13 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.22-0.4.b0
- Fix scriplet error
* Mon Jul 5 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.22-0.3.b0
- Fix license tag for -doc subpackage
* Sun Jul 4 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.22-0.2.b0
- Handle %%_sysconfdir/shells
- Move binary to /bin
* Sun Jul 4 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.22-0.1.b0
- Update to the released 2.22 b0
* Sat Jul 3 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.21-3.svn2087_trunk
- Try latest trunk for
* test failure on koji
* test hang on mockbuild
* Sat Jun 26 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.21-2
- Initial creation