void-packages/srcpkgs/glibc32/template
2012-02-10 10:44:37 +01:00

65 lines
2 KiB
Text

# Template file for 'glibc32'
pkgname=glibc32
version=2.14.1
revision=3
_devrev=2
distfiles="
http://xbps.goodluckwith.us/binpkgs/i686/glibc-${version}_${revision}.i686.xbps
http://xbps.goodluckwith.us/binpkgs/i686/glibc-devel-${version}_${_devrev}.i686.xbps"
short_desc="The GNU C library (32 bits)"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum="
bb94c8b765b97559a53a22ee8a83e4a4ee664ea8970b3b0906be66b341887e4f
917a869131392ebc0bba2d8dc99ab36e25a8fca7f6c83ba88532379a7f5dba23"
long_desc="
The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system. It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.
This package installs the 32 bit libraries for x86_64 systems."
subpackages="${pkgname}-devel"
nostrip=yes
noextract=yes
noverifyrdeps=yes
only_for_archs=x86_64
Add_dependency run glibc
Add_dependency build bsdtar
do_install() {
for f in ${distfiles}; do
local srcfile="${XBPS_SRCDISTDIR}/$(basename ${f})"
bsdtar xf ${srcfile} -C ${wrksrc}
done
vinstall usr/include/gnu/stubs-32.h 644 usr/include/gnu
vinstall usr/include/sys/elf.h 644 usr/include/sys
vinstall usr/include/sys/vm86.h 644 usr/include/sys
vmkdir lib
vmkdir lib32
vmkdir usr/lib32/gconv
vcopy "lib/*.so*" lib32
vcopy "usr/lib/gconv/*" usr/lib32/gconv
ln -sf /lib32/ld-linux.so.2 ${DESTDIR}/lib/ld-linux.so.2
install -m644 usr/lib/*.{a,o} ${DESTDIR}/usr/lib32
install -m755 usr/lib/*.so ${DESTDIR}/usr/lib32
# Add /lib32 and /usr/lib32 into ld.so(8) cache.
install -d ${DESTDIR}/etc/ld.so.conf.d
{ echo "/lib32"; echo "/usr/lib32"; } \
> ${DESTDIR}/etc/ld.so.conf.d/glibc32.conf
chmod 644 ${DESTDIR}/etc/ld.so.conf.d/glibc32.conf && ldconfig
# Fix some .so files to find stuff in lib32 dirs.
for f in libc libpthread; do
sed -i -e "s|/lib/|/lib32/|g" \
${DESTDIR}/usr/lib32/${f}.so
done
}