Repository 32bit  Forum
Repository 64bit  Wiki

[RISOLTO]Problema slackbuild(s)

Se avete problemi con l'installazione e la configurazione di Slackware64 postate qui. Non usate questo forum per argomenti che trattano la Slackware32 o generali... per quelli usate rispettivamente il forum Slackware e Gnu/Linux in genere.

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware64 usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Slackware64, se l'argomento è Slackware32 o generale usate rispettivamente il forum Slackware o Gnu/Linux in genere.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.

[RISOLTO]Problema slackbuild(s)

Messaggioda shock » gio dic 31, 2009 19:14

Salve, ho dei problemi con degli slackbuild...quello di openbox e quello di open office.

1 openbox (questo è il contenuto della directory):

- obconf-2.0.3.tar
- obconf.SlackBuild
- openbox-3.4.9.tar
- openbox.SlackBuild
- slack-desc.obconf
- slack-desc.openbox
- slack-required.obconf
-xinitrc.openbox

Questo è lo slackbuild:

Codice: Seleziona tutto
#!/bin/sh
# $Id: openbox.SlackBuild,v 1.3 2009/09/15 11:42:34 root Exp root $
# Copyright (c) 2008-2009  Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
#   Permission to use, copy, modify, and distribute this software for
#   any purpose with or without fee is hereby granted, provided that
#   the above copyright notice and this permission notice appear in all
#   copies.
#
#   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
#   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
#   IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
#   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
#   SUCH DAMAGE.
# -----------------------------------------------------------------------------
#
# Slackware SlackBuild script
# ===========================
# By:         Eric Hameleers <alien@slackware.com>
# For:        openbox
# Descr:      a highly configurable, lighweight window manager
# URL:        http://icculus.org/openbox/
# Needs:     
# Changelog: 
# 3.4.7.2-1:  04/Jun/2008 by Eric Hameleers <alien@slackware.com>
#             * Initial build.
#
# Run 'sh openbox.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
# -----------------------------------------------------------------------------

# Set initial variables:

PRGNAM=openbox
VERSION=${VERSION:-3.4.9}
ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-1}
TAG=${TAG:-alien}

DOCS="ABOUT-NLS AUTHORS CHANGELOG COMPLIANCE COPYING README"

# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)

# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
SRCURL="http://icculus.org/${PRGNAM}/releases/${PRGNAM}-${VERSION}.tar.gz"

##
## --- with a little luck, you won't have to edit below this point --- ##
##

# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
# Catch unitialized variables:
set -u
P1=${1:-1}

case "$ARCH" in
  i486)      SLKCFLAGS="-O2 -march=i486 -mtune=i686"
             SLKLDFLAGS=""; LIBDIRSUFFIX=""
             ;;
  s390)      SLKCFLAGS="-O2"
             SLKLDFLAGS=""; LIBDIRSUFFIX=""
             ;;
  powerpc)   SLKCFLAGS="-O2"
             SLKLDFLAGS=""; LIBDIRSUFFIX=""
             ;;
  x86_64)    SLKCFLAGS="-O2 -fPIC"
             SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
             ;;
esac

