]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - glibc/glibc.nm
glibc: Don't ship quota headers.
[people/amarx/ipfire-3.x.git] / glibc / glibc.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 = glibc
3994dee1 7version = 2.17
e448e014 8release = 2
802ea3af
MT
9
10maintainer = Michael Tremer <michael.tremer@ipfire.org>
11groups = System/Base
12url = http://sources.redhat.com/glibc/
13license = GPLv2+ LGPLv2+
14summary = The GNU libc libraries.
15
16description
17 The glibc package contains standard libraries which are used by
18 multiple programs on the system. In order to save disk space and
19 memory, as well as to make upgrading easier, common system code is
20 kept in one place and shared between programs. This particular package
21 contains the most important sets of shared libraries: the standard C
22 library and the standard math library. Without these two libraries, a
166a6c21 23 Linux system will not function.
802ea3af
MT
24end
25
26source_dl = http://ftp.gnu.org/gnu/glibc/
3994dee1 27sources = %{thisapp}.tar.xz
802ea3af
MT
28
29build
16cbb54b
MT
30 # Optimize glibc for kernel
31 OPTIMIZED_KERNEL = 2.6.32
32
802ea3af 33 requires
eec2ad4c 34 audit-devel
7f98fc96
MT
35 autoconf
36 automake
eec2ad4c 37 gettext
3994dee1 38 kernel-headers >= %{OPTIMIZED_KERNEL}
802ea3af
MT
39 libcap-devel
40 libselinux-devel
eec2ad4c 41 nss-devel
7f98fc96 42 texinfo
802ea3af
MT
43 end
44
45 # Build glibc with custom cflags
706fb4da 46 GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG -fPIC -DPIC
802ea3af
MT
47
48 if "%{DISTRO_ARCH}" == "i686"
49 GLIBC_FLAGS += -march=i686 -mtune=generic
706fb4da
MT
50 end
51
52 if "%{DISTRO_ARCH}" == "x86_64"
802ea3af
MT
53 GLIBC_FLAGS += -mtune=generic
54 end
55
56 export CFLAGS = %{GLIBC_FLAGS}
57 export CXXFLAGS = %{GLIBC_FLAGS}
58
802ea3af
MT
59 export QUALITY_AGENT_RPATH_ALLOW_ORIGIN=yes
60
3994dee1 61 prepare_cmds
802ea3af
MT
62 # In the vi_VN.TCVN locale, bash enters an infinite loop at startup. It is
63 # unknown whether this is a bash bug or a Glibc problem. Disable
64 # installation of this locale in order to avoid the problem.
65 sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
66
67 # The ldd shell script contains Bash-specific syntax. Change its default
68 # program interpreter to /bin/bash in case another /bin/sh is installed.
69 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
70
71 # We don't install pt_chown(1) on the final system, so why install it to
72 # $(TOOLS_DIR):
73 sed -e "/^install.*pt_chown/d" -i login/Makefile
74
75 # Build nscd with -fstack-protector-all, instead of -fstack-protector:
76 sed -e "s/fstack-protector/&-all/" -i nscd/Makefile
77
78 cat %{DIR_SOURCE}/glibc-stack_chk_fail.c > debug/stack_chk_fail.c
79
80 # Use gnu hash style
81 sed -i Makeconfig \
82 -e "s/-Wl,--hash-style=both/-Wl,--hash-style=gnu -Wl,-O1/"
83
3994dee1
MT
84 # http://sourceware.org/ml/libc-ports/2011-09/msg00018.html
85 sed -e "s/PIC/SHARED/g" -i ports/sysdeps/arm/{set,__long}jmp.S
802ea3af
MT
86 end
87
e4c5e530
MT
88 configure_options = \
89 --build=%{DISTRO_BUILDTARGET} \
e4c5e530 90 --prefix=/usr \
706fb4da 91 --libexecdir=%{libdir}/glibc \
e4c5e530
MT
92 --disable-profile \
93 --enable-add-ons \
94 --enable-kernel=%{OPTIMIZED_KERNEL} \
95 --with-selinux \
96 --disable-werror \
eec2ad4c 97 --enable-bind-now \
4834f4e8 98 --enable-nss-crypt \
3994dee1
MT
99 --enable-obsolete-rpc \
100 --with-bugurl=http://bugtracker.ipfire.org
e4c5e530
MT
101
102 if "%{DISTRO_ARCH}" == "armv5tel"
103 # Disable hardware FP for ARM.
104 configure_options += \
105 --without-fp
106 end
107
802ea3af 108 build
e4c5e530 109 mkdir -p %{DIR_SRC}/glibc-build
802ea3af
MT
110 cd %{DIR_SRC}/glibc-build
111
112 CFLAGS="${CFLAGS} -fno-asynchronous-unwind-tables" \
113 ../%{thisapp}/configure \
e4c5e530 114 %{configure_options}
70b63715 115
802ea3af
MT
116 sed -i config.make \
117 -e "s/^build-pic-default=.*/build-pic-default=yes/"
118
119 # Our GCC is already passing -fPIC, and that's all we want for the libraries.
120 # LDFLAGS.so is appended to so we don't build shared libraries with
121 # DT_TEXTREL (and to tell us if something goes wrong). For now we only build
122 # the libraries, not the programs:
123 echo "build-programs=no" >> configparms
124
125 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
126 CFLAGS="%{CFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE" \
127 CXXFLAGS="%{CXXFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE"
128
129 # Then build the programs with hardening, so everything possible in
130 # is hardened:
131 echo "# Nothing in here :D" > configparms
132 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
133 CFLAGS="%{CFLAGS}" CXXFLAGS="%{CXXFLAGS}"
134 end
135
802ea3af
MT
136 install
137 cd %{DIR_SRC}/glibc-build
138 make install install_root=%{BUILDROOT}
139
140 # Locales
141 mkdir -pv %{BUILDROOT}/usr/lib/locale
142 # This would install all locales that are supported
143 make localedata/install-locales install_root=%{BUILDROOT}
144
802ea3af
MT
145 # Configuration
146 cp -vf %{DIR_SOURCE}/{ld.so.conf,nsswitch.conf} %{BUILDROOT}/etc
147 mkdir -pv %{BUILDROOT}/etc/{default,ld.so.conf.d}
148 install -p -m644 %{DIR_APP}/nis/nss %{BUILDROOT}/etc/default/nss
149
08884d73
MT
150 if [ "%{DISTRO_ARCH}" = "armv7hl" ]; then
151 ln -svf ld-linux-armhf.so.3 %{BUILDROOT}/lib/ld-linux.so.3
152 fi
153
802ea3af
MT
154 # Remove unused binaries
155 rm -vf %{BUILDROOT}/sbin/sln \
156 %{BUILDROOT}/usr/bin/rpcinfo
157
158 # Don't distribute linker cache
159 rm -vf %{BUILDROOT}/etc/ld.so.cache
160
161 # Include /usr/lib/gconv/gconv-modules.cache
706fb4da
MT
162 > %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
163 chmod 644 %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
802ea3af 164
706fb4da 165 strip -g %{BUILDROOT}%{libdir}/*.o
802ea3af
MT
166
167 # Move some libs to correct place
706fb4da 168 mv -v %{BUILDROOT}/%{lib}/lib{memusage,pcprofile}.so %{BUILDROOT}%{libdir}
4b31eadd
MT
169
170 # Fix library permissions.
171 chmod 755 %{BUILDROOT}%{libdir}/lib*.so*
e448e014
MT
172
173 # rquota.x and rquota.h are now provided by quota
174 rm -vf %{BUILDROOT}%{includedir}/rpcsvc/rquota.[hx]
802ea3af 175 end
8a3a777f
MT
176
177 keep_libraries
706fb4da
MT
178 %{libdir}/libc_nonshared.a
179 %{libdir}/libpthread_nonshared.a
8a3a777f 180 end
802ea3af
MT
181end
182
183packages
184 package glibc
1262a291 185 requires = glibc-common = %{thisver}
08884d73
MT
186
187 if "%{DISTRO_ARCH}" == "armv7hl"
188 provides += ld-linux.so.3
189 provides += ld-linux.so.3(GLIBC_2.4)
3bece620 190 provides += ld-linux.so.3(GLIBC_PRIVATE)
08884d73 191 end
802ea3af
MT
192 end
193
194 package glibc-common
195 # XXX description and summary are missing
196
1262a291
MT
197 requires
198 glibc = %{thisver}
199 tzdata
200 end
b0f38bbb 201
802ea3af
MT
202 files
203 /usr/bin
204 /usr/sbin
205 /usr/share
20580800 206 /usr/lib/locale
802ea3af
MT
207 !/usr/share/zoneinfo
208 end
209 end
210
211 package glibc-devel
212 summary = Object files for development using standard C libraries.
213 description
214 The glibc-devel package contains the object files necessary
215 for developing programs which use the standard C libraries (which are
216 used by nearly all programs). If you are developing programs which
217 will use the standard C libraries, your system needs to have these
218 standard object files available in order to create the
219 executables.
220
221 Install glibc-devel if you are going to develop programs which will
222 use the standard C libraries.
223 end
224 group = Development/Libraries
225
1262a291
MT
226 requires
227 glibc = %{thisver}
228 glibc-headers = %{thisver}
229 end
802ea3af 230
08884d73
MT
231 files
232 %{includedir}
233 %{libdir}/*.a
234 %{libdir}/*.o
235 end
802ea3af
MT
236 end
237
238 package glibc-headers
239 description
240 The glibc-headers package contains the header files necessary
241 for developing programs which use the standard C libraries (which are
242 used by nearly all programs). If you are developing programs which
243 will use the standard C libraries, your system needs to have these
244 standard header files available in order to create the
245 executables.
246
247 Install glibc-headers if you are going to develop programs which will
248 use the standard C libraries.
249 end
250
1262a291
MT
251 requires
252 glibc = %{thisver}
253 kernel-headers >= %{OPTIMIZED_KERNEL}
254 end
802ea3af
MT
255
256 files
257 /usr/include
258 !/usr/include/linuxthreads
259 !/usr/include/gnu/stubs-[32164]*.h
260 end
261 end
262
263 package nscd
264 summary = A Name Service Caching Daemon (nscd).
265 description
266 Nscd caches name service lookups and can dramatically improve
267 performance with NIS+, and may help with DNS as well.
268 end
269 group = System/Daemons
270
271 files
272 /usr/sbin/nscd
273 end
274 end
275
276 package %{name}-utils
277 summary = Development utilities from GNU C library.
278 description
279 The glibc-utils package contains memusage, a memory usage profiler,
280 mtrace, a memory leak tracer and xtrace, a function call tracer
281 which can be helpful during program debugging.
282 end
283 group = Development/Tools
284
285 files
286 /usr/bin/memusage
287 /usr/bin/memusagestat
288 /usr/bin/mtrace
289 /usr/bin/pcprofiledump
290 /usr/bin/xtrace
706fb4da
MT
291 %{libdir}/libmemusage.so
292 %{libdir}/libpcprofile.so
802ea3af
MT
293 end
294 end
1f9bc2f0
MT
295
296 package %{name}-debuginfo
297 template DEBUGINFO
298 end
802ea3af 299end