# Note this is NOT a relocatable thing :)
%define name		xml-i18n-tools
%define ver		@VERSION@
%define RELEASE		1
%define rel		%{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}

Name:		%name
Summary:	This module contains some utility scripts and assorted auto* magic for internationalizing various kinds of XML files.
Version: 	%ver
Release: 	%rel
Copyright: 	GPL
Group:		Development/Tools
Source: 	%{name}-%{ver}.tar.gz
URL: 		http://nautilus.eazel.com/
BuildRoot:	/var/tmp/%{name}-%{ver}-root
BuildArch:      noarch

%description
** Automatically extracts translatable strings from oaf, glade, bonobo
  ui, nautilus theme and other XML files into the po files.

** Automatically merges translations from po files back into .oaf files
  (encoding to be 7-bit clean). I can also extend this merging
  mechanism to support other types of XML files.

%package devel
Summary:	Libraries and include files for developing Ammonite clients
Group:		Development/Libraries
Requires:	%name = %{PACKAGE_VERSION}
Obsoletes:	%{name}-devel

%description devel
This package provides the necessary development libraries and include
files to allow you to develop components that make use of the Ammonite authentication
services.  You will need to install this package if you intend to build Nautilus
from source code.

%changelog
* Sun Feb 18 2001 Gregory Leblanc <gleblanc@cu-portland.edu>
- Changes to make the spec file more portable across RPM based
  systems.  Changes mainly consisted of using macros better, and
  removing any hard-coded paths.

* Thu Jan 04 2000 Robin * Slomkowski <rslomkow@eazel.com>
- created this thing

%prep
%setup

%build
%ifarch alpha
  MYARCH_FLAGS="--host=alpha-redhat-linux"
%endif

LC_ALL=""
LINGUAS=""
LANG=""
export LC_ALL LINGUAS LANG

CFLAGS="$RPM_OPT_FLAGS" ./configure $MYARCH_FLAGS --prefix=%{_prefix} \
	--sysconfdir=%{_sysconfdir}

if [ "$SMP" != "" ]; then
  (make "MAKE=make -k -j $SMP"; exit 0)
  make
else
  make
fi

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

make prefix=$RPM_BUILD_ROOT%{_prefix} sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install

for FILE in "$RPM_BUILD_ROOT/bin/*"; do
	file "$FILE" | grep -q not\ stripped && strip $FILE
done

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%post
  
%postun 

%files

%defattr(0555, bin, bin)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/*
%{_datadir}/xml-i18n-tools/*

%defattr (0444, bin, bin)
# Should go in a devel package.
%{_datadir}/aclocal/*.m4
