summaryrefslogtreecommitdiff
path: root/extra/source/kde3-compat/kdelibs3/kdelibs3.SlackBuild
blob: d197ea32f6a9a55d4f7783675917e303efc9214d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh
CWD=`pwd`
TMP=/tmp
PKG=$TMP/package-kdelibs

# Set the config option variables if they are not already set:
if [ -r ../KDE.options ]; then
  . ../KDE.options
fi

# The global options may be overridden here (if needed):
if [ -r ./local.options ]; then
  . ./local.options
fi

rm -rf $PKG
mkdir -p $PKG/usr

# Avoid a version number in .la files:
if [ -d /opt/kde3/lib64/qt ]; then
  QTDIR=/opt/kde3/lib64/qt3
fi

cd $TMP
echo "Building kdelibs-$VERSION.tar.bz2..."
tar xjvf $CWD/kdelibs-$VERSION.tar.bz2 || exit 1
cd kdelibs-$VERSION || exit 1

if [ -r $CWD/apply-patches.sh ]; then
  . $CWD/apply-patches.sh
fi

chown -R root:root .
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
  --prefix=/opt/kde3 \
  --libdir=/opt/kde3/lib64 \
  --sysconfdir=/opt/kde3/etc \
  --with-ssl-dir=/usr \
  --with-xinerama \
  --disable-debug \
  --enable-dnotify \
  --program-prefix="" \
  --program-suffix="" \
  --build=$TARGET-slackware-linux

make $NUMJOBS || exit 1
make install DESTDIR=$PKG

mkdir -p $PKG/usr/doc/kdelibs-$VERSION
cp -a \
  AUTHORS COMPILING COMPILING.html COPYING* DEBUG INSTALL KDE2PORTING.html KDE3PORTING.html NAMING README  kdelibs.lsm \
  $PKG/usr/doc/kdelibs-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
if [ -d $PKG/usr/man ]; then
  gzip -9 $PKG/usr/man/man?/*
fi

cd $PKG
makepkg -l y -c n ../kdelibs3-$VERSION-$ARCH-$BUILD.txz