Ignore:
Timestamp:
02/07/17 16:15:55 (8 years ago)
Author:
Edwin Eefting <edwin@datux.nl>
Branches:
master, perl-5.22
Children:
a9c55d3
Parents:
d2a077a
Message:

upgrade glibc/gcc to gcc 5.4.0 and glibc 2.24

File:
1 edited

Legend:

Unmodified
Added
Removed
  • npl/system/glibc/glibc.SlackBuild

    rd2a077a r1a19ecd  
    1 #!/bin/sh
     1#!/bin/bash
     2#
     3# Automaticly created by importpackage v1.0
     4# Imported from: http://mirrors.slackware.com/slackware/slackware-current/source/l/glibc/
     5# Created at Mon Jan 30 20:32:16 CET 2017
    26
    3 # Copyright 2006, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015  Patrick J. Volkerding, Sebeka, MN, USA
    4 # All rights reserved.
    5 #
    6 # Redistribution and use of this script, with or without modification, is
    7 # permitted provided that the following conditions are met:
    8 #
    9 # 1. Redistributions of this script must retain the above copyright
    10 #    notice, this list of conditions and the following disclaimer.
    11 #
    12 #  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
    13 #  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    14 #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
    15 #  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    16 #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    17 #  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    18 #  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    19 #  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    20 #  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
    21 #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    227
    23 ## build glibc-$VERSION for Slackware
    24 
    25 VERSION=${VERSION:-$(echo glibc-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
    26 CHECKOUT=${CHECKOUT:-""}
    27 BUILD=${BUILD:-1}
    28 
    29 ## Included in glibc now:
    30 ## glibc-libidn version
    31 #LIBIDNVER=2.10.1
    32 
    33 # I was considering disabling NSCD, but MoZes talked me out of it.  :)
    34 #DISABLE_NSCD=" --disable-nscd "
    35 
    36 # $ARCH may be preset, otherwise i486 compatibility with i686 binary
    37 # structuring is the Slackware default, since this is what gcc-3.2+
    38 # requires for binary compatibility with previous releases.
    39 #ARCH=i486
    40 if [ -z "$ARCH" ]; then
    41   case "$( uname -m )" in
    42     i?86) export ARCH=i486 ;;
    43     arm*) export ARCH=arm ;;
    44     # Unless $ARCH is already set, use uname -m for all other archs:
    45        *) export ARCH=$( uname -m ) ;;
    46   esac
    47 fi
    48 
    49 # I'll break this out as an option for fun  :-)
    50 case $ARCH  in
    51   i386)
    52     OPTIMIZ="-O3 -march=i386 -mcpu=i686"
    53     LIBDIRSUFFIX=""
    54     ;;
    55   i486)
    56     OPTIMIZ="-O3 -march=i486 -mtune=i686"
    57     LIBDIRSUFFIX=""
    58     ;;
    59   i586)
    60     OPTIMIZ="-O3 -march=i586"
    61     LIBDIRSUFFIX=""
    62     ;;
    63   i686)
    64     OPTIMIZ="-O3 -march=i686"
    65     LIBDIRSUFFIX=""
    66     ;;
    67   athlon)
    68     OPTIMIZ="-O3 -march=athlon"
    69     LIBDIRSUFFIX=""
    70     ;;
    71   s390)
    72     OPTIMIZ="-O3"
    73     LIBDIRSUFFIX=""
    74     ;;
    75   x86_64)
    76     OPTIMIZ="-O3 -fPIC"
    77     LIBDIRSUFFIX="64"
    78     ;;
    79   *)
    80     OPTIMIZ="-O3"
    81     LIBDIRSUFFIX=""
    82     ;;
    83 esac
    84 
    85 case $ARCH in
    86   x86_64)
    87     TARGET=${TARGET:-x86_64}
    88     ;;
    89   i486)
    90     # This should be i486 for all 32-bit x86 arch:
    91     TARGET=${TARGET:-i486}
    92     ;;
    93 esac
    94 
    95 # Hand off the $ARCH variable to $SLACKWARE_ARCH to avoid confusing glibc:
    96 SLACKWARE_ARCH=$ARCH
    97 unset ARCH
    98 
    99 CVSVER=${VERSION}${CHECKOUT}
    100 
    101 # NOTE!!!  glibc needs to be built against the sanitized kernel headers,
    102 # which will be installed under /usr/include by the kernel-headers package.
    103 # Be sure the correct version of the headers package is installed BEFORE
    104 # building glibc!
    105 
    106 CWD=$(pwd)
    107 # Temporary build location.  This should not be a directory
    108 # path a non-root user could create later...
    109 TMP=${TMP:-/glibc-tmp-$(mcookie)}
    110 mkdir -p $TMP
    111 
    112 NUMJOBS=${NUMJOBS:-" -j7 "}
    113 
    114 # This function fixes a doinst.sh file for x86_64.
    115 # With thanks to Fred Emmott.
    116 fix_doinst() {
    117   if [ "x$LIBDIRSUFFIX" = "x" ]; then
    118     return;
    119   fi;
    120   # Fix "( cd usr/lib ;" occurrences
    121   sed -i "s#lib ;#lib${LIBDIRSUFFIX} ;#" install/doinst.sh
    122   # Fix "lib/" occurrences
    123   sed -i "s#lib/#lib${LIBDIRSUFFIX}/#g" install/doinst.sh
    124   # Fix "( cd lib" occurrences
    125   sed -i "s#( cd lib\$#( cd lib${LIBDIRSUFFIX}#" install/doinst.sh
    126 
    127   if [ "$SLACKWARE_ARCH" = "x86_64" ]; then
    128     sed -i 's#ld-linux.so.2#ld-linux-x86-64.so.2#' install/doinst.sh
    129   fi
    130 }
    131 
    132 # This is a patch function to put all glibc patches in the build script
    133 # up near the top.
    134 apply_patches() {
    135   # Use old-style locale directories rather than a single (and strangely
    136   # formatted) /usr/lib/locale/locale-archive file:
    137   zcat $CWD/glibc.locale.no-archive.diff.gz | patch -p1 --verbose || exit 1
    138   # The is_IS locale is causing a strange error about the "echn" command
    139   # not existing.  This patch reverts is_IS to the version shipped in
    140   # glibc-2.5:
    141   zcat $CWD/is_IS.diff.gz | patch -p1 --verbose || exit 1
    142   # Fix NIS netgroups:
    143   zcat $CWD/glibc.nis-netgroups.diff.gz | patch -p1 --verbose || exit 1
    144   # Support ru_RU.CP1251 locale:
    145   zcat $CWD/glibc.ru_RU.CP1251.diff.gz | patch -p1 --verbose || exit 1
    146   # Fix resolver problem with glibc-2.9:
    147   zcat $CWD/glibc-2.10-dns-no-gethostbyname4.diff.gz | patch -p0 --verbose || exit 1
    148   # This reverts a patch that was made to glibc to fix "namespace leakage",
    149   # which seems to cause some build failures (e.g. with conntrack):
    150   zcat $CWD/glibc.revert.to.fix.build.breakages.diff.gz | patch -p1 -l --verbose || exit 1
    151   # Make it harder for people to trick ldd into running code:
    152   zcat $CWD/glibc.ldd.trace.through.dynamic.linker.diff.gz | patch -p1 --verbose || exit 1
    153   # Make glibc compile with binutils using --enable-initfini-array.
    154   # At this time, we do not recommend this due to probable ABI breakage.
    155   # The also patch needs work before it would apply.
    156   # ***NOT READY***
    157   #zcat $CWD/glibc.git-4a531bb0b3b582cb693de9f76d2d97d970f9a5d5.patch.gz | patch -p1 --verbose || exit 1
    158   #
    159   # 2014-05:  We'll try building with the stock asm...
    160   ## Avoid the Intel optimized asm routines for now because they break
    161   ## the flash player.  We'll phase this in when it's safer to do so.
    162   #zcat $CWD/glibc.disable.broken.optimized.memcpy.diff.gz | patch -p1 --verbose || exit 1
    163 }
    164 
    165 # This is going to be the initial $DESTDIR:
    166 export PKG=$TMP/package-glibc-incoming-tree
    167 PGLIBC=$TMP/package-glibc
    168 PSOLIBS=$TMP/package-glibc-solibs
    169 PZONE=$TMP/package-glibc-zoneinfo
    170 PI18N=$TMP/package-glibc-i18n
    171 PPROFILE=$TMP/package-glibc-profile
    172 PDEBUG=$TMP/package-glibc-debug
    173 
    174 # Empty these locations first:
    175 for dir in $PKG $PGLIBC $PSOLIBS $PZONE $PI18N $PPROFILE $PDEBUG ; do
    176   if [ -d $dir ]; then
    177     rm -rf $dir
    178   fi
    179   mkdir -p $dir
    180 done
    181 if [ -d $TMP/glibc-$VERSION ]; then
    182   rm -rf $TMP/glibc-$VERSION
    183 fi
    184 
    185 # Create an incoming directory structure for glibc to be built into:
    186 mkdir -p $PKG/lib${LIBDIRSUFFIX}
    187 mkdir -p $PKG/sbin
    188 mkdir -p $PKG/usr/bin
    189 mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
    190 mkdir -p $PKG/usr/sbin
    191 mkdir -p $PKG/usr/include
    192 mkdir -p $PKG/usr/doc
    193 mkdir -p $PKG/usr/man
    194 mkdir -p $PKG/usr/share
    195 mkdir -p $PKG/var/db/nscd
    196 mkdir -p $PKG/var/run/nscd
    197 
    198 # Begin extract/compile:
    199 cd $TMP
    200 rm -rf glibc-$CVSVER
    201 tar xvf $CWD/glibc-$CVSVER.tar.xz \
    202   || tar xvf $CWD/glibc-$CVSVER.tar.bz2 \
    203   || tar xvf $CWD/glibc-$CVSVER.tar.gz
    204 cd glibc-$CVSVER
    205 
    206 #tar xvf $CWD/glibc-libidn-$LIBIDNVER.tar.?z*
    207 #mv glibc-libidn-$LIBIDNVER libidn
    208 
    209 chown -R root:root .
    210 find . -perm 666 -exec chmod 644 {} \;
    211 find . -perm 664 -exec chmod 644 {} \;
    212 find . -perm 600 -exec chmod 644 {} \;
    213 find . -perm 444 -exec chmod 644 {} \;
    214 find . -perm 400 -exec chmod 644 {} \;
    215 find . -perm 440 -exec chmod 644 {} \;
    216 find . -perm 777 -exec chmod 755 {} \;
    217 find . -perm 775 -exec chmod 755 {} \;
    218 find . -perm 511 -exec chmod 755 {} \;
    219 find . -perm 711 -exec chmod 755 {} \;
    220 find . -perm 555 -exec chmod 755 {} \;
    221 
    222 # Clean up leftover CVS directories:
    223 find . -type d -name CVS -exec rm -r {} \; 2> /dev/null
    224 
    225 # Apply patches; exit if any fail.
    226 apply_patches
    227 if [ ! $? = 0 ]; then
    228   exit 1
    229 fi
    230 
    231 # Make build directory:
    232 mkdir build-glibc-$VERSION
    233 cd build-glibc-$VERSION || exit 1
    234 
    235 echo "BUILDING DAS NPTL GLIBC"
    236 CFLAGS="-g $OPTIMIZ" \
    237 ../configure \
    238   --prefix=/usr \
    239   --libdir=/usr/lib${LIBDIRSUFFIX} \
    240   --enable-kernel=2.6.32 \
    241   --with-headers=/usr/include \
    242   --enable-add-ons \
    243   --enable-obsolete-rpc \
    244   --enable-profile \
    245   $DISABLE_NSCD \
    246   --infodir=/usr/info \
    247   --mandir=/usr/man \
    248   --with-tls \
    249   --with-__thread \
    250   --without-cvs \
    251   $TARGET-slackware-linux
    252 
    253 make $NUMJOBS || make || exit 1
    254 make install install_root=$PKG || exit 1
    255 make localedata/install-locales install_root=$PKG || exit 1
    256 
    257 # The prevailing standard seems to be putting unstripped libraries in
    258 # /usr/lib/debug/ and stripping the debugging symbols from all the other
    259 # libraries.
    260 mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/debug
    261 cp -a $PKG/lib${LIBDIRSUFFIX}/l*.so* $PKG/usr/lib${LIBDIRSUFFIX}/debug
    262 cp -a $PKG/usr/lib${LIBDIRSUFFIX}/*.a $PKG/usr/lib${LIBDIRSUFFIX}/debug
    263 # Don't need debug+profile:
    264 ( cd $PKG/usr/lib${LIBDIRSUFFIX}/debug ; rm -f *_p.* )
    265 # NOTE:  Is there really a reason for the glibc-debug package?
    266 # If you're debugging glibc, you can also compile it, right?
    267 
    268 ## COMMENTED OUT:  There's no reason for profile libs to include -g information.
    269 ## Put back unstripped profiling libraries:
    270 #mv $PKG/usr/lib${LIBDIRSUFFIX}/debug/*_p.a $PKG/usr/lib${LIBDIRSUFFIX}
    271 # It might be best to put the unstripped and profiling libraries in glibc-debug and glibc-profile.
    272 
    273 # I don't think "strip -g" causes the pthread problems.  It's --strip-unneeded that does.
    274 strip -g $PKG/lib${LIBDIRSUFFIX}/l*.so*
    275 strip -g $PKG/usr/lib${LIBDIRSUFFIX}/l*.so*
    276 strip -g $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a
    277 
    278 # Build and install the zoneinfo database:
    279 cd $TMP
    280 rm -rf tzcodedata-build
    281 mkdir tzcodedata-build
    282 cd tzcodedata-build
    283 tar xzf $CWD/tzdata?????.tar.gz
    284 tar xzf $CWD/tzcode?????.tar.gz
    285 sed -i "s,/usr/local,$(pwd),g" Makefile
    286 sed -i "s,/etc/zoneinfo,/zoneinfo,g" Makefile
    287 make
    288 make install
    289 mkdir -p $PKG/usr/share/zoneinfo/{posix,right}
    290 cd etc
    291 cp -a zoneinfo/* $PKG/usr/share/zoneinfo
    292 cp -a zoneinfo-posix/* $PKG/usr/share/zoneinfo/posix
    293 cp -a zoneinfo-leaps/* $PKG/usr/share/zoneinfo/right
    294 # Remove $PKG/usr/share/zoneinfo/localtime -- the install script will
    295 # create it as a link to /etc/localtime.
    296 rm -f $PKG/usr/share/zoneinfo/localtime
    297 
    298 # Back to the sources dir to add some files/docs:
    299 cd $TMP/glibc-$CVSVER
    300 
    301 # We'll automatically install the config file for the Name Server Cache Daemon.
    302 # Perhaps this should also have some commented-out startup code in rc.inet2...
    303 mkdir -p $PKG/etc
    304 cat nscd/nscd.conf > $PKG/etc/nscd.conf.new
    305 
    306 # Install some scripts to help select a timezone:
    307 ( cd $CWD/timezone-scripts
    308   # Try to rebuild this:
    309   sh output-updated-timeconfig.sh $PKG/usr/share/zoneinfo > timeconfig 2> /dev/null
    310 )
    311 mkdir -p $PKG/var/log/setup
    312 cp -a $CWD/timezone-scripts/setup.timeconfig $PKG/var/log/setup
    313 chown root:root $PKG/var/log/setup/setup.timeconfig
    314 chmod 755 $PKG/var/log/setup/setup.timeconfig
    315 mkdir -p $PKG/usr/sbin
    316 cp -a $CWD/timezone-scripts/timeconfig $PKG/usr/sbin
    317 chown root:root $PKG/usr/sbin/timeconfig
    318 chmod 755 $PKG/usr/sbin/timeconfig
    319 
    320 ## Install docs:
    321 ( mkdir -p $PKG/usr/doc/glibc-$VERSION
    322   cp -a \
    323     BUGS CONFORMANCE COPYING COPYING.LIB FAQ INSTALL LICENSES NAMESPACE \
    324     NEWS NOTES PROJECTS README README.libm \
    325     $PKG/usr/doc/glibc-$VERSION
    326 )
    327 
    328 # Don't forget to add the /usr/share/zoneinfo/localtime -> /etc/localtime symlink! :)
    329 if [ ! -r $PKG/usr/share/zoneinfo/localtime ]; then
    330   ( cd $PKG/usr/share/zoneinfo ; ln -sf /etc/localtime . )
    331 fi
    332 
    333 # OK, there are some very old Linux standards that say that any binaries in a /bin or
    334 # /sbin directory (and the directories themselves) should be group bin rather than
    335 # group root, unless a specific group is really needed for some reason.
    336 #
    337 # I can't find any mention of this in more recent standards docs, and always thought
    338 # that it was pretty cosmetic anyway (hey, if there's a reason -- fill me in!), so
    339 # it's possible that this ownership change won't be followed in the near future
    340 # (it's a PITA, and causes many bug reports when the perms change is occasionally
    341 # forgotten).
    342 #
    343 # But, it's hard to get me to break old habits, so we'll continue the tradition here:
    344 #
    345 # No, no we won't.  You know how we love to break traditions.
    346 
    347 # Strip most binaries:
    348 ( cd $PKG
    349   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null
    350   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
    351 )
    352 
    353 # Fix info dir:
    354 rm $PKG/usr/info/dir
    355 gzip -9 $PKG/usr/info/*
    356 
    357 # This is junk
    358 rm $PKG/etc/ld.so.cache
    359 ( cd $PKG
    360   find . -name "*.orig" -exec rm {} \;
    361 )
    362 
    363 ##################################
    364 # OK, time to make some packages #
    365 ##################################
    366 
    367 # glibc-zoneinfo.  We will start with an easy one to avoid breaking a sweat.  ;-)
    368 cd $CWD
    369 ZONE_VERSIONS="$(echo tzdata* | cut -f1 -d . | cut -b7-11)"
    370 echo $ZONE_VERSIONS
    371 cd $PZONE
    372 # Install some scripts to help select a timezone:
    373 mkdir -p $PZONE/var/log/setup
    374 cp -a $CWD/timezone-scripts/setup.timeconfig $PZONE/var/log/setup
    375 chown root:root $PZONE/var/log/setup/setup.timeconfig
    376 chmod 755 $PZONE/var/log/setup/setup.timeconfig
    377 mkdir -p $PZONE/usr/sbin
    378 cp -a $CWD/timezone-scripts/timeconfig $PZONE/usr/sbin
    379 chown root:root $PZONE/usr/sbin/timeconfig
    380 chmod 755 $PZONE/usr/sbin/timeconfig
    381 mkdir $PZONE/install
    382 cat $CWD/doinst.sh-glibc-zoneinfo > $PZONE/install/doinst.sh
    383 cat $CWD/slack-desc.glibc-zoneinfo > $PZONE/install/slack-desc
    384 mkdir -p $PZONE/usr/share
    385 cd $PZONE/usr/share
    386 cp -a --verbose $PKG/usr/share/zoneinfo .
    387 cd $PZONE
    388 mkdir -p $PZONE/etc
    389 # This is already hard-coded into doinst.sh (like it'll be there anyway ;-):
    390 rm -f etc/localtime
    391 # Wrap it up:
    392 makepkg -l y -c n $TMP/glibc-zoneinfo-$ZONE_VERSIONS-noarch-$BUILD.txz
    393 
    394 # glibc-profile:
    395 cd $PPROFILE
    396 mkdir -p usr/lib${LIBDIRSUFFIX}
    397 # Might as well just grab these with 'mv' to simplify things later:
    398 mv $PKG/usr/lib${LIBDIRSUFFIX}/lib*_p.a usr/lib${LIBDIRSUFFIX}
    399 # Profile libs should be stripped.  Use the debug libs to debug...
    400 ( cd usr/lib${LIBDIRSUFFIX} ; strip -g *.a )
    401 mkdir install
    402 cp -a $CWD/slack-desc.glibc-profile install/slack-desc
    403 makepkg -l y -c n $TMP/glibc-profile-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
    404 
    405 # THIS IS NO LONGER PACKAGED (or is it?  might be better to let it be made, and then ship it or not...)
    406 # glibc-debug:
    407 cd $PDEBUG
    408 mkdir -p usr/lib${LIBDIRSUFFIX}
    409 # Might as well just grab these with 'mv' to simplify things later:
    410 mv $PKG/usr/lib${LIBDIRSUFFIX}/debug usr/lib${LIBDIRSUFFIX}
    411 mkdir install
    412 cp -a $CWD/slack-desc.glibc-debug install/slack-desc
    413 makepkg -l y -c n $TMP/glibc-debug-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
    414 ## INSTEAD, NUKE THESE LIBS
    415 #rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/debug
    416 
    417 # glibc-i18n:
    418 cd $PI18N
    419 mkdir -p usr/lib${LIBDIRSUFFIX}
    420 rm -rf usr/lib${LIBDIRSUFFIX}/locale
    421 cp -a $PKG/usr/lib${LIBDIRSUFFIX}/locale usr/lib${LIBDIRSUFFIX}
    422 mkdir -p usr/share
    423 cp -a $PKG/usr/share/i18n usr/share
    424 cp -a $PKG/usr/share/locale usr/share
    425 mkdir install
    426 cp -a $CWD/slack-desc.glibc-i18n install/slack-desc
    427 makepkg -l y -c n $TMP/glibc-i18n-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
    428 
    429 # glibc-solibs:
    430 cd $PSOLIBS
    431 mkdir -p etc/profile.d
    432 cp -a $CWD/profile.d/* etc/profile.d
    433 chown -R root:root etc
    434 chmod 755 etc/profile.d/*
    435 mkdir -p lib${LIBDIRSUFFIX}
    436 cp -a $PKG/lib${LIBDIRSUFFIX}/* lib${LIBDIRSUFFIX}
    437 ( cd lib${LIBDIRSUFFIX}
    438   mkdir incoming
    439   mv *so* incoming
    440   mv incoming/libSegFault.so .
    441 )
    442 mkdir -p usr
    443 cp -a $PKG/usr/bin usr
    444 mv usr/bin/ldd .
    445 rm usr/bin/*
    446 mv ldd usr/bin
    447 mkdir -p usr/lib${LIBDIRSUFFIX}
    448 # The gconv directory has a lot of stuff, but including it here will save some problems.
    449 # Seems standard elsewhere.
    450 cp -a $PKG/usr/lib${LIBDIRSUFFIX}/gconv usr/lib${LIBDIRSUFFIX}
    451 # Another manpage abandoned by GNU...
    452 #mkdir -p usr/man/man1
    453 #cp -a $PKG/usr/man/man1/ldd.1.gz usr/man/man1
    454 mkdir -p usr/libexec
    455 cp -a $PKG/usr/libexec/pt_chown usr/libexec
    456 # Same usr.bin deal:
    457 cp -a $PKG/sbin .
    458 mv sbin/ldconfig .
    459 rm sbin/*
    460 mv ldconfig sbin
    461 mkdir install
    462 cp -a $CWD/slack-desc.glibc-solibs install/slack-desc
    463 cp -a $CWD/doinst.sh-glibc-solibs install/doinst.sh
    464 fix_doinst
    465 sed -i "s/@@VERSION@@/$VERSION/g" install/doinst.sh
    466 # Ditch links:
    467 find . -type l -exec rm {} \;
    468 # Build the package:
    469 makepkg -l y -c n $TMP/glibc-solibs-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
    470 
    471 # And finally, the complete "all-in-one" glibc package is created
    472 # from whatever was leftover:
    473 cd $PGLIBC
    474 mv $PKG/* .
    475 mkdir -p etc/profile.d
    476 cp -a $CWD/profile.d/* etc/profile.d
    477 chown -R root:root etc
    478 chmod 755 etc/profile.d/*
    479 # Ditch links (these are in doinst.sh-glibc):
    480 find . -type l -exec rm {} \;
    481 mkdir install
    482 cp -a $CWD/slack-desc.glibc install/slack-desc
    483 cp -a $CWD/doinst.sh-glibc install/doinst.sh
    484 fix_doinst
    485 sed -i "s/@@VERSION@@/$VERSION/g" install/doinst.sh
    486 ( cd lib${LIBDIRSUFFIX}
    487   mkdir incoming
    488   mv *so* incoming
    489   mv incoming/libSegFault.so .
    490 )
    491 # Build the package:
    492 /sbin/makepkg -l y -c n $TMP/glibc-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
    493 
    494 # Done!
    495 echo
    496 echo "glibc packages built in $TMP!"
    497 
     8########### source original slackbuild (hopefully we dont need to modify it)
     9CWD=`pwd`
     10set -e
     11source ./glibc.SlackBuild.orig
     12ARCH=$SLACKWARE_ARCH
    49813
    49914############ make syn3 packages
    50015cd $CWD
    501 ARCH=i486
    50216for PKG in /glibc-tmp-*/package-*; do
    503         NAME=`echo $PKG| sed 's/.*package-//'| sed 's/-/_/'`
     17        NAME=`echo $PKG| sed 's/.*package-//'| sed 's/-/_/g'`
    50418
    50519        #seperate dev-package
Note: See TracChangeset for help on using the changeset viewer.