%ifos darwin %define __defattr %defattr(-,root,wheel) %define __soext dylib %else %define __defattr %defattr(-,root,root) %define __soext so %endif %define version 0.12.1 Summary: Libraries and utilties for program national language support Name: gettext Version: %{version} Release: 1a Copyright: GPL Group: Development/Tools Source: ftp://alpha.gnu.org/pub/gnu/gettext-%{version}.tar.gz Buildroot: %{_tmppath}/gettext-root Provides: libintl.dylib %description The gettext library provides an easy to use library and tools for creating, using, and modifying natural language catalogs. It is a powerfull and simple %package devel Summary: Header and library files for developing applications using gettext Group: Development/Libraries Requires: gettext %description devel This package contains header and library files for developing applications using gettext. %prep rm -rf $RPM_BUILD_ROOT %setup -q %build %ifos darwin cp /usr/share/libtool/{config.*,lt*} . CFLAGS="-no-cpp-precomp -D__GNUC_ $RPM_OPT_FLAGS -fno-common" ./configure --prefix=%{_prefix} --with-included-gettext rm -f libtool ln -s /usr/bin/glibtool libtool %else CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --with-included-gettext %endif # l=l necessary to create shared libs make l=l %install rm -rf $RPM_BUILD_ROOT # Fix busted no-emacs install for $lispdir/po-mode.el make install prefix=$RPM_BUILD_ROOT%{_prefix} lispdir=$RPM_BUILD_ROOT%{_prefix}/share/emacs/site-lisp ( cd $RPM_BUILD_ROOT rm -f .%{_prefix}/info/dir gzip -9nf .%{_prefix}/info/* %ifos darwin ranlib -s .%{_prefix}/lib/libintl.a soname=`otool -L /usr/local/lib/libintl.dylib | grep -v libintl.dylib | grep libintl | sed -e 's;.*/\(libintl\..*\.dylib\) (compat.*;\1;'` mv .%{_prefix}/lib/libintl.dylib .%{_prefix}/lib/$soname ln -s $soname .%{_prefix}/lib/libintl.dylib %endif ) pushd $RPM_BUILD_ROOT%{_prefix}/lib rm -f charset.alias libgettext*.la libasprintf.la libintl.la popd pushd $RPM_BUILD_ROOT%{_prefix}/share/doc rm -rf gettext libasprintf popd pushd $RPM_BUILD_ROOT%{_prefix}/share/locale rm -f locale.alias popd %clean rm -rf $RPM_BUILD_ROOT %files %{__defattr} %{_prefix}/bin/* %{_prefix}/info/* %{_prefix}/share/gettext %{_prefix}/share/locale/*/LC_MESSAGES/gettext*.mo %{_prefix}/share/aclocal/* %{_prefix}/share/emacs/site-lisp/* %{_prefix}/share/man/man1/* %{_prefix}/lib/gettext %ifos darwin %{_prefix}/lib/*.%{__soext} %else %{_prefix}/lib/*.%{__soext}.* %endif %files devel %{__defattr} %{_prefix}/share/man/man3/* %{_prefix}/include/* %{_prefix}/lib/*.a %ifnos darwin %{_prefix}/lib/*.%{__soext} %endif %changelog * Fri Dec 26 2003 Keisuke Fujii - Release 0.12.1-1a: built on MacOS X Release 10.3 * Sat Oct 12 2002 Keisuke Fujii - Release 4c: built on MacOS X Release 10.2 - elimiated the temporary path from install_name. * Wed Oct 9 2002 Keisuke Fujii - Release 4b: built on MacOS X Release 10.2 * Tue Oct 9 2001 Keisuke Fujii - Release 4a: built on MacOS X Release 10.1 * Fri Jul 20 2001 Keisuke Fujii - Release 3a: built on MacOS X Release 10.04 - dylib support * Thu Apr 19 2001 Keisuke Fujii - Release 1a: built on MacOS X Release 10.01 * Mon Apr 2 2001 Keisuke Fujii - Release 1: built on MacOS X PB