%global repoid 50585
Name: saphire
Version: 1.2.1
Release: 1%{?dist}
Summary: Yet another shell
Group: System Environment/Shells
License: GPL+
URL: http://ab25cq.web.fc2.com/
Source0: http://dl.sourceforge.jp/sash/%{repoid}/saphire-%{version}.tgz
BuildRequires: cmigemo-devel
BuildRequires: ncurses-devel
BuildRequires: oniguruma-devel
BuildRequires: readline-devel
%description
Yet another shell
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
# Patches
# Don't strip binary
sed -i.strip -e 's|install -s|install |' Makefile.in
# cp -> ln for library
sed -i.ln -e '/libsaphire.so/s|cp |ln -s -f |' Makefile.in
# Add current directory to library search path
sed -i.libpath -e '/^LIBS[2]*=/s|^\(.*\)$|\1 -L.|' Makefile.in
# Don't do lib-install for all
sed -i.all -e '/^all:/s|lib-install||' Makefile.in
# Keep timestamp
sed -i.stamp \
-e 's| -m 0755| -p -m 0755|g' \
-e 's| -m 0644| -p -m 0644|g' \
Makefile.in
# Umm...
sed -i.soname \
-e '/[ \t]/s|\( -o libsaphire.so.1.0 \)| -Wl,-soname,libsaphire.so.1 \1|' \
Makefile.in
# FIX CRLF
for file in \
USAGE.*.txt
do
sed -i.dos -e 's|\r||' $file
touch -r $file{.dos,}
rm $file.dos
done
%build
# Move maybe-arch-dependent file out of %%sysconfdir
# --docdir is needed
%configure \
--with-migemo \
--with-system-migemodir=%{_datadir}/cmigemo \
--sysconfdir=%{_libdir}/%{name} \
--docdir=%{_defaultdocdir}/%{name}-%{version} \
--includedir=%{_includedir}/%{name}
# configure overrides $CFLAGS
# Kill parallel make
# Umm... override docdir also here
make -j1 \
CC="gcc %{optflags}" \
docdir=%{_defaultdocdir}/%{name}-%{version} \
-k
%install
# Unfortunately, this Makefile.in does not honor DESTDIR, so
# let's use %%makeinstall :(
# docdir is to be cleaned up with %%doc, however specify it
# anyway for consistency
%makeinstall \
lib-install \
sysconfdir=%{buildroot}%{_libdir}/%{name} \
docdir=%{buildroot}%{_defaultdocdir}/%{name}-%{version} \
includedir=%{buildroot}%{_includedir}/%{name}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS
%doc GPL
%doc README.en.txt
%doc USAGE.en.txt
%lang(ja) %doc CHANGELOG.txt
%lang(ja) %doc README.ja.txt
%lang(ja) %doc USAGE.ja.txt
%{_bindir}/%{name}
%{_bindir}/sash
%{_libdir}/lib%{name}.so.1*
%{_libdir}/%{name}/
%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%changelog
* Sun Jan 14 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.2.1-1
- 1.2.1
* Sun Jan 9 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.2.0-1
- 1.2.0
* Wed Jan 5 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.1.7-1
- 1.1.7
* Sun Jan 2 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.1.4-1
- 1.1.4
* Sat Jan 1 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.1.2-1
- 1.1.2
* Wed Dec 29 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.1.0-2.respin1
- 1.1.0 respun
* Wed Dec 29 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.1.0-1
- 1.1.0
* Wed Dec 21 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.0.8-1
- 1.0.8
* Tue Dec 21 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.0.7-1
- 1.0.7
* Fri Dec 17 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.0.6-1
- 1.0.6
* Thu Dec 16 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.0.5-1
- 1.0.5
* Thu Dec 9 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.0.2-1
- 1.0.2
* Tue Dec 7 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.0.1-1
- 1.0.1
* Sat Dec 4 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.0.0-1
- 1.0.0
* Fri Nov 10 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.9.5-1
- Initial packaging