File muttng.spec of Package muttng

#
# spec file for package muttng (Version 20061125)
#
# Copyright 2008 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.

%define rname mutt

Summary: Small and powerful text based mail client
Name: muttng
Version: 20061125
Release: 2
Source0: %{name}-latest.tar.bz2
#Source1: http://nion.modprobe.de/mutt-ng/snapshots/%{name}-latest.tar.gz
Vendor: %{vendor}
URL: http://mutt-ng.berlios.de/
License: GPL
Group: Productivity/Networking/Email/Clients
AutoReqProv: on
BuildRequires: ncurses-devel libidn-devel libdb-4_5-devel fdupes
BuildRoot: %{_builddir}/%{name}-%{version}-build

%description
mutt next generation (mutt-ng) is a fork of the
well-known email client mutt with the goal to both
incorporate all the patches that are floating
around in the web, and to fix all the other little
annoyances of mutt.

Mutt is a small but very powerful text based
program for reading electronic mail under unix
operating systems, including support color
terminals, MIME, and a threaded sorting mode.

%prep
%setup -q

%build
if [ -x ./configure ]; then
  CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \
	--datadir=%{_datadir} \
	--sysconfdir=%{_sysconfdir} \
	--with-docdir=%{_docdir}/%{name} \
	--with-idn=%{_libdir} \
	--with-regex \
	--enable-inodesort \
	--enable-nfs-fix \
	--enable-buffy-size \
	--enable-mailtool \
	--enable-compressed \
	--enable-locales-fix \
	--enable-hcache \
	--disable-dependency-tracking \
	--disable-static
else
  CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{_prefix}
fi
%{__make} %{?jobs:-j%jobs}

%debug_package

%install
%{__make} DESTDIR=$RPM_BUILD_ROOT install 
%fdupes %{buildroot}

%find_lang %{name}


### MAN LOCATION WORKAROUND ###
if [ -d "$RPM_BUILD_ROOT/usr/man" ]
then
	mkdir -p $RPM_BUILD_ROOT%{_mandir}
	mv $RPM_BUILD_ROOT/usr/man/* $RPM_BUILD_ROOT%{_mandir}
fi

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%attr(0755,root,root)%{_bindir}/%{name}
%attr(0755,root,root)%{_bindir}/%{name}bug
%attr(0755,root,root)%{_bindir}/fleang
%attr(0755,root,root)%{_bindir}/pgpewrapng
%attr(0755,root,root)%{_bindir}/pgpringng
%attr(0755,root,root)%{_bindir}/smime_keysng
%config %attr(0644,root,root)%{_sysconfdir}/Muttngrc
%config %attr(0644,root,root)%{_sysconfdir}/%{name}-mime.types



#########################
## Documentation Files ##
#########################

%package doc
Summary: Documentation and manual files for muttng, mail user agent
Group: Documentation/Other

%description doc
mutt next generation (mutt-ng) is a fork of the
well-known email client mutt with the goal to both
incorporate all the patches that are floating
around in the web, and to fix all the other little
annoyances of mutt.

This package installs manuals and documentation
necessary for muttng usage reference.


%files doc
%defattr(-,root,root,-)
%dir %{_docdir}/%{name}
%attr(0644,root,root)%{_docdir}/%{name}/samples/update-config.pl
%doc %{_docdir}/%{name}/*
%doc %{_mandir}/man1/%{name}.1.gz
%doc %{_mandir}/man1/%{name}-flea.1.gz
%doc %{_mandir}/man1/%{name}_dotlock.1.gz
%doc %{_mandir}/man1/fleang.1.gz
%doc %{_mandir}/man1/%{name}bug.1.gz
%doc %{_mandir}/man5/%{name}rc.5.gz
%doc %{_mandir}/man5/%{name}-mbox.5.gz
%exclude %{_docdir}/%{name}/manual.txt


########################
## Localization Files ##
########################

%package lang
Summary: Language translations for muttng, mail user agent
Group: System/Localization

%description lang
mutt next generation (mutt-ng) is a fork of the
well-known email client mutt with the goal to both
incorporate all the patches that are floating
around in the web, and to fix all the other little
annoyances of mutt.

This package installs the language files necessary
for translating muttng interface according to the
user local environment.


%files -f %{name}.lang lang
%defattr(-,root,root,-)


%changelog
* Tue Jun 30 2009 Mario GarcĂ­a H. <code933k@gmail.com> - 2006112
- Initial package.
openSUSE Build Service is sponsored by