]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blame - gettext/gettext.nm
gettext: Switch to patchelf to remove the RPATH
[people/stevee/ipfire-3.x.git] / gettext / gettext.nm
CommitLineData
166a6c21 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
166a6c21
MT
4###############################################################################
5
802ea3af 6name = gettext
ae42ca81 7version = 0.21.1
2af13801 8release = 5
166a6c21 9
802ea3af 10groups = System/Base
ae42ca81 11url = https://www.gnu.org/software/gettext/
802ea3af
MT
12license = GPLv3 LGPL2+
13summary = GNU libraries and utilities for producing multi-lingual messages.
48add3fd 14
802ea3af 15description
c28cd4f9
SS
16 The GNU gettext package provides a set of tools and documentation for
17 producing multi-lingual messages in programs. Tools include a set of
18 conventions about how programs should be written to support message
19 catalogs, a directory and file naming organization for the message
20 catalogs, a runtime library which supports the retrieval of translated
21 messages, and stand-alone programs for handling the translatable and
22 the already translated strings. Gettext provides an easy to use
23 library and tools for creating, using, and modifying natural language
24 catalogs and is a powerful and simple method for internationalizing
166a6c21 25 programs.
802ea3af
MT
26end
27
ae42ca81
MT
28source_dl = https://ftp.gnu.org/pub/gnu/gettext/
29sources = %{thisapp}.tar.xz
802ea3af
MT
30
31build
32 requires
33 bison
5dd3a80e
MT
34 expat-devel
35 glib2-devel
5dd3a80e 36 libunistring-devel
802ea3af 37 libxml2-devel
5dd3a80e 38 ncurses-devel
9f4adeab 39 patchelf
802ea3af
MT
40 end
41
42 configure_options += \
43 --disable-static \
44 --enable-shared \
45 --disable-rpath
46
6659cc11
SS
47 configure_cmds
48 # Add additional compiler flages to build gettext-tools binaries with
49 # proper hardening.
50 sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \
51 %{DIR_APP}/gettext-tools/src/Makefile
52 end
53
3f942a52 54 test
1a6465d9 55 make check || :
3f942a52 56 end
5697a8bb
MT
57
58 install_cmds
59 # cleanup rpaths
60 for i in $(find %{BUILDROOT}%{bindir} %{BUILDROOT}%{libdir} -type f); do
61 if file ${i} | grep "ELF 64-bit" >/dev/null; then
9f4adeab 62 patchelf --remove-rpath ${i}
5697a8bb
MT
63 fi
64 done
b0fdf190
MT
65
66 # Fix library permissions.
67 chmod 755 %{BUILDROOT}%{libdir}/preloadable_libintl.so
c6400812
SS
68
69 # Remove examples.
70 rm -rvf %{BUILDROOT}%{docdir}/%{name}/examples
71
72 # Gettext provides only a HTML documentation, so we
73 # safely can drop the remaining doc directory.
74 rm -rvf %{BUILDROOT}%{docdir}
75
76 # Drop trigger and team-address files for GNOME, KDE and TP projects
77 rm -rvf %{BUILDROOT}%{datadir}/%{name}/projects
5697a8bb 78 end
802ea3af
MT
79end
80
81packages
82 package %{name}
d4b092db
MT
83 provides
84 bundled(gnulib)
85 bundled(libcroco) = 0.6.12
86 end
b23cda09
SS
87
88 filter_requires = (Shell)
5dd3a80e 89 end
1f9bc2f0 90
997373fd
SS
91 package %{name}-common-devel
92 summary = Common development files for gettext.
93 description = %{summary}
94 arch = noarch
95
96 files
97 /usr/share/gettext/
98 end
b23cda09
SS
99
100 filter_requires = (Shell)
997373fd
SS
101 end
102
802ea3af
MT
103 package %{name}-devel
104 template DEVEL
c28cd4f9 105
5697a8bb 106 requires
997373fd 107 gettext-common-devel=%{thisver}
c28cd4f9 108 gettext-libs=%{thisver}
d137cccc 109 git
5697a8bb 110 end
997373fd 111
b23cda09
SS
112 filter_requires = (Shell)
113
997373fd
SS
114 files += \
115 /usr/bin/autopoint \
116 /usr/share/man/man1/autopoint.1
c28cd4f9
SS
117 end
118
119 package %{name}-libs
120 template LIBS
121
b23cda09
SS
122 filter_requires = (Shell)
123
c28cd4f9 124 files
5697a8bb
MT
125 %{libdir}/libgettextlib-*.so
126 %{libdir}/libgettextpo.so.*
127 %{libdir}/libgettextsrc-*.so
128 %{libdir}/preloadable_libintl.so
c28cd4f9 129 end
802ea3af 130 end
1f9bc2f0
MT
131
132 package %{name}-debuginfo
133 template DEBUGINFO
134 end
802ea3af 135end