New package: eglibc-2.15.1.20120525.

This commit is contained in:
Juan RP 2012-05-25 14:55:52 +02:00
parent 6a187c429b
commit fbed9470ae
17 changed files with 271 additions and 0 deletions

View file

@ -36,6 +36,19 @@ libnss_nisplus.so.2 glibc-2.8
libnss_nis.so.2 glibc-2.8
libcrypt.so.1 glibc-2.8
libBrokenLocale.so.1 glibc-2.8
libc.so.6 eglibc-2.15.1
libm.so.6 eglibc-2.15.1
libpthread.so.0 eglibc-2.15.1
librt.so.1 eglibc-2.15.1
libdl.so.2 eglibc-2.15.1
ld-linux-x86-64.so.2 eglibc-2.15.1 x86_64
ld-linux.so.2 eglibc-2.15.1 i686
libresolv.so.2 eglibc-2.15.1
libanl.so.1 eglibc-2.15.1
libthread_db.so.1 eglibc-2.15.1
libutil.so.1 eglibc-2.15.1
libnsl.so.1 eglibc-2.15.1
libnss_files.so.2 eglibc-2.15.1
libz.so.1 zlib-1.2.3
libbz2.so.1 bzip2-1.0.5
libarchive.so.12 libarchive-3.0.2

1
srcpkgs/eglibc-devel Symbolic link
View file

@ -0,0 +1 @@
eglibc

1
srcpkgs/eglibc-locales Symbolic link
View file

@ -0,0 +1 @@
eglibc

1
srcpkgs/eglibc-nscd Symbolic link
View file

@ -0,0 +1 @@
eglibc

View file

@ -0,0 +1,16 @@
# Template file for 'eglibc-devel'.
#
provides="glibc-devel-${version}"
replaces="glibc-devel>=0"
depends="kernel-libc-headers>=3.3<3.4 eglibc>=$version"
short_desc="${short_desc} (development files)"
long_desc="${long_desc}
This package contains files for development: headers, static libs, etc."
do_install() {
vmove usr/include usr
vmove "usr/lib/*.a" usr/lib
vmove "usr/lib/*crt1.o" usr/lib
vmove usr/share/info usr/share
}

View file

