add packaging
authorAnas Nashif <anas.nashif@intel.com>
Thu, 8 Nov 2012 14:16:04 +0000 (06:16 -0800)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Mon, 10 Feb 2014 11:15:17 +0000 (12:15 +0100)
packaging/getext-stdio.in.patch [new file with mode: 0644]
packaging/gettext.spec [new file with mode: 0644]
packaging/no_examples.patch [new file with mode: 0644]

diff --git a/packaging/getext-stdio.in.patch b/packaging/getext-stdio.in.patch
new file mode 100644 (file)
index 0000000..97c477b
--- /dev/null
@@ -0,0 +1,42 @@
+Index: gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h
+===================================================================
+--- gettext-0.18.1.1.orig/gettext-runtime/gnulib-lib/stdio.in.h
++++ gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h
+@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ #undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+Index: gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h
+===================================================================
+--- gettext-0.18.1.1.orig/gettext-tools/gnulib-lib/stdio.in.h
++++ gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h
+@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ #undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+Index: gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h
+===================================================================
+--- gettext-0.18.1.1.orig/gettext-tools/libgettextpo/stdio.in.h
++++ gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h
+@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ #undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/packaging/gettext.spec b/packaging/gettext.spec
new file mode 100644 (file)
index 0000000..3c551d3
--- /dev/null
@@ -0,0 +1,200 @@
+# The split of gettext into two packages is suggested by upstream (see
+# the PACKAGING file). Here we name gettext-runtime as
+# gettext-lib. Please be noted that gettext-runtime is LGPL while the
+# others parts are of GPL. You should be careful of the license when
+# adding files into these sub-packages.
+
+
+%define enable_testing 0
+
+Name:           gettext
+Version:        0.18.1.1
+Release:        2
+License:        GPLv3+ and LGPLv2+
+Summary:        GNU libraries and utilities for producing multi-lingual messages
+Url:            http://www.gnu.org/software/gettext/
+Group:          Development/Tools
+Source:         ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
+Source2:        msghack.py
+Source1001:     packaging/gettext.manifest
+Patch0:         no_examples.patch
+Patch1:         getext-stdio.in.patch
+
+BuildRequires:  autoconf >= 2.5
+BuildRequires:  bison
+# need expat for xgettext on glade
+BuildRequires:  expat-devel
+BuildRequires:  gcc-c++
+BuildRequires:  libtool
+#needed for ANSI to UTF8 conversion using msgconn
+BuildRequires:  libunistring
+
+%description
+The GNU gettext package provides a set of tools and documentation for
+producing multi-lingual messages in programs. Tools include a set of
+conventions about how programs should be written to support message
+catalogs, a directory and file naming organization for the message
+catalogs, a runtime library which supports the retrieval of translated
+messages, and stand-alone programs for handling the translatable and
+the already translated strings. Gettext provides an easy to use
+library and tools for creating, using, and modifying natural language
+catalogs and is a powerful and simple method for internationalizing
+programs.
+
+MeeGo's gettext is split into two packages: gettext-libs and
+gettext-devel. gettext-libs is an LGPLv2+ package that contains
+libraries and runtime needed by i18n programs; gettext-devel is used
+only for development and building -- and shouldn't be needed by end
+users.  This gettext package is a meta-package that depends on
+gettext-devel for transition.
+
+%package tools
+License:        GPL-3.0+
+Summary:        Development files for %{name}
+Group:          Development/Tools
+Requires:       %{name}-runtime = %{version}
+Obsoletes:      gettext-devel <= 0.18.1.1-1.15
+Provides:       gettext-devel
+
+%description tools
+This package contains all development related files necessary for
+developing or compiling applications/libraries that needs
+internationalization capability. You also need this package if you
+want to add gettext support for your project.
+
+%package runtime
+License:        LGPL-2.0+
+Summary:        Libraries for %{name}
+Group:          System/Libraries
+Obsoletes:      gettext-libs <= 0.18.1.1-1.15
+Provides:       gettext-libs
+
+%description runtime
+This package contains libraries used internationalization support.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+
+%build
+cp %{SOURCE1001} .
+[ -f  %{_datadir}/automake/depcomp ] && cp -f %{_datadir}/automake/{depcomp,ylwrap} .
+
+%ifarch %arm
+# We add a compile flag for ARM to deal with a bug in qemu (msgmerge using pthread/gomp)
+# msgmerge will lockup during execution.
+%define addconfflag --without-libpth-prefix --disable-openmp
+%else
+%endif
+
+%reconfigure --without-included-gettext --enable-nls --disable-static \
+    --enable-shared --with-pic-=yes --disable-csharp --without-libpth-prefix --disable-openmp
+make %{?_smp_mflags} GCJFLAGS="-findirect-dispatch"
+
+%check
+make check
+
+%install
+make install DESTDIR=%{buildroot} INSTALL="install -p" \
+    lispdir=%{_datadir}/emacs/site-lisp \
+    aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
+
+install -pm 755 %{SOURCE2} %{buildroot}%{_bindir}/msghack
+
+# make preloadable_libintl.so executable
+chmod 755 %{buildroot}%{_libdir}/preloadable_libintl.so
+
+rm -f %{buildroot}%{_infodir}/dir
+
+# doc relocations
+for i in gettext-runtime/man/*.html; do
+  rm %{buildroot}%{_datadir}/doc/gettext/`basename $i`
+done
+rm -r %{buildroot}%{_datadir}/doc/gettext/javadoc*
+
+rm -rf %{buildroot}%{_datadir}/doc/gettext/examples
+
+rm -rf htmldoc
+mkdir htmldoc
+mv %{buildroot}%{_datadir}/doc/gettext/* %{buildroot}%{_datadir}/doc/libasprintf/* htmldoc
+rm -r %{buildroot}%{_datadir}/doc/libasprintf
+rm -r %{buildroot}%{_datadir}/doc/gettext
+
+# remove unpackaged files from the buildroot
+rm -rf %{buildroot}%{_datadir}/emacs
+rm %{buildroot}%{_libdir}/lib*.la
+
+
+%find_lang %{name}-runtime
+%find_lang %{name}-tools
+cat %{name}-*.lang > %{name}.lang
+
+%docs_package
+
+%post runtime -p /sbin/ldconfig
+
+%postun runtime -p /sbin/ldconfig
+
+
+%files tools -f %{name}.lang
+%manifest gettext.manifest
+%defattr(-,root,root,-)
+%doc COPYING
+%{_datadir}/%{name}/projects/*
+%{_datadir}/%{name}/config.rpath
+%{_datadir}/%{name}/*.h
+%{_datadir}/%{name}/intl
+%{_datadir}/%{name}/po
+%{_datadir}/%{name}/msgunfmt.tcl
+%{_datadir}/aclocal/*
+%{_includedir}/*
+%{_libdir}/libasprintf.so
+%{_libdir}/libgettextpo.so
+%{_libdir}/libgettextlib*.so
+%{_libdir}/libgettextsrc*.so
+%{_libdir}/preloadable_libintl.so
+%{_libdir}/gettext/hostname
+%{_libdir}/gettext/project-id
+%{_libdir}/gettext/urlget
+%{_libdir}/gettext/user-email
+%{_libdir}/libgettextpo.so.*
+%{_datadir}/%{name}/javaversion.class
+%{_datadir}/%{name}/archive*.tar.gz
+%{_datadir}/%{name}/styles
+%{_bindir}/autopoint
+%{_bindir}/gettextize
+%{_bindir}/msgattrib
+%{_bindir}/msgcat
+%{_bindir}/msgcmp
+%{_bindir}/msgcomm
+%{_bindir}/msgconv
+%{_bindir}/msgen
+%{_bindir}/msgexec
+%{_bindir}/msgfilter
+%{_bindir}/msgfmt
+%{_bindir}/msggrep
+%{_bindir}/msghack
+%{_bindir}/msginit
+%{_bindir}/msgmerge
+%{_bindir}/msgunfmt
+%{_bindir}/msguniq
+%{_bindir}/recode-sr-latin
+%{_bindir}/xgettext
+
+# Don't include language files here since that may inadvertently
+# involve unneeded files. If you need to include a file in -libs, list
+# it here explicitly
+%files runtime
+%manifest gettext.manifest
+%defattr(-,root,root,-)
+# Files listed here should be of LGPL license only, refer to upstream
+# statement in PACKAGING file
+%doc gettext-runtime/intl/COPYING*
+%doc %{_datadir}/gettext/ABOUT-NLS
+%{_bindir}/gettext
+%{_bindir}/ngettext
+%{_bindir}/envsubst
+%{_bindir}/gettext.sh
+%{_libdir}/libasprintf.so.*
diff --git a/packaging/no_examples.patch b/packaging/no_examples.patch
new file mode 100644 (file)
index 0000000..df76640
--- /dev/null
@@ -0,0 +1,13 @@
+Index: gettext-0.18.1.1/gettext-tools/Makefile.am
+===================================================================
+--- gettext-0.18.1.1.orig/gettext-tools/Makefile.am
++++ gettext-0.18.1.1/gettext-tools/Makefile.am
+@@ -20,7 +20,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependenci
+ ACLOCAL = ../build-aux/fixaclocal @ACLOCAL@
+ ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
+-SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests examples
++SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests
+ EXTRA_DIST = misc/DISCLAIM
+ MOSTLYCLEANFILES = core *.stackdump