From ab70210093e5ec3e963e16299149e18896ac1d49 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 15 May 2010 15:40:53 +0200 Subject: [PATCH] glibc32: update to match i686 pkg, make it usable. --- srcpkgs/glibc32-devel | 1 + srcpkgs/glibc32/INSTALL | 18 ------------- srcpkgs/glibc32/REMOVE | 10 ------- srcpkgs/glibc32/glibc32-devel.template | 16 ++++++++++++ srcpkgs/glibc32/template | 36 +++++++++++++++++++++----- 5 files changed, 47 insertions(+), 34 deletions(-) create mode 120000 srcpkgs/glibc32-devel delete mode 100644 srcpkgs/glibc32/INSTALL delete mode 100644 srcpkgs/glibc32/REMOVE create mode 100644 srcpkgs/glibc32/glibc32-devel.template diff --git a/srcpkgs/glibc32-devel b/srcpkgs/glibc32-devel new file mode 120000 index 0000000000..e8a40a3e8e --- /dev/null +++ b/srcpkgs/glibc32-devel @@ -0,0 +1 @@ +glibc32 \ No newline at end of file diff --git a/srcpkgs/glibc32/INSTALL b/srcpkgs/glibc32/INSTALL deleted file mode 100644 index d8620d495f..0000000000 --- a/srcpkgs/glibc32/INSTALL +++ /dev/null @@ -1,18 +0,0 @@ -# -# This script adds /lib32 and /usr/lib32 into ld.so's cache for -# x86_64 systems. -# -case "${ACTION}" in -post) - if [ ! -d etc/ld.so.conf.d ]; then - mkdir -p etc/ld.so.conf.d - echo "include /etc/ld.so.conf.d/*.conf" >> etc/ld.so.conf - fi - if [ ! -f etc/ld.so.conf.d/glibc32.conf ]; then - echo "/lib32" >> etc/ld.so.conf.d/glibc32.conf - echo "/usr/lib32" >> etc/ld.so.conf.d/glibc32.conf - chmod 644 etc/ld.so.conf.d/glibc32.conf - sbin/ldconfig -r . - fi - ;; -esac diff --git a/srcpkgs/glibc32/REMOVE b/srcpkgs/glibc32/REMOVE deleted file mode 100644 index 3c6b984ab8..0000000000 --- a/srcpkgs/glibc32/REMOVE +++ /dev/null @@ -1,10 +0,0 @@ -# -# This script removes ld.so glibc32 generated files. -# -case "${ACTION}" in -post) - if [ -f etc/ld.so.conf.d/glibc32.conf ]; then - rm -f etc/ld.so.conf.d/glibc32.conf - fi - ;; -esac diff --git a/srcpkgs/glibc32/glibc32-devel.template b/srcpkgs/glibc32/glibc32-devel.template new file mode 100644 index 0000000000..ca5a26e76d --- /dev/null +++ b/srcpkgs/glibc32/glibc32-devel.template @@ -0,0 +1,16 @@ +# Template file for 'glibc32-devel'. +# +short_desc="${short_desc} (development files)" +long_desc="${long_desc} + + This package contains files for development: headers, static libs, etc." + +Add_dependency run glibc-devel +Add_dependency run glibc32 + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib32 + mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/lib32/*.{a,so,o} ${DESTDIR}/usr/lib32 +} diff --git a/srcpkgs/glibc32/template b/srcpkgs/glibc32/template index 75059da785..a8105b029a 100644 --- a/srcpkgs/glibc32/template +++ b/srcpkgs/glibc32/template @@ -1,11 +1,15 @@ # Template file for 'glibc32' pkgname=glibc32 -version=2.11_2 -distfiles="http://xbps.nopcode.org/repos/stable/i686/glibc-${version}.i686.xbps" +version=2.11.1 +distfiles=" +http://xbps.nopcode.org/repos/stable/i686/glibc-${version}_3:20100511.i686.xbps +http://xbps.nopcode.org/repos/stable/i686/glibc-devel-${version}_2:20100511.i686.xbps" build_style=custom-install short_desc="The GNU C library (32 bits)" maintainer="Juan RP " -checksum=57e3be723f12626479e54451f56460335ccbca8a1270c92638b4e423502deeb1 +checksum=" +fee8bc09410fa03545aa0eefd6d05917c8b3a8c1776ba16d40780be18f15ba55 +a7996583689a7ba627fa9af7ae3668c06b5564c80bd84b2736e97e3c4c8b331b" 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 @@ -15,21 +19,41 @@ long_desc=" 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 build libarchive-devel +Add_dependency run glibc +Add_dependency build bsdtar do_install() { - local srcfile="${XBPS_SRCDISTDIR}/$(basename ${distfiles})" - bsdtar xf ${srcfile} -C ${wrksrc} || return 1 + for f in ${distfiles}; do + local srcfile="${XBPS_SRCDISTDIR}/$(basename ${f})" + bsdtar xf ${srcfile} -C ${wrksrc} || return 1 + done + + install -D -m644 ${wrksrc}/usr/include/gnu/stubs-32.h \ + ${DESTDIR}/usr/include/gnu/stubs-32.h + install -D -m644 ${wrksrc}/usr/include/sys/elf.h \ + ${DESTDIR}/usr/include/sys/elf.h + install -D -m644 ${wrksrc}/usr/include/sys/vm86.h \ + ${DESTDIR}/usr/include/sys/vm86.h install -d ${DESTDIR}/lib32 ${DESTDIR}/usr/lib32/gconv cp -a ${wrksrc}/lib/*.so* ${DESTDIR}/lib32 cp -a ${wrksrc}/usr/lib/gconv/* ${DESTDIR}/usr/lib32/gconv install -d ${DESTDIR}/lib cd ${DESTDIR}/lib && ln -sf ../lib32/ld-linux.so.2 . + install -m644 ${wrksrc}/usr/lib/*.{a,o,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 || return 1 + + chmod 644 ${DESTDIR}/etc/ld.so.conf.d/glibc32.conf \ + && ldconfig || return 1 }