###############################################################################
name = gettext
-version = 0.18.1.1
-release = 3
+version = 0.21.1
+release = 4
groups = System/Base
-url = http://www.gnu.org/software/gettext/
+url = https://www.gnu.org/software/gettext/
license = GPLv3 LGPL2+
summary = GNU libraries and utilities for producing multi-lingual messages.
programs.
end
-source_dl = http://ftp.gnu.org/pub/gnu/gettext/
+source_dl = https://ftp.gnu.org/pub/gnu/gettext/
+sources = %{thisapp}.tar.xz
build
requires
bison
- libcroco-devel
+ chrpath
+ expat-devel
+ glib2-devel
+ libunistring-devel
libxml2-devel
+ ncurses-devel
end
configure_options += \
--enable-shared \
--disable-rpath
-# Disable testsuite - it's broken ( readlink test )
-# test
-# make check
-# end
+ configure_cmds
+ # Add additional compiler flages to build gettext-tools binaries with
+ # proper hardening.
+ sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \
+ %{DIR_APP}/gettext-tools/src/Makefile
+ end
+
+ test
+ make check || :
+ end
+
+ install_cmds
+ # cleanup rpaths
+ for i in $(find %{BUILDROOT}%{bindir} %{BUILDROOT}%{libdir} -type f); do
+ if file ${i} | grep "ELF 64-bit" >/dev/null; then
+ chrpath -l ${i} && chrpath --delete ${i}
+ fi
+ done
+
+ # Fix library permissions.
+ chmod 755 %{BUILDROOT}%{libdir}/preloadable_libintl.so
+
+ # Remove examples.
+ rm -rvf %{BUILDROOT}%{docdir}/%{name}/examples
+
+ # Gettext provides only a HTML documentation, so we
+ # safely can drop the remaining doc directory.
+ rm -rvf %{BUILDROOT}%{docdir}
+
+ # Drop trigger and team-address files for GNOME, KDE and TP projects
+ rm -rvf %{BUILDROOT}%{datadir}/%{name}/projects
+
+ # Fix permissions of gettext config.rpath script.
+ chmod 644 %{BUILDROOT}%{datadir}/%{name}/config.rpath
+ end
end
packages
package %{name}
+ provides
+ bundled(gnulib)
+ bundled(libcroco) = 0.6.12
+ end
+
+ filter_requires = (Shell)
+ end
+
+ package %{name}-common-devel
+ summary = Common development files for gettext.
+ description = %{summary}
+ arch = noarch
+
+ files
+ /usr/share/gettext/
+ end
+
+ filter_requires = (Shell)
+ end
package %{name}-devel
template DEVEL
- requires += \
+ requires
+ gettext-common-devel=%{thisver}
gettext-libs=%{thisver}
+ git
+ end
+
+ filter_requires = (Shell)
+
+ files += \
+ /usr/bin/autopoint \
+ /usr/share/man/man1/autopoint.1
end
package %{name}-libs
template LIBS
+ filter_requires = (Shell)
+
files
- /usr/lib/libgettextlib-*.so
- /usr/lib/libgettextpo.so.*
- /usr/lib/libgettextsrc-*.so
- /usr/lib/preloadable_libintl.so
+ %{libdir}/libgettextlib-*.so
+ %{libdir}/libgettextpo.so.*
+ %{libdir}/libgettextsrc-*.so
+ %{libdir}/preloadable_libintl.so
end
end