2007-11-23 00:56:17 +01:00
|
|
|
#
|
|
|
|
# spec file for package gettext-csharp (Version 0.17)
|
|
|
|
#
|
2010-03-05 15:56:36 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-11-23 00:56:17 +01:00
|
|
|
#
|
2008-10-13 16:22:50 +02:00
|
|
|
# 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.
|
|
|
|
|
2007-11-23 00:56:17 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-04-10 13:16:55 +02:00
|
|
|
|
2007-11-23 00:56:17 +01:00
|
|
|
Name: gettext-csharp
|
|
|
|
BuildRequires: fdupes mono-devel perl-libintl-perl tcl
|
|
|
|
Requires: mono
|
|
|
|
Url: http://www.gnu.org/software/gettext/
|
2009-12-18 12:30:29 +01:00
|
|
|
License: LGPLv2.1+
|
2007-11-23 00:56:17 +01:00
|
|
|
Group: Development/Tools/Other
|
|
|
|
AutoReqProv: on
|
|
|
|
Version: 0.17
|
2010-03-05 15:56:36 +01:00
|
|
|
Release: 99
|
2007-11-23 00:56:17 +01:00
|
|
|
Summary: Native Language Support (NLS) for C#
|
|
|
|
PreReq: %{install_info_prereq}
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Source: gettext-%{version}.tar.bz2
|
|
|
|
Source1: gettext-rpmlintrc
|
|
|
|
Source2: suse-start-po-mode.el
|
|
|
|
Source3: gettext-linkdupes.sh
|
|
|
|
Patch: gettext-0.12.1-sigfpe.patch
|
|
|
|
Patch2: gettext-0.12.1-gettextize.patch
|
|
|
|
Patch3: gettext-codecleanup.patch
|
|
|
|
Patch4: po-mode.diff
|
|
|
|
Patch5: gettext-initialize_vars.patch
|
|
|
|
Patch6: gettext-0.15-docdir.diff
|
|
|
|
Patch7: gettext-autotools.patch
|
|
|
|
Patch8: gettext-gl_AC_TYPE_LONG_LONG.patch
|
|
|
|
Patch9: gettext-needlessly_init_vars.patch
|
2007-12-06 00:14:01 +01:00
|
|
|
Patch10: gettext-open_missing_mode.patch
|
2008-05-21 22:28:40 +02:00
|
|
|
Patch11: gettext-typo_to_segfault.patch
|
2008-10-22 17:27:33 +02:00
|
|
|
Patch12: gettext-0.17-no-autoconf-tests.diff
|
2007-11-23 00:56:17 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Mono with its 'resgen' program uses a design that Microsoft created and
|
|
|
|
that gives the power to the software vendor and not to the user: it
|
|
|
|
doesn't allow the end-user to create his own localisations for existing
|
|
|
|
programs. As documented in the gettext manual:
|
|
|
|
|
|
|
|
The advantages of the .dll' format over the .resources' format are:
|
|
|
|
|
|
|
|
1. 1. Freedom to localize: Users can add their own translations to an
|
|
|
|
application after it has been built and distributed. Whereas
|
|
|
|
when the programmer uses a ResourceManager' constructor provided
|
|
|
|
by the system, the set of .resources' files for an application
|
|
|
|
must be specified when the application is built and cannot be
|
|
|
|
extended afterwards.
|
|
|
|
|
|
|
|
2., 3., 4. ...
|
|
|
|
|
|
|
|
The included GNU.Gettext.dll gives the user this freedom back and the
|
|
|
|
also included msgfmt.net.exe and msgunfmt.net.exe handle PO files more
|
|
|
|
reliably than 'resgen'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Bruno Haible <bruno@clisp.org>
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n gettext-%{version}
|
|
|
|
%patch
|
|
|
|
%patch2
|
|
|
|
%patch3
|
|
|
|
%patch4
|
|
|
|
%patch5
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7
|
|
|
|
%patch8
|
|
|
|
%patch9
|
2007-12-06 00:14:01 +01:00
|
|
|
%patch10
|
2008-05-21 22:28:40 +02:00
|
|
|
%patch11
|
2008-10-22 17:27:33 +02:00
|
|
|
%patch12
|
2007-11-23 00:56:17 +01:00
|
|
|
pushd gettext-tools/misc
|
|
|
|
tar xfz archive.tar.gz
|
|
|
|
find . -name gettext.m4,v -print0 | xargs -0 perl -spi -e 's/\(int\) /\(long\) /g'
|
|
|
|
tar cfz archive.tar.gz archive/
|
|
|
|
popd
|
|
|
|
autoreconf -fiv
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="$RPM_OPT_FLAGS -pipe -W -Wall -Dgcc_is_lint"
|
|
|
|
export CXXFLAGS="$RPM_OPT_FLAGS -pipe -W -Wall -Dgcc_is_lint"
|
|
|
|
%configure --enable-shared --enable-csharp
|
|
|
|
make GMSGFMT=../src/msgfmt
|
|
|
|
|
|
|
|
%install
|
|
|
|
export LC_CTYPE=ISO-8859-15
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
mkdir examples
|
|
|
|
mv $RPM_BUILD_ROOT/%{_datadir}/doc/gettext/examples/*csharp* examples
|
|
|
|
mv $RPM_BUILD_ROOT/%{_datadir}/doc/gettext/csharpdoc csharpdoc
|
|
|
|
cd examples
|
|
|
|
fdupes -r *|while read dupe; do
|
|
|
|
if [ -z "$dupe" ]; then
|
|
|
|
startlink=
|
|
|
|
elif [ -z "$startlink" ]; then
|
|
|
|
startlink="$dupe"
|
|
|
|
else
|
|
|
|
ln -f "$startlink" "$dupe"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
cd ..
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{_datadir}/*
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
|
|
|
|
mv examples $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
|
|
|
|
mv csharpdoc $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
|
2009-07-29 17:31:31 +02:00
|
|
|
# exclude files packaged via other spec files
|
|
|
|
rm -Rf $RPM_BUILD_ROOT/%_bindir
|
|
|
|
rm -f $RPM_BUILD_ROOT/%_libdir/lib*
|
|
|
|
rm -f $RPM_BUILD_ROOT/%_libdir/gettext/hostname
|
|
|
|
rm -f $RPM_BUILD_ROOT/%_libdir/gettext/project-id
|
|
|
|
rm -f $RPM_BUILD_ROOT/%_libdir/gettext/urlget
|
|
|
|
rm -f $RPM_BUILD_ROOT/%_libdir/gettext/user-email
|
|
|
|
rm -Rf $RPM_BUILD_ROOT/%_includedir
|
|
|
|
rm -f $RPM_BUILD_ROOT/%_libdir/preloadable_libintl.so
|
2007-11-23 00:56:17 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %{_defaultdocdir}/%{name}
|
|
|
|
%_libdir/GNU.Gettext.dll
|
|
|
|
%_libdir/gettext/msgfmt.net.exe
|
|
|
|
%_libdir/gettext/msgunfmt.net.exe
|
|
|
|
|
|
|
|
%changelog
|