# Create working directories:
mkdir -p $OUTPUT          # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
mkdir -p $PKG             # place for the package to be built
rm -rf $PKG/*             # always erase old package's contents
rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build

# Source file availability:
if ! [ -f ${SOURCE} ]; then
  if ! [ "x${SRCURL}" == "x" ]; then
    # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
    [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
    echo "Source '$(basename ${SOURCE})' not available yet..."
    echo "Will download file to $(dirname $SOURCE)"
    wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
    if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
      echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
      mv -f "${SOURCE}" "${SOURCE}".FAIL
      exit 1
    fi
  else
    echo "File '$(basename ${SOURCE})' not available... aborting the build."
    exit 1
  fi
fi

if [ "$P1" == "--download" ]; then
  echo "Download complete."
  exit 0
fi

# --- PACKAGE BUILDING ---

echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"

# Explode the package framework:
if [ -f $SRCDIR/_$PRGNAM.tar.gz ]; then
  cd $PKG
  explodepkg $SRCDIR/_$PRGNAM.tar.gz
  cd -
fi

cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

echo Building ...
LDFLAGS="$SLKLDFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --localstatedir=/var \
  --sysconfdir=/etc \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --disable-static \
  --enable-startup-notification \
  --enable-xcursor \
  --enable-session-management \
  --program-prefix= \
  --program-suffix= \
  --build=$ARCH-slackware-linux \
  2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log

# Install all the needed stuff to the package dir
# Use installwatch if available, to produce a logfile of the installation
# process that is more easily readable:
if $(which installwatch > /dev/null 2>&1); then
  installwatch -o $OUTPUT/install-${PRGNAM}.log make DESTDIR=$PKG install
else
  make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
fi

# Add an xinitrc file to be used by xwmconfig:
mkdir -p $PKG/etc/X11/xinit
install -m 0755 -o root $SRCDIR/xinitrc.$PRGNAM \
  $PKG/etc/X11/xinit/xinitrc.$PRGNAM

# Make sure that KDM picks up the LXDE session type as well:
mkdir -p $PKG/usr/share/apps/kdm/sessions
( cd $PKG/usr/share/apps/kdm/sessions
  for i in $(ls ../../../xsessions/*.desktop) ; do ln -sf $i ; done
)

# Add this to the doinst.sh:
! [ -d $PKG/install ] && mkdir -p $PKG/install
cat <<EOINS >> $PKG/install/doinst.sh
# Handle the incoming configuration files:
config() {
  for infile in \$1; do
    NEW="\$infile"
    OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`"
    # If there's no config file by that name, mv it over:
    if [ ! -r \$OLD ]; then
      mv \$NEW \$OLD
    elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then
      # toss the redundant copy
      rm \$NEW
    fi
    # Otherwise, we leave the .new copy for the admin to consider...
  done
}

# An example of how you handle your '.new' config files:
#config etc/openbox.conf.new

EOINS

# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
cat $SRCDIR/$(basename $0) | sed \
  -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \
  -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \
  -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \
  > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;

# Compress the man page(s):
if [ -d $PKG/usr/man ]; then
  find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
  for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi

# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc.$PRGNAM > $PKG/install/slack-desc

# Build the package:
cd $PKG
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt



Come devo farlo partire?

2 openoffice (questo è il contenuto della directory):

- doinst.sh
- OOo_3.1.1_LinuxX86-64_install_wJRE_en-US.tar
- openoffice.org
- openoffice.org.info
- README
- slack-desc

Questo è lo slackbuild:

Codice: Seleziona tutto
#!/bin/sh

# Slackware build script for OpenOffice.org

# Copyright 2006-2009  Robby Workman, Northport, Alabama, ASA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Thanks to Sandman1, Larhzu, and MacIver for early assistance.
# Thanks to Fred Emmott (http://slamd64.com) for some better code in a few
#   places and ideas to include the Optimization Solver and disable javaldx.
# Thanks to hba for the idea to include support for other languages.
# Thanks to Nille Akerstrom for the diff to support w/JRE tarballs
# Thanks to ivo@linvo.org for hints on installing extensions
# Thsnks to necropresto for better x86_64 support

PRGNAM=openoffice.org
VERSION=3.1.1
ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

# This should allow you to either pass a different value of OOLANG when you
# run the script (OOLANG=pt-BR ./openoffice.org.SlackBuild for example) or
# change it in this script.  Note that you will need to have the correct
# tarball in the build directory for this to work...
# You can get localized tarballs from the following location:
# ftp://ftp.free.fr/mirrors/ftp.openoffice.org/localized/$OOLANG/$VERSION/
# Thanks to Niki Kovacs for finding this :-)
OOLANG=${OOLANG:-en-US}
PKG_LANG=$(echo $OOLANG | sed s/-/_/)   # Leave this alone
# Some localized versions only ship with a bundled JRE, and we'd like this
# script to work on those as well...
WJRE=${WJRE:-no}

# If you want to disable java support by removing executable permissions
# form OOo's java loader (this will not affect other apps), set this
# variable to "YES"   Default is "NO"
DISABLE_JAVA=${DISABLE_JAVA:-NO}

# Change source package name
if [ "$ARCH" = "x86_64" ]; then
  SRCARCH="X86-64"
  PKGARCH="$ARCH"
  WJRE=yes #Overwrite WJRE option since the only x86_64 I see has jre
else
  SRCARCH="Intel"
  PKGARCH="i586"
fi

# Yes, I know there is a Slackware integration file in the desktop-integration
# directory, but it's worthless to us.  I'd prefer to do things correctly.

# Ignore this - it's just to get the toplevel directory name of the
# extracted tarball archive
if [ $WJRE != no ]; then
  SOURCEDIR=$(tar tzf $CWD/OOo_${VERSION}_Linux${SRCARCH}_install_wJRE_${OOLANG}.tar.gz | head -1 | tr -d \/)
else
  SOURCEDIR=$(tar tzf $CWD/OOo_${VERSION}_Linux${SRCARCH}_install_${OOLANG}.tar.gz | head -1 | tr -d \/)
fi
# If the above operation failed for some reason, unset SOURCEDIR so that
# the "set -eu" below will cause us to bail out with an error
[ -z $SOURCEDIR ] && unset SOURCEDIR
 
set -eu

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$SOURCEDIR

# Handle the tarballs that include a bundled JRE
if [ $WJRE != no ]; then
  tar xvf $CWD/OOo_${VERSION}_Linux${SRCARCH}_install_wJRE_${OOLANG}.tar.gz -C $TMP
  rm -rf $TMP/$SOURCEDIR/{JavaSetup.jar,installdata,setup}
  rm -rf $TMP/$SOURCEDIR/RPMS/{userland,jre-*-linux-*.rpm}
else
  tar xvf $CWD/OOo_${VERSION}_Linux${SRCARCH}_install_${OOLANG}.tar.gz -C $TMP
fi

cd $TMP/$SOURCEDIR/RPMS/
mv desktop-integration/openoffice.org3.1-freedesktop-menus-3.1-9420.noarch.rpm .
rm *onlineupdate*.rpm # We don't want this
for FILE in *.rpm ; do rpm2cpio < $FILE | cpio -imdv ; done
rm -rf desktop-integration *.rpm
mv opt usr $PKG
cd $PKG

# Kill a broken symlink
rm -f $PKG/usr/share/applications/openoffice.org3-startcenter.desktop

# Create symlinks in /usr/bin to actual binaries
cd $PKG/usr/bin
  for FILE in \
    sbase scalc sdraw simpress smath soffice spadmin swriter unopkg ; do
      rm -f $FILE
      ln -sf ../../opt/openoffice.org3/program/$FILE $FILE ;
  done
cd -

# Remove DejaVu and Liberation fonts - these are included in other packages
rm -f opt/openoffice.org/basis3.1/share/fonts/truetype/[DL]*.ttf

# Fix Exec commands in the desktop files
# See http://bugzilla.xfce.org/show_bug.cgi?id=2430
cd $PKG//opt/openoffice.org3/share/xdg/
  for APP in base calc draw impress math writer; do
    sed -i 's%Exec=openoffice.org3 -%Exec=s%' $APP.desktop ;
  done
cd -

# Install extensions
UNOPKG_BIN=$PKG/opt/openoffice.org3/program/unopkg
DICT_DIR=$PKG/opt/openoffice.org3/share/extension/install
if [ -x "$UNOPKG_BIN" ]; then
  UNOPKG_TMP=$TMP/$$$$$$
  find $DICT_DIR -type f -name "*.oxt" \
    -exec $UNOPKG_BIN add --shared {} \
    "-env:UserInstallation=file:///$UNOPKG_TMP" \;
  rm -rf $UNOPKG_TMP    # Clean up after ourselves
fi

# Move docs to their expected locations
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd $PKG/opt/openoffice.org3
  mv README* *LICENSE* readmes licenses $PKG/usr/doc/$PRGNAM-$VERSION
cd -
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

# Disable Java support if desired (see above)
if [ "$DISABLE_JAVA" = "YES" ]; then
  chmod -x $PKG/opt/openoffice.org/ure/bin/javaldx
fi

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

# Fix ownership and permissions and make the package
chown -R root:root .
find . -type d -exec chmod 755 {} \;
chmod -R u+rw,go+r-w,a-s .
/sbin/makepkg -c n -l y $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz}


Come procedo?


Grazie in anticipo, scusate per il disturbo e buon anno nuovoooooooooooo!!!!!!!!!!!

Ciao.
Ultima modifica di shock il lun gen 25, 2010 18:10, modificato 1 volta in totale.
Avatar utente
shock
Linux 2.4
Linux 2.4
 
Messaggi: 359
Iscritto il: mer ott 28, 2009 18:47
Nome Cognome: Ivan
Slackware: 13.1 x86_64
Kernel: 2.6.33.4-huge-smp
Desktop: KDE 4.4.3

Re: Problema slackbuild(s)

Messaggioda manublade » gio dic 31, 2009 20:12

Prova a leggere la sezione relativa su Slackware4Dummies, mi sembra pag. 180.
Buon anno a te.
manublade
Linux 2.4
Linux 2.4
 
Messaggi: 499
Iscritto il: dom gen 08, 2006 22:21

Re: Problema slackbuild(s)

Messaggioda submax82 » ven gen 01, 2010 15:12

per openoffice usa il mio autobuilder, è più comodo e ottieni un pacchetto tgz o txz ugualmente e forse anche migliore.
Avatar utente
submax82
Staff
Staff
 
Messaggi: 3202
Iscritto il: mar ago 30, 2005 23:00
Desktop: xfce
Distribuzione: SalixOS

Re: Problema slackbuild(s)

Messaggioda shock » ven gen 01, 2010 17:38

Ho scaricato l'autobuilder, ma non lo ho ancora provato, come funziona?
Avatar utente
shock
Linux 2.4
Linux 2.4
 
Messaggi: 359
Iscritto il: mer ott 28, 2009 18:47
Nome Cognome: Ivan
Slackware: 13.1 x86_64
Kernel: 2.6.33.4-huge-smp
Desktop: KDE 4.4.3

Re: Problema slackbuild(s)

Messaggioda submax82 » ven gen 01, 2010 22:07

bè c'è scritto sul mio sito, ovviamente devi avere una connessione internet attiva sul pc con slack :thumbright:

comunque devi aver installato tutte le dipendenze che trovi nello slack-required del pacchetto e poi dai un installpkg openoffice-autobuilder-multilang-3.1.1-noarch-22sm.tgz e segui le istruzioni
Avatar utente
submax82
Staff
Staff
 
Messaggi: 3202
Iscritto il: mar ago 30, 2005 23:00
Desktop: xfce
Distribuzione: SalixOS


Torna a Slackware64

Chi c’è in linea

Visitano il forum: Google [Bot], Yahoo [Bot] e 3 ospiti