Ignore:
Timestamp:
11/15/18 10:09:21 (7 years ago)
Author:
Edwin Eefting <edwin@datux.nl>
Branches:
perl-5.22
Children:
f8776d2
Parents:
2ac0039
Message:

update/rebuild all perl stuff to 5.22. split up packages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • npl/perl/perl/perl.SlackBuild

    r2ac0039 r8662849  
    1 #!/bin/sh
    2 # Build and install Perl on Slackware
    3 # originally by:  David Cantrell <david@slackware.com>
    4 # maintained by:  <volkerdi@slackware.com>
    5 # Modfied for Syn-3 (heavily ;)
     1#!/bin/bash
     2
     3#DEP:mysql56
     4#DEP:expat
     5#DEP:openssl
     6#DEP:linuxdoc_tools
     7#DEP:groff
     8
     9removepkg perl
    610
    711
    8 CWD=`pwd`
    9 TMP=/tmp
    10 PKG=$TMP/package-perl
    11 
    12 VERSION=5.8.7
    13 # IMPORTANT: also update -Dinc_version_list in ./configure below!
    14 
    15 ARCH=${ARCH:-i486}
    16 BUILD=1
    17 
    18 # Additional required modules:
    19 #DBI=1.48
    20 #DBDMYSQL=3.0002
    21 #XMLPARSER=2.34
    22 
    23 if [ "$ARCH" = "i386" ]; then
    24   SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
    25 elif [ "$ARCH" = "i486" ]; then
    26   SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
    27 elif [ "$ARCH" = "s390" ]; then
    28   SLKCFLAGS="-O2"
    29 elif [ "$ARCH" = "x86_64" ]; then
    30   SLKCFLAGS="-O2"
    31 fi
    32 
    33 #if [ -x /usr/bin/perl ]; then
    34 #  echo "Perl detected."
    35 #  echo
    36 #  echo "It's a good idea to remove your existing perl first."
    37 #  echo
    38 #  sleep 15
    39 #fi
    40 
    41 # Clear build location:
    42 rm -rf $PKG
    43 mkdir -p $PKG
    44 
    45 # Extract the source code:
    46 cd $TMP
    47 rm -rf perl-$VERSION
    48 tar xjvf $CWD/perl-$VERSION.tar.bz2
    49 
    50 # Change into the source directory:
    51 cd perl-$VERSION
    52 
    53 # Adjust owner/perms to standard values:
    54 chown -R root.root .
    55 find . -perm 555 -exec chmod 755 {} \;
    56 find . -perm 444 -exec chmod 644 {} \;
    57 
    58 # It is often suggested that we add this to the ./Configure:
    59 #     -Dusethreads -Duseithreads \
    60 # However, this option is considered experimental, and is not
    61 # recommended for production systems.  As such, we can't add
    62 # to our default perl build.  If you want the option anyway,
    63 # just uncomment the lines below and rebuild perl.
    6412#
    65 # Update:  while it's no longer considered experimental (and
    66 # yes, other vendors do ship threaded perl by default), enabling
    67 # threads causes a huge (>20%) performance hit, and I've seen
    68 # other reports of instability.  A few things "need" perl threads
    69 # but usually that's simply because they were compiled against
    70 # a threaded libperl... not any real need.  IMHO, shipping a
    71 # threaded perl by default would not be a good idea.  It's only
    72 # because everyone else does it that it's continually
    73 # reconsidered here.
    74 #USE_THREADS="-Dusethreads -Duseithreads"
    75 
    76 # We no longer include suidperl.  To quote the INSTALL file:
    77 #
    78 #   Because of the buggy history of suidperl, and the difficulty
    79 #   of properly security auditing as large and complex piece of
    80 #   software as Perl, we cannot recommend using suidperl and the feature
    81 #   should be considered deprecated.
    82 #   Instead use for example 'sudo': http://www.courtesan.com/sudo/
    83 
    84 # Configure perl:
    85 ./Configure -de \
    86   -Dprefix=/usr \
    87   -Dcccdlflags='-fPIC' \
    88   -Dinstallprefix=/usr \
    89   -Doptimize="$SLKCFLAGS" \
    90   $USE_THREADS \
    91   -Dinc_version_list='5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0' \
    92   -Darchname=$ARCH-linux
    93 
    94 # Build perl
    95 make || exit 1
    96 #make test || exit 1
     13# Automaticly created by importpackage v1.0
     14# Imported from: https://mirrors.slackware.com/slackware/slackware-14.2/source/d/perl/
     15# Created at Thu Sep  6 16:26:30 CEST 2018
    9716
    9817
    99 # Install perl package:
    100 make install DESTDIR=$PKG || exit 1
     18########### source original slackbuild (hopefully we dont need to modify it)
     19CWD=`pwd`
     20set -e
     21source ./perl.SlackBuild.orig
    10122
    10223
    103 # Strip everything:
    104 ( cd $PKG
    105   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
    106   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
    107 )
     24############ make syn3 packages
     25cd $CWD
     26for PKG in /tmp/package-*; do
     27        NAME=`echo $PKG| sed 's/.*package-//'| sed 's/-/_/g'`
    10828
    109 # There are also miniperl and microperl.
    110 # I haven't had any requests for them, but would be willing
    111 # to consider adding one or both to the package if anyone
    112 # actually needs them for some reason.
    113 #make microperl
     29        #seperate dev-package
     30        syn3_move_dev $PKG $PKG""_dev
     31        syn3_makepkg $PKG""_dev $NAME""_dev $VERSION $ARCH || exit 1
    11432
    115 # Symlinks that replace hard links
    116 ( cd $PKG/usr/bin
    117   ln -sf perl$VERSION perl
    118   ln -sf c2ph pstruct
    119   ln -sf s2p psed )
    120 
    121 # Install documentation
    122 mkdir -p $PKG/usr/doc/perl-$VERSION
    123 cp -a \
    124   AUTHORS Artistic Copying INSTALL MANIFEST README README.Y2K README.cn README.jp README.ko README.micro README.tw Todo.micro \
    125   $PKG/usr/doc/perl-$VERSION
    126 
    127 # We follow LSB with symlinks in /usr/share:
    128 ( cd $PKG/usr/share
    129   mv man .. )
    130 ( cd $PKG/usr/man/man1
    131   mkdir foo
    132   cp *.1 foo
    133   rm *.1
    134   mv foo/* .
    135   rmdir foo
    136   gzip -9 *
    137   ln -sf c2ph.1.gz pstruct.1.gz
    138   ln -sf s2p.1.gz psed.1.gz )
    139 ( cd $PKG/usr/man/man3
    140   gzip -9 * )
    141 
    142 chown -R root.bin $PKG/usr/bin
    143 chmod 755 $PKG/usr/bin/*
    144 chmod 644 $PKG/usr/man/man?/*
    145 rmdir $PKG/usr/share
    146 
    147 # Insert the slack-desc:
    148 mkdir -p $PKG/install
    149 cat $CWD/slack-desc > $PKG/install/slack-desc
    150 
    151 # Build the package:
    152 cd $PKG
    153 makepkg -l y -c n $CWD/perl.pkg || exit 1
    154 echo $VERSION > $CWD/perl.version || exit 1
    155 echo $ARCH > $CWD/perl.arch || exit 1
     33        #make main package
     34        syn3_makepkg $PKG $NAME $VERSION $ARCH || exit 1
     35done
Note: See TracChangeset for help on using the changeset viewer.