Summary
Description: Unnamed repository; edit this file 'description' to name the repository.
Last Change: Wed 4/10/13 13:00
Recent Commits
>
--git a/Slackware/ati-packager.sh b/Slackware/ati-packager.sh
index e047adf..ad02395 100755
--- a/Slackware/ati-packager.sh
+++ b/Slackware/ati-packager.sh
@@ -30,10 +30,10 @@ function _init_env
# Mi assicuro che tutti i comandi interni alla bash necessari, siano abilitati
enable cd echo exit export local return set source test
- # Controllo i comandi esterni, essenziali!
+ # Controllo i comandi esterni essenziali!
if ! grep --version >& /dev/null || ! id --version >& /dev/null\
|| ! gettext --version >& /dev/null; then
- _print '1;31' '' 'You have to install at least one these commands:'\
+ _print '1;31' '' 'You need to install at least one these commands:'\
'\n\t- grep\n\t- id\n\t- gettext'
exit 1
fi
@@ -41,9 +41,9 @@ function _init_env
# ROOT_DIR = directory attuale
ROOT_DIR=$PWD
- # Directory, relativa alla root directory attuale, in cui si trova questo script.
- # Si ricordi che quando l'ati-installer.sh esegue questo script, la root directory
- # non è quella in cui si trova questo script.
+ # Directory, relativa a ROOT_DIR, in cui si trova questo script.
+ # Si ricordi che quando l'ati-installer.sh esegue questo script la root directory
+ # è ROOT_DIR
SCRIPT_DIR=packages/Slackware
# Settaggi per gettext. Inclusione della funzione eval_gettext().
@@ -56,12 +56,10 @@ function _init_env
[ $(id -u) -gt 0 ] && _print '' '' "`gettext 'Only root can do it!'`" && exit 1
- echo "$ROOT_DIR" | grep -q ' ' && _print '' '' "`gettext 'The name of the current directory should not contain any spaces'`" && exit 1
-
- BUILD_VER=1.4.3
+ echo "$ROOT_DIR" | grep -q ' ' && _print '' '' "`gettext "The name of the current directory mustn't contain any spaces"`" && exit 1
# Comandi esterni da cui il builder dipende nella fase di creazione dei pacchetti
- BUILD_DEPS=(chmod cp cut file find gzip ln makepkg mkdir modinfo mv rm sed sh strip tar tr xargs)
+ BUILD_DEPS=(chmod cp cut file find gzip ln makepkg mkdir mv rm sed sh strip tar xargs)
# Comandi esterni da cui il builder dipende nella fase di installazione dei pacchetti
INSTALL_DEPS=(basename dirname depmod installpkg lsmod md5sum modprobe ps upgradepkg)
@@ -70,32 +68,13 @@ function _init_env
ARCH=$(arch)
[[ $ARCH != x86_64 ]] && ARCH='x86'
- # Informazioni sul kernel in uso
+ # Release del kernel in uso
KNL_RELEASE=$(uname -r)
- KNL_VERSION=$(echo $KNL_RELEASE | cut -d '.' -f1)
- KNL_MAJOR=$(echo $KNL_RELEASE | cut -d '.' -f2)
- KNL_MINOR=$(echo $KNL_RELEASE | cut -d '.' -f3)
- KNL_BUILD=$(echo $KNL_RELEASE | cut -d '.' -f4)
+ ATI_DRIVER_NAME=fglrx
ATI_DRIVER_VER=$(./ati-packager-helper.sh --version)
ATI_DRIVER_REL=$(./ati-packager-helper.sh --release)
- # Nome del modulo del kernel
- MODULE_NAME=fglrx.ko.gz
-
- # Directory in cui verranno messi i file per la creazione del pacchetto del modulo
- # del kernel
- MODULE_PKG_DIR=${SCRIPT_DIR}/module_pkg
-
- # Nome del pacchetto del modulo del kernel
- MODULE_PACK_NAME=fglrx-module-${ATI_DRIVER_VER}-${ARCH}-${ATI_DRIVER_REL}
-
- # Directory in cui verranno messi i file per la creazione del pacchetto per il server X
- X_PKG_DIR=${SCRIPT_DIR}/x_pkg
-
- # Nome parziale (verrà poi integrato) del pacchetto per il server X
- X_PACK_PARTIAL_NAME=fglrx-${ATI_DRIVER_VER}-${ARCH}-${ATI_DRIVER_REL}
-
# Directory in cui verranno spostati i pacchetti creati e altri file
DEST_DIR=${PWD%/*}
@@ -116,16 +95,18 @@ function _init_env
# Controlla l'esistenza dei comandi necessari, ma esterni al build
# $1 può essere:
-# 'build': controlla l'esistenza dei comandi necessari alla costruzione dei pacchetti
-# 'install': controlla l'esistenza dei comandi necessari all'installazione dei pacchetti
-# $2 può essere:
-# '': stampa a video solo il nome dei comandi non trovati
-# '--dryrun': stampa a video il nome del comando che sta controllando
+# 'build': per i comandi necessari alla costruzione dei pacchetti
+# 'install': per i comandi necessari all'installazione dei pacchetti
+# nessuno dei precedenti: allora $* è un elenco di comandi separati da uno spazio
+# $2 può essere (nel caso $1 sia o 'build' o 'install'):
+# '': stampa a video solo il nome dei comandi non trovati
+# '--dryrun': stampa a video il nome del comando che sta controllando
function _check_external_command
{
local i=0
local DEPS_OK=0
local DRYRUN=0
+
[ "x$2" = 'x--dryrun' ] && DRYRUN=1
case $1 in
@@ -159,7 +140,7 @@ function _check_external_command
if (( $DRYRUN )); then
_print '1;31' 'n' "`gettext 'NOT FOUND'`"
else
- _print '1;31' '' "`eval_gettext \"You have to install \\\${_command}\"`"
+ _print '1;31' '' "`eval_gettext \"You must install \\\${_command}\"`"
fi
DEPS_OK=1
elif (( $DRYRUN )); then
@@ -255,23 +236,15 @@ function _installpkg
{
_print '1;32' '' "`gettext 'Install/Upgrade package/s'`"
- # Controllo l'esistenza del file temporaneo in cui sono scritti i nomi dei pacchetti
- # da installare
+ # Controllo l'esistenza del file temporaneo in cui sono scritti i nomi dei pacchetti da installare
[ ! -f ${TMP_FILE} ] && _print '1;31' '' "`eval_gettext \"ERROR: \\\${TMP_FILE}, file not found\"`" && return 1
- # Controllo che il server X non sia attivo
- ps -C X >/dev/null && _print '1;31' '' "`gettext 'ERROR: you must kill server X'`" && return 1
-
- # Se MODULE_IN_MEMORY == 1 il modulo è già presente in memoria
- local MODULE_IN_MEMORY=0
- lsmod | grep -q ${MODULE_NAME%.ko.gz} && MODULE_IN_MEMORY=1
-
# Installo i pacchetti
for pkg in $(<${TMP_FILE})
do
- if [ -f ${DIR_PACKAGE}${pkg%.tgz} ]; then
+ if [ -f ${DIR_PACKAGE}/${pkg%.tgz} ]; then
upgradepkg --reinstall "${DEST_DIR}/$pkg"; # Il pacchetto era già installato
- elif [ -f ${DIR_PACKAGE}$(echo $pkg | cut -d'-' -f-2)* ]; then
+ elif [ -f ${DIR_PACKAGE}/$(echo $pkg | cut -d'-' -f-2)* ]; then
upgradepkg "${DEST_DIR}/$pkg"; # Il pacchetto era installato ad una versione diversa
else
installpkg "${DEST_DIR}/$pkg"; # Il pacchetto non era installato
@@ -280,19 +253,30 @@ function _installpkg
# Se il modulo è già in memoria, scarico il vecchio e
# ricarico il nuovo
- if [ $MODULE_IN_MEMORY -eq 1 ]; then
- local module=${MODULE_NAME%.ko.gz}
- _print '' '' "`eval_gettext \"Reload module \\\$module\"`"
+ if lsmod | grep -q ${ATI_DRIVER_NAME}; then
+ local module=${ATI_DRIVER_NAME}
+ _print '1;33' '' "`eval_gettext \"Reloading module \\\$module\"`"
modprobe -r $module
modprobe $module
fi
+ # Controllo se il server X è attivo
+ if ps -C X >/dev/null; then
+ _print '1;33' '' "`gettext 'Warning: you must rerun the X server'`"
+ fi
+
return 0
}
# Directory che contiene l'elenco dei pacchetti installati nelle distribuzioni
# basate su Slackware
-DIR_PACKAGE=/var/log/packages/
+DIR_PACKAGE=/var/log/packages
+
+# L'elenco dei maintaners dell'ATI SlackBuild (è una lista separata da ';')
+MAINTAINERS='Emanuele Tomasi <tomasi@cli.di.unipi.it>'
+
+# Versione dell'ATI SlackBuild
+BUILD_VER=1.4.4
# Per queste opzioni, non c'è bisogno dell'inizializzazione
case $1 in
@@ -310,9 +294,9 @@ case $1 in
--identify)
[ $2 != 'All' ] && exit ${ATI_INSTALLER_ERR_VERS}
- [ -d ${DIR_PACKAGE} ] && exit 0
+ [ ! -d ${DIR_PACKAGE} ] && exit ${ATI_INSTALLER_ERR_VERS}
- exit ${ATI_INSTALLER_ERR_VERS}
+ exit 0
;;
# Questo script onora le API versione 2 dell'ati-installer.sh
@@ -322,7 +306,7 @@ case $1 in
# Lista dei maintainer (separata da ';')
--get-maintainer)
- echo "Emanuele Tomasi <tomasi@cli.di.unipi.it>"
+ echo ${MAINTAINERS}
exit 0
;;
esac
@@ -332,9 +316,10 @@ case $1 in
# Controllo che tutto il necessario alla costruzione dei pacchetti
# sia correttamente installato
--buildprep)
- echo -e "\nATI SlackBuild Version $BUILD_VER"\
+ echo -en "\nATI SlackBuild Version $BUILD_VER"\
"\n--------------------------------------------"\
- "\nby: Emanuele Tomasi <tomasi@cli.di.unipi.it>\n"
+ "\nby: "
+ echo -e ${MAINTAINERS//;/\\n} "\n"
EXIT_STATUS=0
@@ -346,12 +331,12 @@ case $1 in
fi
unset opt
- # Controllo che il parametro $2 sia un nome di pacchetto da costruire, valido
- ! _buildpkg $2 '--dryrun' && EXIT_STATUS=${ATI_INSTALLER_ERR_PREP}
-
# Controllo l'esistenza dei comandi esterni necessari alla costruzione del pacchetto
! _check_external_command 'build' $3 && EXIT_STATUS=${ATI_INSTALLER_ERR_PREP}
+ # Controllo che il parametro $2 sia un nome di pacchetto da costruire, valido
+ ! _buildpkg $2 '--dryrun' && EXIT_STATUS=${ATI_INSTALLER_ERR_PREP}
+
# Elimino, se esiste, il file temporaneo creato/modificato da --buildpkg
rm -f ${TMP_FILE}
@@ -374,26 +359,6 @@ case $1 in
# Controllo l'esistenza dei comandi esterni necessari
! _check_external_command 'install' $3 && EXIT_STATUS=${ATI_INSTALLER_ERR_PREP}
- # Controllo che la versione del server Xorg sia maggiore o uguale a 6.7
- source ./check.sh --noprint
- if [ -z ${X_VERSION} ]; then
- (( $DRYRUN )) && _print '1;31' '' "`gettext 'ERROR: the version of Xorg server must be >= 6.7'`"
- EXIT_STATUS=${ATI_INSTALLER_ERR_PREP}
- fi
-
- # Controllo che la versione del kernel sia maggiore o uguale a 2.6
- if [ $KNL_VERSION -lt 2 ] || [ $KNL_MAJOR -lt 6 ]; then
- (( $DRYRUN )) && _print '1;31' '' "`gettext 'ERROR: the version of kernel must be >= 2.6'`"
- EXIT_STATUS=${ATI_INSTALLER_ERR_PREP}
- fi
-
- # Controllo la versione delle librerie glibc
- GLIBC_VER=$(ldconfig --version| head -n1 | grep -o [[:digit:]]\.[[:digit:]]*)
- if [ $(echo $GLIBC_VER | cut -d'.' -f1) -lt 2 ] || [ $(echo $GLIBC_VER | cut -d'.' -f2) -lt 2 ]; then
- (( $DRYRUN )) && _print '1;31' '' "`gettext 'ERROR: the version of glibc must be >= 2.2'`"
- EXIT_STATUS=${ATI_INSTALLER_ERR_PREP}
- fi
-
exit $EXIT_STATUS
;;
diff --git a/Slackware/locale/it/LC_MESSAGES/ATI_SlackBuild.mo b/Slackware/locale/it/LC_MESSAGES/ATI_SlackBuild.mo
index 35451d4..ea1fff0 100644
Binary files a/Slackware/locale/it/LC_MESSAGES/ATI_SlackBuild.mo and b/Slackware/locale/it/LC_MESSAGES/ATI_SlackBuild.mo differ
diff --git a/Slackware/make_module.sh b/Slackware/make_module.sh
index c1c8af6..6d33495 100644
--- a/Slackware/make_module.sh
+++ b/Slackware/make_module.sh
@@ -21,53 +21,49 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
-# Usata da make_module. Crea il pacchetto per la Slackware
-function _make_module_pkg
-{
- cd ${ROOT_DIR}/${MODULE_PKG_DIR}
-
- # Estraggo la versione del kernel dal modulo creato
- local MODULE_KERNEL_VERSION=$(modinfo ./${MODULE_NAME} | grep vermagic| tr -s ' ' ' '| cut -d' ' -f2)
- local MODULE_DEST_DIR=lib/modules/${MODULE_KERNEL_VERSION}/external
-
- mkdir -p ${MODULE_DEST_DIR}
- mv ${MODULE_NAME} ${MODULE_DEST_DIR}
-
- # Modifico il nome del pacchetto aggiungendo alla fine, la versione del kernel
- MODULE_PACK_NAME=${MODULE_PACK_NAME}_kernel_${MODULE_KERNEL_VERSION//-/_}.tgz
-
- makepkg -l y -c n ${DEST_DIR}/${MODULE_PACK_NAME}
-
- [ "x${TMP_FILE}" != "x" ] && echo ${MODULE_PACK_NAME} >> ${TMP_FILE}
-
- cd ${ROOT_DIR}
-
- return 0
-}
-
# Crea il modulo per il kernel
function _make_module
{
local MODULE_DIR=lib/modules/fglrx/build_mod
- # Copy arch-depend files
+ cd ${ROOT_DIR}
+
+ # 1)
+ # Compilo il modulo del kernel
+
+ # 1.1) Copy arch-depend files
mv arch/${ARCH}/${MODULE_DIR}/* common/${MODULE_DIR}
cd common/${MODULE_DIR}
- # Se ci sono, applico le patch
- source ${ROOT_DIR}/${SCRIPT_DIR}/patch_functions.sh
- _module_patch
+ # 1.2) Se ci sono, applico le patch
+ if [ ! -f ${ROOT_DIR}/${SCRIPT_DIR}/patch_functions.sh ]; then
+ _print '1;33' '' "`gettext "Warning: I can't apply the patches because I haven't found patch_functions.sh script!"`"
+ else
+ source ${ROOT_DIR}/${SCRIPT_DIR}/patch_functions.sh
+ _module_patch
+ fi
- # Make modules with ati's script
+ # 1.3) Make modules with ati's script
if ! sh make.sh; then
_print '' '' "`gettext "ERROR: I didn't make module"`"
exit 1
fi
- # Make module package
- cat ../fglrx*.ko | gzip -c >> ${ROOT_DIR}/${MODULE_PKG_DIR}/$MODULE_NAME
- _make_module_pkg
+ # 2)
+ # MAKE PACKAGE
+ mkdir -p ${ROOT_DIR}/${SCRIPT_DIR}/module_pkg/lib/modules/${KNL_RELEASE}/external
+ cat ../fglrx*.ko | gzip -c >> ${ROOT_DIR}/${SCRIPT_DIR}/module_pkg/lib/modules/${KNL_RELEASE}/external/${ATI_DRIVER_NAME}.ko.gz
+
+ cd ${ROOT_DIR}/${SCRIPT_DIR}/module_pkg
+
+ local MODULE_PACK_NAME=${ATI_DRIVER_NAME}-module-${ATI_DRIVER_VER}-${ARCH}-${ATI_DRIVER_REL}_kernel_${KNL_RELEASE//-/_}.tgz
+
+ makepkg -l y -c n ${DEST_DIR}/${MODULE_PACK_NAME}
+
+ [ "x${TMP_FILE}" != "x" ] && echo ${MODULE_PACK_NAME} >> ${TMP_FILE}
+
+ cd ${ROOT_DIR}
return 0
}
\ No newline at end of file
diff --git a/Slackware/patch_functions.sh b/Slackware/patch_functions.sh
index 7721082..0e557a9 100644
--- a/Slackware/patch_functions.sh
+++ b/Slackware/patch_functions.sh
@@ -39,7 +39,6 @@ function _apply_the_patch
# Un insieme di patch interne allo SlackBuild. Viene invocata solo se non sono già state trovate patch locali in /etc/ati/patch
function _internal_patch
{
- local ATI_DRIVER_MAJOR_VER=${ATI_DRIVER_VER:0:4} # Primi 4 caratteri (Es: 8.732 -> 8.73)
local INT_PATCH_DIR=${ROOT_DIR}/${SCRIPT_DIR}/patch # Directory che contiene le patch interne
local file=none # Nome della patch da applicare
@@ -84,16 +83,16 @@ function _module_patch
fi
done
- # Applico la ati_to_gpl.patch, se la trovo e se l'md5sum corrisponde
- if [ -f ${DIR_PATCH}/ati_to_gpl.patch ]; then
+ # Applico la ati_to_gpl.patch, se la trovo e se l'md5sum corrisponde
+ if [ -f ${DIR_PATCH}/ati_to_gpl.patch ]; then
_print '1;33' '' "`gettext 'Found the ati_to_gpl.patch, checking md5sum'`"
if md5sum -c ${ROOT_DIR}/${SCRIPT_DIR}/atg.md5sum; then
_print '1;32' '' "`gettext 'applied'`\n"
- sh ${DIR_PATCH}/ati_to_gpl.patch
+ sh ${DIR_PATCH}/ati_to_gpl.patch
else
_print '1;31' '' "`gettext 'md5sum failed, it not seem the original ati_to_gpl.patch'`\n"
fi
- fi
+ fi
fi
# Se non ho trovato patch locali, provo quelle interne allo SlackBuild
diff --git a/Slackware/po/it.po b/Slackware/po/it.po
index 23fbf5a..1144035 100644
--- a/Slackware/po/it.po
+++ b/Slackware/po/it.po
@@ -3,13 +3,12 @@
# This file is distributed under the same license as the PACKAGE package.
# Emanuele Tomasi <tomasi@cli.di.unipi.it>, 2011.
#
-#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ATI_SlackBuild\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-02-06 18:58+0100\n"
-"PO-Revision-Date: 2011-02-06 18:59+0100\n"
+"POT-Creation-Date: 2011-02-16 19:45+0100\n"
+"PO-Revision-Date: 2011-02-16 19:46+0100\n"
"Last-Translator: Emanuele Tomasi <tomasi@cli.di.unipi.it>\n"
"Language-Team:\n"
"Language: it\n"
@@ -17,109 +16,109 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ati-packager.sh:42
+#: ati-packager.sh:57
msgid "Only root can do it!"
msgstr "Devi essere root!"
-#: ati-packager.sh:46
-msgid "The name of the current directory should not contain any spaces"
+#: ati-packager.sh:59
+msgid "The name of the current directory mustn't contain any spaces"
msgstr "Il nome della directory corrente non deve contenere nessuno spazio"
-#: ati-packager.sh:136
+#: ati-packager.sh:128
#, sh-format
-msgid "Check for command: ${command}"
+msgid "Check for command: ${_command}"
msgstr "Controllo se esiste il comando: ${command}"
-#: ati-packager.sh:150
+#: ati-packager.sh:141
msgid "NOT FOUND"
msgstr "NON TROVATO"
-#: ati-packager.sh:152
+#: ati-packager.sh:143
#, sh-format
-msgid "You have to install ${command}"
+msgid "You must install ${_command}"
msgstr "ERRORE: devi installare il comando grep"
-#: ati-packager.sh:156
+#: ati-packager.sh:147
msgid "OK"
msgstr "OK"
-#: ati-packager.sh:210
+#: ati-packager.sh:201
msgid "make_module.sh script missing!"
msgstr "Manca lo script make_module.sh!"
-#: ati-packager.sh:211
+#: ati-packager.sh:202
msgid "make_x.sh script missing!"
msgstr "Manca lo script make_x.sh!"
-#: ati-packager.sh:235
+#: ati-packager.sh:226
#, sh-format
msgid "$version unsupported."
msgstr "$version non è supportata."
-#: ati-packager.sh:246
+#: ati-packager.sh:237
msgid "Install/Upgrade package/s"
msgstr "Installo/Aggiorno il/i pacchetto/i"
-#: ati-packager.sh:250
+#: ati-packager.sh:240
#, sh-format
msgid "ERROR: ${TMP_FILE}, file not found"
msgstr "ERRORE: file ${TMP_FILE} non trovato"
-#: ati-packager.sh:253
-msgid "ERROR: you must kill server X"
-msgstr "ERRORE: devi fermare il server X"
-
-#: ati-packager.sh:275
+#: ati-packager.sh:258
#, sh-format
-msgid "Reload module $module"
+msgid "Reloading module $module"
msgstr "Ricarico il modulo $module"
-#: ati-packager.sh:334
+#: ati-packager.sh:265
+msgid "Warning: you must rerun the X server"
+msgstr "Attenzione: devi rilanciare il server X"
+
+#: ati-packager.sh:329
#, sh-format
msgid "ERROR: ${opt} is not a valid parameter"
msgstr "ERRORE: ${opt} non è un parametro valido"
-#: ati-packager.sh:370
-msgid "ERROR: the version of Xorg server must be >= 6.7"
-msgstr "ERRORE: la versione del server X deve essere >= 6.7"
-
-#: ati-packager.sh:376
-msgid "ERROR: the version of kernel must be >= 2.6"
-msgstr "ERRORE: la versione del kernel deve essere >= 2.6"
-
-#: ati-packager.sh:383
-msgid "ERROR: the version of glibc must be >= 2.2"
-msgstr "ERRORE: la versione delle glibc deve essere >= 2.2"
-
-#: ati-packager.sh:402
+#: ati-packager.sh:377
#, sh-format
msgid "${command}: unsupported option passed by ati-installer.sh"
msgstr "${command}: opzione sbagliata passata dallo script ati-installer.sh"
-#: make_module.sh:64
+#: make_module.sh:41
+msgid ""
+"Warning: I can't apply the patches because I haven't found patch_functions."
+"sh script!"
+msgstr ""
+"Attenzione: non posso applicare le patch perché non ho trovato lo script "
+"patch_functions.sh!"
+
+#: make_module.sh:49
msgid "ERROR: I didn't make module"
msgstr "ERRORE: non sono riuscito a creare il modulo"
+#: make_x.sh:34
+msgid "ERROR: your X server isn't supported"
+msgstr "ERRORE: il tuo server X non è supportato"
+
#: patch_functions.sh:30
msgid "I can't apply the patch: program patch not found"
msgstr "Non posso applicare la patch: non ho trovato il comando patch"
-#: patch_functions.sh:32 patch_functions.sh:91
+#: patch_functions.sh:32 patch_functions.sh:90
msgid "applied"
msgstr "applicata"
-#: patch_functions.sh:48
+#: patch_functions.sh:47
msgid "Found internal patch:"
msgstr "Trovata la patch interna:"
-#: patch_functions.sh:79
+#: patch_functions.sh:78
msgid "Found patch:"
msgstr "Trovata la patch:"
-#: patch_functions.sh:89
+#: patch_functions.sh:88
msgid "Found the ati_to_gpl.patch, checking md5sum"
msgstr "Trovata la patch ati_to_gpl.patch, controllo l'md5sum"
-#: patch_functions.sh:94
+#: patch_functions.sh:93
msgid "md5sum failed, it not seem the original ati_to_gpl.patch"
msgstr "md5sum fallito, non sembra esssere la patch originale&nb
Copyright © 2013 by Phoronix Media