Someone can help me to fix/improve my custom SlackBuild for pcsxr-git (32 Bits) ?
by inukaze from LinuxQuestions.org on (#5FWBA)
Hi there again, i had wrote a custom SlackBuild for compile
pcsxr-git against Slackware32 14.2 (32 Bits obviusly) after for convert with compat32 under Slackware64 14.2.
Right now my SlackBuild code is this :
Code:#!/usr/bin/env bash
# Derechos de Distribucion 2010, 2011, 2012, 2015, 2016, 2018 Patrick Volkerding, Sebeka, MN, USA
# Todos los derechos reservados.
#
# La redistribucion y uso de este guion, con o sin modificacion(es) esta
# permitida siempre que se cumplan las siguientes condiciones :
#
# 1. Las redistribuciones de este guion deben conservar los derechos de distribucion anteriores.
# aviso, esta lista de condiciones y el siguiente descargo de responsabilidad.
#
# ESTE SOFTWARE ES PROPORCIONADO POR EL AUTOR "TAL CUAL" Y CUALQUIER EXPRESA O IMPLICITA
# GARANTIAS, INCLUYENDO, PERO NO LIMITADO A, LAS GARANTIAS IMPLICITAS DE
# SE RENUNCIA A LA COMERCIABILIDAD E IDONEIDAD PARA UN PROPOSITO EN PARTICULAR. EN NO
# EL AUTOR SERA RESPONSABLE DE CUALQUIER CASO DIRECTO, INDIRECTO, INCIDENTAL,
# DANOS ESPECIALES, EJEMPLARES O CONSECUENTES (INCLUYENDO, PERO NO LIMITADO A,
# ADQUISICION DE BIENES O SERVICIOS SUSTITUTOS; PERDIDA DE USO, DATOS O BENEFICIOS;
# O INTERRUPCION COMERCIAL) SIN EMBARGO Y EN CUALQUIER TEORIA DE RESPONSABILIDAD,
# YA SEA POR CONTRATO, RESPONSABILIDAD ESTRICTA O AGRAVIO (INCLUYENDO NEGLIGENCIA O
# DE LO CONTRARIO) QUE SURJA DE ALGUNA MANERA DEL USO DE ESTE SOFTWARE, INCLUSO SI
# INFORMADO DE LA POSIBILIDAD DE TALES DANOS.
# Hecho & modificado por Inukaze para SlackBuilds.org
#NOTA de Inukaze :
# Si quieres hacerlo para Compat32 te sugiero hacer una instalacion en el prefijo predeterminado /usr
# Los paquetes de 32 Bits al ser convertidos a compat32 en distros de 64 mueven sus archivos
# desde /usr/bin hacia /usr/bin/32
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM="pcsxr"
#BUILD=${BUILD:-1}
VERSION=${VERSION:-$(echo "$PKGNAM-iCatButler.tar.xz" | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
# Descargar el codigo fuente desde Git
git clone https://github.com/iCatButler/pcsxr "$PKGNAM-$VERSION"
tar --exclude-vcs -cf "$PKGNAM-$VERSION".tar "$PKGNAM-$VERSION"
rm -rf "$PKGNAM-$VERSION".tar.xz
xz -9 "$PKGNAM-$VERSION".tar
rm -r $CWD/$PKGNAM-$VERSION
# Determinar automaticamente la arquitectura en la que se compilara :
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
arm*) export ARCH=arm ;;
*) export ARCH=$( uname -m ) ;;
esac
fi
# Si se establece la variable PRINT_PACKAGE_NAME, este guion informara que
# el nombre del paquete creado, y luego exportado. Esta informacion
# podria ser util para otros guiones.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PKGNAM-$VERSION-$ARCH.txz"
exit 0
fi
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i386 -mtune=i386 -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i486 -mtune=i486 -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i586 -mtune=i586 -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
if [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i686 -mtune=i686 -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
if [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -fPIC -march=native -mtune=native -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
TMP=${TMP:-/tmp} ; cd $TMP
PKG=$TMP/package-$PKGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
cd "$PKGNAM-$VERSION"
mkdir build ; cd build
cmake \
-DENABLE_CCDDA:BOOL="1" \
-DUSE_LIBARCHIVE:BOOL="1" \
-DUSE_LIBCDIO:BOOL="1" \
-DBUILD_SIO1:BOOL="1" \
-DCMAKE_INSTALL_PREFIX:PATH="/usr" \
-DCMAKE_BUILD_TYPE=Debug ..
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
#Arreglar nombre del binario ejecutable y el archivo de menu
mv /tmp/package-pcsxr/usr/bin/pcsxr /tmp/package-pcsxr/usr/bin/pcsxr32 2>/dev/null
# Establecer Ruta :
PREFIJO=/usr
LIB=lib
echo '#!/usr/bin/env bash
# Establecer Ruta :
PREFIJO=/usr
LIB=lib
# Borrar archivos anteriores :
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgBladeSio1"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFCdrom"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFInput"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFNet"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFSound"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFXVideo"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgpeopsxgl"
rm -rf "$HOME/.pcsxr/plugins/libBladeSio1.so"
rm -rf "$HOME/.pcsxr/plugins/libDFCdrom.so"
rm -rf "$HOME/.pcsxr/plugins/libDFInput.so"
rm -rf "$HOME/.pcsxr/plugins/libDFNet.so"
rm -rf "$HOME/.pcsxr/plugins/libDFSound.so"
rm -rf "$HOME/.pcsxr/plugins/libDFXVideo.so"
rm -rf "$HOME/.pcsxr/plugins/libNullSio1.so"
rm -rf "$HOME/.pcsxr/plugins/libpeopsxgl.so"
# Enlazar Complementos
# Correspondientes a esta version :
ln -sf "$PREFIJO/$LIB/games/psemu/cfgBladeSio1" "$HOME/.pcsxr/plugins/cfg/cfgBladeSio1"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFCdrom" "$HOME/.pcsxr/plugins/cfg/cfgDFCdrom"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFInput" "$HOME/.pcsxr/plugins/cfg/cfgDFInput"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFNet" "$HOME/.pcsxr/plugins/cfg/cfgDFNet"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFSound" "$HOME/.pcsxr/plugins/cfg/cfgDFSound"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFXVideo" "$HOME/.pcsxr/plugins/cfg/cfgDFXVideo"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgpeopsxgl" "$HOME/.pcsxr/plugins/cfg/cfgpeopsxgl"
ln -sf "$PREFIJO/$LIB/games/psemu/libBladeSio1.so" "$HOME/.pcsxr/plugins/libBladeSio1.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFCdrom.so" "$HOME/.pcsxr/plugins/libDFCdrom.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFInput.so" "$HOME/.pcsxr/plugins/libDFInput.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFNet.so" "$HOME/.pcsxr/plugins/libDFNet.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFSound.so" "$HOME/.pcsxr/plugins/libDFSound.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFXVideo.so" "$HOME/.pcsxr/plugins/libDFXVideo.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libNullSio1.so" "$HOME/.pcsxr/plugins/libNullSio1.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libpeopsxgl.so" "$HOME/.pcsxr/plugins/libpeopsxgl.so"
# Iniciar Emulador
export PATH="$PREFIJO/bin/32":$PATH
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIJO/games/psemu:$PREFIJO/lib:$PREFIJO/$LIB/games/psemu"
cd "$PREFIJO/bin/32"
SDL_AUDIODRIVER=alsa ./pcsxr32 "$@"
#ldd ./pcsxr32 | grep "not found"
echo' | tee /usr/bin/pcsxr32 ; chmod a+o+x /usr/bin/pcsxr32
echo '[Desktop Entry]
Version=1.0
Type=Application
Name=PCSXR (32 Bits)
GenericName=PlayStation Emulator (32 Bits)
GenericName[ru_RU]= PlayStation (32 Bits)
GenericName[zh_CN]=PlayStation (32 Bits)
GenericName[zh_TW]=PlayStation (32 Bits)
Comment=Sony PlayStation emulator (32 Bits)
Comment[ru_RU]= Sony PlayStation (32 Bits)
Comment[zh_CN]=Sony PlayStation (32 Bits)
Comment[zh_TW]=Sony PlayStation (32 Bits)
Exec=/usr/bin/pcsxr32
Icon=pcsxr-icon
Categories=Game;' | tee "/tmp/package-pcsxr/usr/share/applications/pcsxr32.desktop" 2>/dev/null
mkdir -p $PKG/usr/share/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* INSTALL NEWS README* TODO \
$PKG/usr/share/doc/$PKGNAM-$VERSION
# Si hay una Lista de Cambios (ChangeLog), instalando al menos parte del historial reciente
# es util, pero no dejes que se salga totalmente de control:
if [ -r ChangeLog ]; then
DOCSDIR=$(echo $PKG/share/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
# Comprima y, si es necesario, enlace simbolico las paginas de manual:
if [ -d $PKG/usr/share/man ]; then
( cd $PKG/usr/share/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
ln -s $( readlink $eachpage ).gz $eachpage.gz
rm $eachpage
done
gzip -9 *.?
)
done
)
fi
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH.txzWhen i use my SlackBuild under Slackware32 14.2 i note
near the finish line the follow message
Quote:
The slack-desc content is
Code:# COMO EDITAR ESTE ARCHIVO :
# La "regla util" a continuacion facilita la edicion de la descripcion de un paquete. Linea
# arriba el primer '|' encima del ':' que sigue al nombre del paquete base, y el '|'
# en el lado derecho marca la ultima columna en la que puede poner un caracter. Debe
# Haga exactamente 11 lineas para que el formato sea correcto. Es tambien
# acostumbrado a dejar un espacio despues del ':'.
# |-----regla-util---------------------------------------------------------|
|-----handy-ruler------------------------------------------------------|
pcsxr-compat32: pcsxr-compat32 (Pcsx Reloaded)
pcsxr-compat32:
pcsxr-compat32: PCSX-Reloaded es un emulador de PlayStation 1 basado en los proyectos
pcsxr-compat32: PCSX con una interfaz para usuario mejorada y una gran cantidad de
pcsxr-compat32: mejoras implementadas en cuanto a la estabilidad y la funcionalidad
pcsxr-compat32:
pcsxr-compat32: PCSX-Reloaded utiliza los complementos compatibles con PSEMU para
pcsxr-compat32: proveer mas funcionalidad, sin dichos complementos no seria posible
pcsxr-compat32: utilizar los videojuegos nativos de la consola PlayStation 1
pcsxr-compat32:
pcsxr-compat32: Codigo-Fuente: https://github.com/iCatButler/pcsxrThings i need to fix :
1 - when i execute
Code:installpkg pcsxr-iCatButler-compat32.txzi need this write the file /usr/bin/pcsxr32 just when is installed under a 64 Bits distro with the follow content :
Code:# Establecer Ruta :
PREFIJO=/usr
LIB=lib
echo '#!/usr/bin/env bash
# Establecer Ruta :
PREFIJO=/usr
LIB=lib
# Borrar archivos anteriores :
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgBladeSio1"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFCdrom"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFInput"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFNet"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFSound"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFXVideo"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgpeopsxgl"
rm -rf "$HOME/.pcsxr/plugins/libBladeSio1.so"
rm -rf "$HOME/.pcsxr/plugins/libDFCdrom.so"
rm -rf "$HOME/.pcsxr/plugins/libDFInput.so"
rm -rf "$HOME/.pcsxr/plugins/libDFNet.so"
rm -rf "$HOME/.pcsxr/plugins/libDFSound.so"
rm -rf "$HOME/.pcsxr/plugins/libDFXVideo.so"
rm -rf "$HOME/.pcsxr/plugins/libNullSio1.so"
rm -rf "$HOME/.pcsxr/plugins/libpeopsxgl.so"
# Enlazar Complementos
# Correspondientes a esta version :
ln -sf "$PREFIJO/$LIB/games/psemu/cfgBladeSio1" "$HOME/.pcsxr/plugins/cfg/cfgBladeSio1"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFCdrom" "$HOME/.pcsxr/plugins/cfg/cfgDFCdrom"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFInput" "$HOME/.pcsxr/plugins/cfg/cfgDFInput"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFNet" "$HOME/.pcsxr/plugins/cfg/cfgDFNet"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFSound" "$HOME/.pcsxr/plugins/cfg/cfgDFSound"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFXVideo" "$HOME/.pcsxr/plugins/cfg/cfgDFXVideo"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgpeopsxgl" "$HOME/.pcsxr/plugins/cfg/cfgpeopsxgl"
ln -sf "$PREFIJO/$LIB/games/psemu/libBladeSio1.so" "$HOME/.pcsxr/plugins/libBladeSio1.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFCdrom.so" "$HOME/.pcsxr/plugins/libDFCdrom.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFInput.so" "$HOME/.pcsxr/plugins/libDFInput.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFNet.so" "$HOME/.pcsxr/plugins/libDFNet.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFSound.so" "$HOME/.pcsxr/plugins/libDFSound.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFXVideo.so" "$HOME/.pcsxr/plugins/libDFXVideo.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libNullSio1.so" "$HOME/.pcsxr/plugins/libNullSio1.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libpeopsxgl.so" "$HOME/.pcsxr/plugins/libpeopsxgl.so"
# Iniciar Emulador
export PATH="$PREFIJO/bin/32":$PATH
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIJO/games/psemu:$PREFIJO/lib:$PREFIJO/$LIB/games/psemu"
cd "$PREFIJO/bin/32"
SDL_AUDIODRIVER=alsa ./pcsxr32 "$@"
#ldd ./pcsxr32 | grep "not found"
echo' | tee /usr/bin/pcsxr32 ; chmod a+o+x /usr/bin/pcsxr32But this script is not created in the package of 32 Bits on my system when i use my slackbuild the package is called "pcsxr-iCatButler-i686.txz" and install this package, which i need change for fix it ?
i suppose exist a method for use the doinst for do this.
2 - The slack-desc looks-like is not working because if i use
slpkg -d pcsxr-iCatButler-i686 or
slpkg -d pcsxr-iCatButler-compat32
The message i recieve is :
Quote:
For example if i use slpkg for get description of installed package
Code:slpkg -d dosbox
PACKAGE NAME: dosbox-r3833-x86_64-1alien
COMPRESSED PACKAGE SIZE: 956K
UNCOMPRESSED PACKAGE SIZE: 2.7M
PACKAGE LOCATION: /tmp/slpkg/packages/dosbox-r3833-x86_64-1alien.tgz
PACKAGE DESCRIPTION:
dosbox: dosbox (A PC emulator with builtin DOS for running DOS Games)
dosbox:
dosbox: DOSBox is a DOS-emulator that uses the SDL-library which makes
dosbox: DOSBox very easy to port to different platforms.
dosbox: DOSBox has already been ported to many different platforms, such as
dosbox: Windows, BeOS, Linux, MacOS X...
dosbox:
dosbox:
dosbox:
dosbox: Homepage at http://www.dosbox.com/
dosbox:
FILE LIST:
./
install/
install/slack-desc
install/slack-required
usr/
usr/bin/
usr/bin/dosbox
usr/doc/
usr/doc/dosbox-r3833/
usr/doc/dosbox-r3833/AUTHORS
usr/doc/dosbox-r3833/COPYING
usr/doc/dosbox-r3833/ChangeLog
usr/doc/dosbox-r3833/INSTALL
usr/doc/dosbox-r3833/NEWS
usr/doc/dosbox-r3833/README
usr/doc/dosbox-r3833/README.video
usr/doc/dosbox-r3833/THANKS
usr/doc/dosbox-r3833/dosbox.SlackBuild
usr/man/
usr/man/man1/
usr/man/man1/dosbox.1.gz
usr/share/
usr/share/applications/
usr/share/applications/dosbox.desktop
usr/share/pixmaps/
usr/share/pixmaps/dosbox.pngThat show me the slack-desc content and the files with paths when i use that option in slpkg.
How i fix that on my SlackBuild ?
3 - I want to add if this prebuild package is installed under "i?86" (32 Bits) the script /usr/bin/pcsxr32 does not generated
But if is installed under "x86_64" (64 Bits), generate the script file for make it work like the program needs.
Extra thing : which package i need to install of compat32 for get spanish translation working ?


pcsxr-git against Slackware32 14.2 (32 Bits obviusly) after for convert with compat32 under Slackware64 14.2.
Right now my SlackBuild code is this :
Code:#!/usr/bin/env bash
# Derechos de Distribucion 2010, 2011, 2012, 2015, 2016, 2018 Patrick Volkerding, Sebeka, MN, USA
# Todos los derechos reservados.
#
# La redistribucion y uso de este guion, con o sin modificacion(es) esta
# permitida siempre que se cumplan las siguientes condiciones :
#
# 1. Las redistribuciones de este guion deben conservar los derechos de distribucion anteriores.
# aviso, esta lista de condiciones y el siguiente descargo de responsabilidad.
#
# ESTE SOFTWARE ES PROPORCIONADO POR EL AUTOR "TAL CUAL" Y CUALQUIER EXPRESA O IMPLICITA
# GARANTIAS, INCLUYENDO, PERO NO LIMITADO A, LAS GARANTIAS IMPLICITAS DE
# SE RENUNCIA A LA COMERCIABILIDAD E IDONEIDAD PARA UN PROPOSITO EN PARTICULAR. EN NO
# EL AUTOR SERA RESPONSABLE DE CUALQUIER CASO DIRECTO, INDIRECTO, INCIDENTAL,
# DANOS ESPECIALES, EJEMPLARES O CONSECUENTES (INCLUYENDO, PERO NO LIMITADO A,
# ADQUISICION DE BIENES O SERVICIOS SUSTITUTOS; PERDIDA DE USO, DATOS O BENEFICIOS;
# O INTERRUPCION COMERCIAL) SIN EMBARGO Y EN CUALQUIER TEORIA DE RESPONSABILIDAD,
# YA SEA POR CONTRATO, RESPONSABILIDAD ESTRICTA O AGRAVIO (INCLUYENDO NEGLIGENCIA O
# DE LO CONTRARIO) QUE SURJA DE ALGUNA MANERA DEL USO DE ESTE SOFTWARE, INCLUSO SI
# INFORMADO DE LA POSIBILIDAD DE TALES DANOS.
# Hecho & modificado por Inukaze para SlackBuilds.org
#NOTA de Inukaze :
# Si quieres hacerlo para Compat32 te sugiero hacer una instalacion en el prefijo predeterminado /usr
# Los paquetes de 32 Bits al ser convertidos a compat32 en distros de 64 mueven sus archivos
# desde /usr/bin hacia /usr/bin/32
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM="pcsxr"
#BUILD=${BUILD:-1}
VERSION=${VERSION:-$(echo "$PKGNAM-iCatButler.tar.xz" | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
# Descargar el codigo fuente desde Git
git clone https://github.com/iCatButler/pcsxr "$PKGNAM-$VERSION"
tar --exclude-vcs -cf "$PKGNAM-$VERSION".tar "$PKGNAM-$VERSION"
rm -rf "$PKGNAM-$VERSION".tar.xz
xz -9 "$PKGNAM-$VERSION".tar
rm -r $CWD/$PKGNAM-$VERSION
# Determinar automaticamente la arquitectura en la que se compilara :
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
arm*) export ARCH=arm ;;
*) export ARCH=$( uname -m ) ;;
esac
fi
# Si se establece la variable PRINT_PACKAGE_NAME, este guion informara que
# el nombre del paquete creado, y luego exportado. Esta informacion
# podria ser util para otros guiones.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PKGNAM-$VERSION-$ARCH.txz"
exit 0
fi
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i386 -mtune=i386 -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i486 -mtune=i486 -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i586 -mtune=i586 -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
if [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -march=i686 -mtune=i686 -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
if [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64 -fPIC -march=native -mtune=native -pipe"
export {C,CXX}FLAGS="$SLKCFLAGS"
export OPTFLAGS="$SLKCFLAGS"
fi
TMP=${TMP:-/tmp} ; cd $TMP
PKG=$TMP/package-$PKGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
cd "$PKGNAM-$VERSION"
mkdir build ; cd build
cmake \
-DENABLE_CCDDA:BOOL="1" \
-DUSE_LIBARCHIVE:BOOL="1" \
-DUSE_LIBCDIO:BOOL="1" \
-DBUILD_SIO1:BOOL="1" \
-DCMAKE_INSTALL_PREFIX:PATH="/usr" \
-DCMAKE_BUILD_TYPE=Debug ..
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
#Arreglar nombre del binario ejecutable y el archivo de menu
mv /tmp/package-pcsxr/usr/bin/pcsxr /tmp/package-pcsxr/usr/bin/pcsxr32 2>/dev/null
# Establecer Ruta :
PREFIJO=/usr
LIB=lib
echo '#!/usr/bin/env bash
# Establecer Ruta :
PREFIJO=/usr
LIB=lib
# Borrar archivos anteriores :
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgBladeSio1"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFCdrom"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFInput"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFNet"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFSound"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFXVideo"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgpeopsxgl"
rm -rf "$HOME/.pcsxr/plugins/libBladeSio1.so"
rm -rf "$HOME/.pcsxr/plugins/libDFCdrom.so"
rm -rf "$HOME/.pcsxr/plugins/libDFInput.so"
rm -rf "$HOME/.pcsxr/plugins/libDFNet.so"
rm -rf "$HOME/.pcsxr/plugins/libDFSound.so"
rm -rf "$HOME/.pcsxr/plugins/libDFXVideo.so"
rm -rf "$HOME/.pcsxr/plugins/libNullSio1.so"
rm -rf "$HOME/.pcsxr/plugins/libpeopsxgl.so"
# Enlazar Complementos
# Correspondientes a esta version :
ln -sf "$PREFIJO/$LIB/games/psemu/cfgBladeSio1" "$HOME/.pcsxr/plugins/cfg/cfgBladeSio1"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFCdrom" "$HOME/.pcsxr/plugins/cfg/cfgDFCdrom"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFInput" "$HOME/.pcsxr/plugins/cfg/cfgDFInput"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFNet" "$HOME/.pcsxr/plugins/cfg/cfgDFNet"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFSound" "$HOME/.pcsxr/plugins/cfg/cfgDFSound"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFXVideo" "$HOME/.pcsxr/plugins/cfg/cfgDFXVideo"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgpeopsxgl" "$HOME/.pcsxr/plugins/cfg/cfgpeopsxgl"
ln -sf "$PREFIJO/$LIB/games/psemu/libBladeSio1.so" "$HOME/.pcsxr/plugins/libBladeSio1.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFCdrom.so" "$HOME/.pcsxr/plugins/libDFCdrom.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFInput.so" "$HOME/.pcsxr/plugins/libDFInput.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFNet.so" "$HOME/.pcsxr/plugins/libDFNet.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFSound.so" "$HOME/.pcsxr/plugins/libDFSound.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFXVideo.so" "$HOME/.pcsxr/plugins/libDFXVideo.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libNullSio1.so" "$HOME/.pcsxr/plugins/libNullSio1.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libpeopsxgl.so" "$HOME/.pcsxr/plugins/libpeopsxgl.so"
# Iniciar Emulador
export PATH="$PREFIJO/bin/32":$PATH
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIJO/games/psemu:$PREFIJO/lib:$PREFIJO/$LIB/games/psemu"
cd "$PREFIJO/bin/32"
SDL_AUDIODRIVER=alsa ./pcsxr32 "$@"
#ldd ./pcsxr32 | grep "not found"
echo' | tee /usr/bin/pcsxr32 ; chmod a+o+x /usr/bin/pcsxr32
echo '[Desktop Entry]
Version=1.0
Type=Application
Name=PCSXR (32 Bits)
GenericName=PlayStation Emulator (32 Bits)
GenericName[ru_RU]= PlayStation (32 Bits)
GenericName[zh_CN]=PlayStation (32 Bits)
GenericName[zh_TW]=PlayStation (32 Bits)
Comment=Sony PlayStation emulator (32 Bits)
Comment[ru_RU]= Sony PlayStation (32 Bits)
Comment[zh_CN]=Sony PlayStation (32 Bits)
Comment[zh_TW]=Sony PlayStation (32 Bits)
Exec=/usr/bin/pcsxr32
Icon=pcsxr-icon
Categories=Game;' | tee "/tmp/package-pcsxr/usr/share/applications/pcsxr32.desktop" 2>/dev/null
mkdir -p $PKG/usr/share/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* INSTALL NEWS README* TODO \
$PKG/usr/share/doc/$PKGNAM-$VERSION
# Si hay una Lista de Cambios (ChangeLog), instalando al menos parte del historial reciente
# es util, pero no dejes que se salga totalmente de control:
if [ -r ChangeLog ]; then
DOCSDIR=$(echo $PKG/share/doc/${PKGNAM}-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
# Comprima y, si es necesario, enlace simbolico las paginas de manual:
if [ -d $PKG/usr/share/man ]; then
( cd $PKG/usr/share/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
ln -s $( readlink $eachpage ).gz $eachpage.gz
rm $eachpage
done
gzip -9 *.?
)
done
)
fi
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH.txzWhen i use my SlackBuild under Slackware32 14.2 i note
near the finish line the follow message
Quote:
[WARNING: /usr/share/man (with possibly not gzipped man pages) detected |
Code:# COMO EDITAR ESTE ARCHIVO :
# La "regla util" a continuacion facilita la edicion de la descripcion de un paquete. Linea
# arriba el primer '|' encima del ':' que sigue al nombre del paquete base, y el '|'
# en el lado derecho marca la ultima columna en la que puede poner un caracter. Debe
# Haga exactamente 11 lineas para que el formato sea correcto. Es tambien
# acostumbrado a dejar un espacio despues del ':'.
# |-----regla-util---------------------------------------------------------|
|-----handy-ruler------------------------------------------------------|
pcsxr-compat32: pcsxr-compat32 (Pcsx Reloaded)
pcsxr-compat32:
pcsxr-compat32: PCSX-Reloaded es un emulador de PlayStation 1 basado en los proyectos
pcsxr-compat32: PCSX con una interfaz para usuario mejorada y una gran cantidad de
pcsxr-compat32: mejoras implementadas en cuanto a la estabilidad y la funcionalidad
pcsxr-compat32:
pcsxr-compat32: PCSX-Reloaded utiliza los complementos compatibles con PSEMU para
pcsxr-compat32: proveer mas funcionalidad, sin dichos complementos no seria posible
pcsxr-compat32: utilizar los videojuegos nativos de la consola PlayStation 1
pcsxr-compat32:
pcsxr-compat32: Codigo-Fuente: https://github.com/iCatButler/pcsxrThings i need to fix :
1 - when i execute
Code:installpkg pcsxr-iCatButler-compat32.txzi need this write the file /usr/bin/pcsxr32 just when is installed under a 64 Bits distro with the follow content :
Code:# Establecer Ruta :
PREFIJO=/usr
LIB=lib
echo '#!/usr/bin/env bash
# Establecer Ruta :
PREFIJO=/usr
LIB=lib
# Borrar archivos anteriores :
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgBladeSio1"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFCdrom"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFInput"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFNet"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFSound"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgDFXVideo"
rm -rf "$HOME/.pcsxr/plugins/cfg/cfgpeopsxgl"
rm -rf "$HOME/.pcsxr/plugins/libBladeSio1.so"
rm -rf "$HOME/.pcsxr/plugins/libDFCdrom.so"
rm -rf "$HOME/.pcsxr/plugins/libDFInput.so"
rm -rf "$HOME/.pcsxr/plugins/libDFNet.so"
rm -rf "$HOME/.pcsxr/plugins/libDFSound.so"
rm -rf "$HOME/.pcsxr/plugins/libDFXVideo.so"
rm -rf "$HOME/.pcsxr/plugins/libNullSio1.so"
rm -rf "$HOME/.pcsxr/plugins/libpeopsxgl.so"
# Enlazar Complementos
# Correspondientes a esta version :
ln -sf "$PREFIJO/$LIB/games/psemu/cfgBladeSio1" "$HOME/.pcsxr/plugins/cfg/cfgBladeSio1"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFCdrom" "$HOME/.pcsxr/plugins/cfg/cfgDFCdrom"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFInput" "$HOME/.pcsxr/plugins/cfg/cfgDFInput"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFNet" "$HOME/.pcsxr/plugins/cfg/cfgDFNet"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFSound" "$HOME/.pcsxr/plugins/cfg/cfgDFSound"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgDFXVideo" "$HOME/.pcsxr/plugins/cfg/cfgDFXVideo"
ln -sf "$PREFIJO/$LIB/games/psemu/cfgpeopsxgl" "$HOME/.pcsxr/plugins/cfg/cfgpeopsxgl"
ln -sf "$PREFIJO/$LIB/games/psemu/libBladeSio1.so" "$HOME/.pcsxr/plugins/libBladeSio1.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFCdrom.so" "$HOME/.pcsxr/plugins/libDFCdrom.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFInput.so" "$HOME/.pcsxr/plugins/libDFInput.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFNet.so" "$HOME/.pcsxr/plugins/libDFNet.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFSound.so" "$HOME/.pcsxr/plugins/libDFSound.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libDFXVideo.so" "$HOME/.pcsxr/plugins/libDFXVideo.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libNullSio1.so" "$HOME/.pcsxr/plugins/libNullSio1.so"
ln -sf "$PREFIJO/$LIB/games/psemu/libpeopsxgl.so" "$HOME/.pcsxr/plugins/libpeopsxgl.so"
# Iniciar Emulador
export PATH="$PREFIJO/bin/32":$PATH
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIJO/games/psemu:$PREFIJO/lib:$PREFIJO/$LIB/games/psemu"
cd "$PREFIJO/bin/32"
SDL_AUDIODRIVER=alsa ./pcsxr32 "$@"
#ldd ./pcsxr32 | grep "not found"
echo' | tee /usr/bin/pcsxr32 ; chmod a+o+x /usr/bin/pcsxr32But this script is not created in the package of 32 Bits on my system when i use my slackbuild the package is called "pcsxr-iCatButler-i686.txz" and install this package, which i need change for fix it ?
i suppose exist a method for use the doinst for do this.
2 - The slack-desc looks-like is not working because if i use
slpkg -d pcsxr-iCatButler-i686 or
slpkg -d pcsxr-iCatButler-compat32
The message i recieve is :
Quote:
No such package pcsxr-iCatButler-i686: Can't dislpay No such package pcsxr-iCatButler-compat32: Can't dislpay |
Code:slpkg -d dosbox
PACKAGE NAME: dosbox-r3833-x86_64-1alien
COMPRESSED PACKAGE SIZE: 956K
UNCOMPRESSED PACKAGE SIZE: 2.7M
PACKAGE LOCATION: /tmp/slpkg/packages/dosbox-r3833-x86_64-1alien.tgz
PACKAGE DESCRIPTION:
dosbox: dosbox (A PC emulator with builtin DOS for running DOS Games)
dosbox:
dosbox: DOSBox is a DOS-emulator that uses the SDL-library which makes
dosbox: DOSBox very easy to port to different platforms.
dosbox: DOSBox has already been ported to many different platforms, such as
dosbox: Windows, BeOS, Linux, MacOS X...
dosbox:
dosbox:
dosbox:
dosbox: Homepage at http://www.dosbox.com/
dosbox:
FILE LIST:
./
install/
install/slack-desc
install/slack-required
usr/
usr/bin/
usr/bin/dosbox
usr/doc/
usr/doc/dosbox-r3833/
usr/doc/dosbox-r3833/AUTHORS
usr/doc/dosbox-r3833/COPYING
usr/doc/dosbox-r3833/ChangeLog
usr/doc/dosbox-r3833/INSTALL
usr/doc/dosbox-r3833/NEWS
usr/doc/dosbox-r3833/README
usr/doc/dosbox-r3833/README.video
usr/doc/dosbox-r3833/THANKS
usr/doc/dosbox-r3833/dosbox.SlackBuild
usr/man/
usr/man/man1/
usr/man/man1/dosbox.1.gz
usr/share/
usr/share/applications/
usr/share/applications/dosbox.desktop
usr/share/pixmaps/
usr/share/pixmaps/dosbox.pngThat show me the slack-desc content and the files with paths when i use that option in slpkg.
How i fix that on my SlackBuild ?
3 - I want to add if this prebuild package is installed under "i?86" (32 Bits) the script /usr/bin/pcsxr32 does not generated
But if is installed under "x86_64" (64 Bits), generate the script file for make it work like the program needs.
Extra thing : which package i need to install of compat32 for get spanish translation working ?