Slackbuild (Правильно ли я дописал)

SLAX, Deep Style, ZenWalk

Модератор: Модераторы разделов

Аватара пользователя
badblack2z
Сообщения: 95
ОС: MOPSLinux 4.0

Slackbuild

Сообщение badblack2z »

Вообщем имеются исходники kde, имеется SlackBuild скаченый с инета. Хочу, что бы kde был собран под мой проц, правильно ли я изменил его?

Код: Выделить всё

#!/bin/sh
CWD=`pwd`
TMP=/tmp
PKG=$TMP/package-arts
VERSION=1.5.2
FLAGS=${CPUOPT:-athlon}

# 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/opt/kde

# Avoid a version number in .la files:
if [ -d /usr/lib/qt ]; then
  QTDIR=/usr/lib/qt
fi
cd $TMP
echo "Building arts-$VERSION.tar.bz2..."
tar xjvf $CWD/arts-$VERSION.tar.bz2
cd arts-$VERSION
chown -R root.root .
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
  --prefix=/opt/kde \
  --with-xinerama \
  --disable-debug \
  --program-prefix="" \
  --program-suffix="" \
#  $TARGET-slackware-linux
make $NUMJOBS
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/arts-$VERSION
cp -a \
  COPYING COPYING.LIB INSTALL doc/NEWS doc/README doc/TODO \
  $PKG/usr/doc/arts-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
# It's possible that arts might be installed without KDE (or kdelibs), since
# other audio related libraries and apps outside of KDE depend on it.  So,
# we shouldn't rely on kdelibs to make sure that /opt/kde/lib is added to
# the ld.so.conf.  Do it here, too.
# Also, I'd rather see arts in /usr at this point, but KDE doesn't seem to
# pick it up correctly there, and I don't want all of KDE moved into /usr,
# so it'll have to stay like this for now.
cat << EOF > $PKG/install/doinst.sh
#!/bin/sh
# Add KDE library directory to /etc/ld.so.conf:
if ! grep /opt/kde/lib etc/ld.so.conf 1> /dev/null 2> /dev/null; then
  echo "/opt/kde/lib" >> etc/ld.so.conf
fi
EOF
( 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/opt/kde/man ]; then
  gzip -9 $PKG/opt/kde/man/man?/*
fi

cd $PKG
makepkg -l y -c n ../arts-$VERSION-$ARCH-$BUILD.tgz
Спасибо сказали:
Аватара пользователя
Uncle_Theodore
Сообщения: 3339
ОС: Slackware 12.2, ArchLinux 64

Re: Slackbuild

Сообщение Uncle_Theodore »

Скажи лучше, что там было, и на что ты это изменил. (измененные строчки покажи.)
Этот билд только для arts, что ли? Где ты его взял, что-то я такого найти не могу...
Спасибо сказали:
Аватара пользователя
badblack2z
Сообщения: 95
ОС: MOPSLinux 4.0

Re: Slackbuild

Сообщение badblack2z »

Да, это для arts. Изменил:
Добавил

Код: Выделить всё

FLAGS=${CPUOPT:-athlon}

Но это не правильно я сделал, уже понял, надо

Код: Выделить всё

CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \

заменить на

Код: Выделить всё

CFLAGS="-O2 -march=athlon" \
CXXFLAGS="-O2 -march=athlon" \

Так что тему можно закрыть.
Спасибо сказали: