File aspell.spec of Package aspell

#
# spec file for package aspell (Version 0.60.6)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           aspell
BuildRequires:  gcc-c++ ncurses-devel
License:        LGPL v2.1 or later
Group:          Productivity/Text/Spell
Provides:       spell pspell
Recommends:     aspell-en
Obsoletes:      pspell
PreReq:         %install_info_prereq
AutoReqProv:    on
# bug437293
%ifarch ppc64
Obsoletes:      aspell-64bit
%endif
#
Version:        0.60.6
Release:        28
Summary:        A Free and Open Source Spell Checker
Url:            http://aspell.net/
Source:         aspell-%{version}.tar.bz2
Source2:        baselibs.conf
Patch1:         aspell-strict-aliasing.patch
Patch3:         aspell-quotes.patch
Patch4:         aspell-epmty_file.patch
Patch6:         aspell-make-static-filters.patch
Patch7:         aspell-iterator-after-erase.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Suggests:       aspell-ispell

%description
GNU Aspell is a spell checker designed to eventually replace Ispell. It
can be used as a library or as an independent spell checker.

Its main feature is that it does a much better job of coming up with
possible suggestions than just about any other spell checker available
for the English language, including Ispell and Microsoft Word. It also
has many other technical enhancements over Ispell, such as using shared
memory for dictionaries and intelligently handling personal
dictionaries when more than one Aspell process is open at once.



Authors:
--------
    Kevin Atkinson kevina@gnu.org

%package devel
License:        LGPL v2.1 or later
Provides:       pspell-devel
Requires:       aspell = %{version} libstdc++-devel glibc-devel
PreReq:         %install_info_prereq
Obsoletes:      pspell-devel
Summary:        Include Files and Libraries Mandatory for Development
Group:          Development/Libraries/C and C++

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.



Authors:
--------
    Kevin Atkinson kevina@gnu.org

%package ispell
License:        LGPL v2.1 or later
Requires:       aspell = %{version}
Summary:        A Free and Open Source Spell Checker
Group:          Productivity/Text/Spell
Conflicts:      ispell

%description ispell
GNU Aspell is a spell checker designed to eventually replace Ispell. It
can be used as a library or as an independent spell checker.

Its main feature is that it does a much better job of coming up with
possible suggestions than just about any other spell checker available
for the English language, including Ispell and Microsoft Word. It also
has many other technical enhancements over Ispell, such as using shared
memory for dictionaries and intelligently handling personal
dictionaries when more than one Aspell process is open at once.



%prep
%setup -q
%patch1
%patch3
%patch4
%patch6
%patch7

%build
#%{suse_update_config}
#rm aclocal.m4
#rm -f missing 		# Get newest from automake
gettextize -f
autoreconf -fi
libtoolize -f
CFLAGS="$RPM_OPT_FLAGS" \
CXXFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=%{_prefix} \
	    --libdir=%{_prefix}/%_lib \
	    --infodir=%{_infodir} \
	    --mandir=%{_mandir} \
            --enable-curses=%{_libdir}/libncursesw.so \
            --enable-static 
# dictionary files depend on endian, needs fix, then posible
#	    --enable-pkgdatadir=%{_prefix}/share/aspell-0.60 \
#	    --enable-dict-dir=%{_prefix}/share/aspell-0.60 \
#
# hack for non expanded $echo
sed -i 's/\$echo/echo/g' libtool 
make %{?jobs:-j%jobs}

%install
make DESTDIR=$RPM_BUILD_ROOT install
ln -s %{_libdir}/aspell-0.60/ispell $RPM_BUILD_ROOT/%{_bindir}
%find_lang %{name}
#mv $RPM_BUILD_ROOT%{_datadir}/aspell/spell $RPM_BUILD_ROOT%{_bindir}/
#
# create directory for precompiled dictionaries
#install -m 755 -d $RPM_BUILD_ROOT%{_prefix}/lib/aspell
#
# documentation
#mv $RPM_BUILD_ROOT%{_datadir}/doc/aspell .

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun
/sbin/ldconfig
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}-dev.info.gz

%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}-dev.info.gz

%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING README
%doc manual/aspell.html
%{_mandir}/*/*
%{_infodir}/aspell.*
%{_bindir}/aspell
%{_bindir}/aspell-import
%{_bindir}/run-with-aspell
%{_bindir}/word-list-compress
%{_bindir}/pre*
%{_libdir}/libaspell.so.*
%{_libdir}/libpspell.so.*
%{_libdir}/aspell-0.60
#%{_prefix}/share/aspell-0.60
%{_datadir}/locale/*/*/aspell.mo

%files devel
%defattr(-,root,root)
%doc manual/aspell-dev.html
%{_infodir}/aspell-dev.*
%{_prefix}/include/*
%{_bindir}/pspell-config
%{_libdir}/lib*.a
%{_libdir}/lib*.la
%{_libdir}/libaspell.so
%{_libdir}/libpspell.so

%files ispell
%defattr(-,root,root)
%{_bindir}/ispell

%changelog