Почетак › Форуми › Линукс дистрибуције › Slackware › instalacija Debian paketa
- This topic has 1 одговор, 2 гласа, and was last updated 20 years, 6 months раније by
worky.
-
АуторЧланци
-
14. март 2006. у 3:05 pm #7138
uzicanin
УчесникDa li je moguce, i ako jeste, kako instalirati debian pakete na Slackware?
14. март 2006. у 4:07 pm #42273worky
УчесникPokusaj sa ovom skriptom,deb2tgz:
[code]#!/bin/bash###########################################################################
#
# Shell program to Convert rpm and debian files to tar.gz format.
#
# Copyright 2001, USM Bish .
#
# This program is free software; you can redistribute it and / or
# modify it under the terms of the GNU General Public License as
# published by the F ree Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
#
# Usage:
#
# 2tgz.sh [ -h | –help ] [-d filename.deb] [-r filename.rpm]
#
# Options:
#
# -h, –help Display this help message and exit.
# -d filename.deb Convert .deb file to tar.gz
# -r filename.rpm Convert .rpm file to tar.gz
#
#
# Revisions:
#
# Aug/02/2001 File created ………. Ver 0.1
# Aug/02/2001 deb converter created … Ver 0.2
# Aug/03/2001 rpm converter added …. Ver 0.3
#
# Dependencies on other utils:
#
# o less In case not installed, change value of
# MY_PAGER to your pager (viz view/ more etc.)
# o ar Needed for debian file conversion
# o rpm2cpio Needed for rpm conversion
# o cpio – do –
#
######################################################################################################################################################
# Constants
###########################################################################PROGNAME=$(basename $0)
VERSION=”0.3″
TEMP_FILE=/tmp/${PROGNAME}.$$MY_PAGER=/usr/bin/less
###########################################################################
# Functions
###########################################################################function get_prefix
{
echo $PACKAGE > $PROGNAME.1
rev $PROGNAME.1 > $PROGNAME.2
cat $PROGNAME.2 | cut -b 5- > $PROGNAME.1
rev $PROGNAME.1 > $PROGNAME.2
PREFIX=`cat $PROGNAME.2`
}function view_tgz
{
tar -tvvz $HOME/$PROGNAME.1
cat $HOME/$PROGNAME.1 | awk ‘{print $1″t”$3″t”$6}’ > $HOME/$PROGNAME.2
echo -en “nConstituents of tarball : $PREFIX.tar.gznn” > $HOME/$PROGNAME.1
echo -en “Permissions Size Contentsnn” >> $HOME/$PROGNAME.1
cat $HOME/$PROGNAME.2 >> $HOME/$PROGNAME.1
cat $HOME/$PROGNAME.1 | $MY_PAGER
clean_up
}function done_message
{
echo “”
echo “Done …. Please unpack in a temporary directory”
echo “Check that there are no filename conflicts …..”
echo “You may like to do an *ldd* of binaries to check”
echo “dependencies before installing.”
echo “”
ls $PREFIX.*
echo -en “nView contents of “$PREFIX.tar.gz” [y/ n] .. ”
read YN
if [ “$YN” = “y” ]; then
view_tgz
fi
echo “Bye … ”
}function clean_up
{
rm -f ${TEMP_FILE}
rm -f $PROGNAME.1
rm -f $PROGNAME.2
}function graceful_exit
{
clean_up
exit
}function error_exit
{
echo “${PROGNAME}: ${1:-“Unknown Error”}” >&2
clean_up
exit 1
}function term_exit
{
echo “${PROGNAME}: Terminated”
clean_up
exit
}function int_exit
{
echo “${PROGNAME}: Aborted by user”
clean_up
exit
}function usage
{
echo “Usage: ${PROGNAME} [-h | –help] [-d filename.deb] [-r filename.rpm]”
}function helptext
{
#####
# Function to display help message for program
# No arguments
#####local tab=$(echo -en “tt”)
cat < /tmp/2tgz/$PREFIX.cpio
cd /tmp/2tgz
cpio –extract –preserve-modification-time –make-directories /dev/null 2> /dev/null
TARGET=`ls -d */`
tar -cvvzf $PREFIX.tar.gz $TARGET 1> /dev/null 2> /dev/null
cp $PREFIX.tar.gz $PD
cd /tmp
rm -rf 2tgz/
cd $PD
done_message
else # parm entered but incorrect
echo “RedHat package [$PACKAGE] not found”
echo “Quitting … ”
clean_up
exit 1
fi
;;h ) helptext
graceful_exit ;;* ) usage
exit 1esac
done
graceful_exit
#############################################################
[/code] -
АуторЧланци
Мораш бити пријављен да би поставио коментар у овој теми.