libraries/libiconv: Avoid overlap with glibc and man-pages packages.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2012-09-30 10:15:18 +02:00 committed by Robby Workman
parent b7ab7cfec6
commit d522716dc1

View file

@ -8,7 +8,7 @@
PRGNAM=libiconv
VERSION=${VERSION:-1.14}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -67,8 +67,29 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
# This file conflicts with the glibc package
rm $PKG/usr/include/iconv.h
# These files conflicts with the glibc and man-pages packages,
# so we are forced to move the header and do a little renaming
mkdir -p $PKG/usr/include/libiconv
mv $PKG/usr/include/iconv.h $PKG/usr/include/libiconv/
mv $PKG/usr/bin/iconv $PKG/usr/bin/liconv
mv $PKG/usr/man/man1/iconv.1 $PKG/usr/man/man1/liconv.1
mv $PKG/usr/man/man3/iconv.3 $PKG/usr/man/man3/liconv.3
mv $PKG/usr/man/man3/iconv_open.3 $PKG/usr/man/man3/liconv_open.3
mv $PKG/usr/man/man3/iconv_close.3 $PKG/usr/man/man3/liconv_close.3
sed -i "s|iconv_open|liconv_open|" $PKG/usr/man/man1/liconv.1
sed -i \
-e "s|iconv_close\ (3)|liconv_close (3)|" \
-e "s|iconv_open\ (3)|liconv_open (3)|" \
$PKG/usr/man/man3/liconv.3
sed -i \
-e "s|iconv_close\ (3)|liconv_close (3)|" \
-e "s|iconv\ (3)|liconv (3)|" \
$PKG/usr/man/man3/liconv_open.3
sed -i \
-e "s|iconv_open\ (3)|liconv_open (3)|" \
-e "s|iconv\ (3)|liconv (3)|" \
$PKG/usr/man/man3/liconv_close.3 $PKG/usr/man/man3/iconv_open_into.3 \
$PKG/usr/man/man3/iconvctl.3
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true