@ -0,0 +1,39 @@
# Rebuild locales set in /etc/default/libc-locales.
#
case "${ACTION}" in
post)
LOCALE_ARCHIVEDIR=usr/lib/locale
LOCALE_ARCHIVE=${LOCALE_ARCHIVEDIR}/locale-archive
LOCALES_CONF=etc/default/libc-locales
LOCALES=usr/share/i18n/locales
LOCALE_ALIAS=usr/share/locale/locale.alias
[ -n "$POSIXLY_CORRECT" ] && unset POSIXLY_CORRECT
[ -f $LOCALE_ARCHIVE ] && rm -f $LOCALE_ARCHIVE
[ ! -d $LOCALE_ARCHIVEDIR ] && mkdir -p $LOCALE_ARCHIVEDIR
echo "Generating GNU libc locales..."
while read locale charset; do
case $locale in
\#*) continue;;
"") continue;;
esac
if [ -n "$locale" -a -n "$charset" ]; then
echo -n " $(echo $locale | sed 's/\([^.\@]*\).*/\1/')"
echo -n ".$charset"
echo -n $(echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/')
echo -n '...'
if [ -f $LOCALES/$locale ]; then
input=$locale
else
input=$(echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/')
fi
localedef --prefix=. \
-i $input -c -f $charset -A $LOCALE_ALIAS $locale
echo ' done.'
else
echo "Ignoring wrong locale: $locale $charset..."
fi
done < $LOCALES_CONF
;;
esac

View file

@ -0,0 +1,16 @@
# Template file for 'eglibc-locales'.
#
noarch=yes
provides="glibc-locales-${version}"
replaces="glibc-locales>=0"
conf_files="/etc/default/libc-locales"
short_desc="${short_desc} -- locales"
long_desc="${long_desc}
This package contains the ${sourcepkg} locale files, for non US users."
do_install() {
vmove etc/default etc
vmove usr/share/i18n usr/share
vmove usr/share/locale usr/share
}

View file

@ -0,0 +1,4 @@
librt.so.1
libpthread.so.0
libnsl.so.1
libc.so.6

View file

@ -0,0 +1,19 @@
# Template file for 'eglibc-nscd'.
#
provides="nscd-${version}"
replaces="nscd>=0"
systemd_services="nscd.service on"
conf_files="/etc/nscd.conf"
short_desc="Name Service Cache Daemon (EGLIBC)"
long_desc="
This package contains nscd, a daemon that provides a cache for the
most common name service requests, provided by EGLIBC."
do_install() {
vmove usr/sbin/nscd usr/sbin
vinstall ${FILESDIR}/nscd.service 644 lib/systemd/system
vinstall ${FILESDIR}/nscd.socket 644 lib/systemd/system
vinstall ${FILESDIR}/nscd.tmpfiles.d 644 usr/lib/tmpfiles.d nscd.conf
vinstall ${FILESDIR}/nscd.conf 644 etc
vinstall ${FILESDIR}/nscd.logrotate 644 etc/logrotate.d nscd
}

View file

@ -0,0 +1,27 @@
#
# List of GNU libc locales regenerated by the glibc-locales package.
# All libc locales are available in /usr/share/i18n/locales.
#
# If you add new locales you can regenerate them with:
# ``xbps-bin -f reconfigure glibc-locales´´
#
# By default we enable de, fr, it, en (US and GB) and es locales
# for ISO-8859-1[5] and UTF-8.
#
en_US ISO-8859-1
en_US.UTF-8 UTF-8
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE@euro ISO-8859-15
de_DE.UTF-8 UTF-8
it_IT ISO-8859-1
it_IT@euro ISO-8859-15
it_IT.UTF-8 UTF-8
fr_FR ISO-8859-1
fr_FR@euro ISO-8859-15
fr_FR.UTF-8 UTF-8
es_ES ISO-8859-1
es_ES@euro ISO-8859-15
es_ES.UTF-8 UTF-8

View file

@ -0,0 +1,8 @@
# Configuration file for nscd(8).
#
logfile /var/log/nscd.log
server-user nobody
enable-cache passwd yes
enable-cache group yes
enable-cache hosts yes
enable-cache services yes

View file

@ -0,0 +1,5 @@
/var/log/nscd.log {
sharedscripts
copytruncate
missingok
}

View file

@ -0,0 +1,11 @@
[Unit]
Description=Name Service Cache Daemon
[Service]
ExecStart=/usr/sbin/nscd -d
ExecStop=/usr/sbin/nscd --shutdown
Restart=always
[Install]
WantedBy=multi-user.target
Also=nscd.socket

View file

@ -0,0 +1,8 @@
[Unit]
Description=Name Service Cache Daemon Socket
[Socket]
ListenStream=/var/run/nscd/socket
[Install]
WantedBy=sockets.target

View file

@ -0,0 +1,2 @@
d /var/run/nscd 0755 root root -
d /var/db/nscd 0755 root root -

View file

@ -0,0 +1,15 @@
# /etc/nsswitch.conf
#
# See nsswitch.conf(5) for information.
#
passwd: files
group: files
shadow: files
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files
protocols: files
services: files
ethers: files
rpc: files

85
srcpkgs/eglibc/template Normal file
View file

@ -0,0 +1,85 @@
# Template file for 'eglibc'
pkgname=eglibc
_distver="2.15.1"
_datesvn="20120525"
version="${_distver}.${_datesvn}"
wrksrc="eglibc-${_distver}_${_datesvn}"
depends="base-files eglibc-locales>=$version"
makedepends="bison perl"
provides="glibc-${_distver}"
subpackages="eglibc-locales eglibc-devel eglibc-nscd"
nostrip_files="ld-$version.so libc-$version.so libpthread-$version.so libthread_db-1.0.so"
conf_files="/etc/rpc /etc/ld.so.conf /etc/nsswitch.conf"
homepage="http://www.eglibc.org"
short_desc="Embedded GLIBC"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-3, BSD"
distfiles="http://xbps.nopcode.org/distfiles/${pkgname}-${_distver}_${_datesvn}.tar.xz"
checksum=66999ad696cf62077e7b0342987c9bff266e440c9fede4fbdf56043bc8f6a56b
long_desc="
Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC) that is
designed to work well on embedded systems. EGLIBC strives to be source and
binary compatible with GLIBC. EGLIBC's goals include reduced footprint,
configurable components, better support for cross-compilation and cross-testing."
do_configure() {
mkdir build && cd build
../configure ${CONFIGURE_SHARED_ARGS} --enable-stackguard-randomization \
--enable-bind-now --enable-kernel=2.6.27 --enable-multi-arch \
--without-cvs --without-gd --disable-profile \
--libdir=/usr/lib --libexecdir=/usr/lib
}
do_build() {
cd build && make ${makejobs}
}
do_install() {
# Do not install stuff into lib64 dirs.
vmkdir lib
cd ${DESTDIR} && ln -sf lib lib64 && cd $wrksrc
# Create DESTDIR/etc/ld.so.conf
vmkdir etc/ld.so.conf.d
echo "include /etc/ld.so.conf.d/*.conf" > ${DESTDIR}/etc/ld.so.conf
cd build
make install_root=${DESTDIR} install
# create /etc/default/libc-locales
vinstall ${FILESDIR}/libc-locales 644 etc/default
cp ${wrksrc}/localedata/SUPPORTED ${wrksrc}/build
sed -i -e "s|/| |g" \
-e 's|\\| |g' \
-e "s|SUPPORTED-LOCALES=||" \
-e "s|^|#|g" ${wrksrc}/build/SUPPORTED
cat ${wrksrc}/build/SUPPORTED >> ${DESTDIR}/etc/default/libc-locales
# ldd is a bash script, so make it run as such.
. $XBPS_HELPERSDIR/replace-interpreter.sh
replace_interpreter bash ${DESTDIR}/usr/bin/ldd
# On x86_64, add dynamic linker's 32bit version to ldd.
if [ "$XBPS_MACHINE" = "x86_64" ]; then
rtldlist="/lib/ld-linux.so.2 /lib/ld-linux-x86-64.so.2"
sed -i "s|^RTLDLIST.*$|RTLDLIST=\"$rtldlist\"|" \
${DESTDIR}/usr/bin/ldd
fi
install -m644 ${FILESDIR}/nsswitch.conf ${DESTDIR}/etc
echo "/usr/local/lib" > ${DESTDIR}/etc/ld.so.conf.d/usr_local.conf
chmod 644 ${DESTDIR}/etc/ld.so.conf.d/usr_local.conf
# Remove unused files.
rm -f ${DESTDIR}/etc/ld.so.cache
rm -f ${DESTDIR}/etc/localtime
rm -f ${DESTDIR}/lib64
# Remove timezone stuff, provided by tzdata.
rm -f ${DESTDIR}/usr/sbin/zic
rm -f ${DESTDIR}/usr/sbin/zdump
rm -f ${DESTDIR}/usr/bin/tzselect
rm -rf ${DESTDIR}/usr/share/zoneinfo
# Modify some files to not have the same hash than in glibc pkg.
for f in ${conf_files} /etc/ld.so.conf.d/usr_local.conf \
/usr/lib/gconv/gconv-modules; do
echo "# $pkgname-$version" >> ${DESTDIR}${f}
done
}