WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Quick hack to convert Debian packages.  (Read 52987 times)

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Quick hack to convert Debian packages.
« Reply #30 on: June 09, 2011, 04:02:16 PM »
I will give this script some attention in the near future.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Quick hack to convert Debian packages.
« Reply #31 on: June 09, 2011, 05:39:26 PM »
Script has been updated and attached to the original post.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10917
Re: Quick hack to convert Debian packages.
« Reply #32 on: June 09, 2011, 06:05:49 PM »
Wow, when you say near future you really mean it.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Quick hack to convert Debian packages.
« Reply #33 on: June 09, 2011, 06:21:17 PM »
Wow  that's cool.  Thanks for the quick fix, I know others like me appreciate the effort Thanks

Offline k318wilcoxa

  • Newbie
  • *
  • Posts: 1
Re: Quick hack to convert Debian packages.
« Reply #34 on: August 16, 2016, 07:01:23 AM »
I'm having issues as well.. I know this post hasn't had activity in years. I'm new to TC. The script is also prompting for "Install the squashfs-tools" package?? I installed but still not moving forward?? Any help would be appreciated.

Thanks Abe

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Quick hack to convert Debian packages.
« Reply #35 on: August 16, 2016, 07:41:29 AM »
Works here.
Does the message "Install the squashfs-tools package before proceeding." still show up after
Code: [Select]
tce-load -i squashfs-tools.tcz
?
Download a copy and keep it handy: Core book ;)

Offline marttt

  • Newbie
  • *
  • Posts: 9
Re: Quick hack to convert Debian packages.
« Reply #36 on: December 16, 2016, 02:17:16 PM »
Works here.
Does the message "Install the squashfs-tools package before proceeding." still show up after
Code: [Select]
tce-load -i squashfs-tools.tcz
?
For me it didnt. The script worked without errors (and saved me from despair). Thanks to the author!

Offline xor

  • Hero Member
  • *****
  • Posts: 1232
Re: Quick hack to convert Debian packages.
« Reply #37 on: July 20, 2020, 10:13:48 AM »
Can we download "steam" with this!?

Offline Mathimino

  • Newbie
  • *
  • Posts: 1
Re: Hack rapide pour convertir les paquets Debian.
« Reply #38 on: June 15, 2021, 12:13:52 PM »
hello, i know this chat is a long time ago but i can't seem to use the script

Offline Green_goblin

  • Newbie
  • *
  • Posts: 6
Re: Quick hack to convert Debian packages.
« Reply #39 on: November 24, 2023, 02:20:10 PM »
I updated the script with a few minor changes, it should work now:

Code: [Select]
#!/bin/sh
# Create tce/tcz from Debian package
# Usage: $ deb2tcz packagename.deb packaganame.tcz

if [ `/usr/bin/id -u` -ne 0 ]; then
echo "Please run as root".
exit 1
fi

HERE=`pwd`
PKGDIR=/tmp/deb2tcz.1234
PKG="$PKGDIR"/pkg
FILE="$1"
APPNAME="$2"
INPUT=${FILE##*.}

[ -d "$PKGDIR" ] || mkdir -p "$PKGDIR"

make_tcz() {

mkdir -p "$PKG"
ar p "$FILE" data.tar.xz > "$PKGDIR"/data.tar.xz # unpack .deb
tar xf "$PKGDIR"/data.tar.xz -C "$PKG" # unpack .tar

[ -d "$PKG"/usr/share/doc ] && rm -r "$PKG"/usr/share/doc
[ -d "$PKG"/usr/share/man ] && rm -r "$PKG"/usr/share/man
[ -d "$PKG"/usr/share/menu ] && rm -r "$PKG"/usr/share/menu
cd "$PKG"
find . -type d -empty | xargs rmdir > /dev/null 2>&1
cd "$PKGDIR"
mksquashfs pkg "$HERE"/"$APPNAME" -noappend
cd "$HERE"
rm -r "$PKGDIR"
}



if [ ! -f /usr/local/tce.installed/findutils ]; then
echo "Install findutils.tcz before proceeding."
exit 1
fi

if [ ! `which mksquashfs` ]; then
echo "Install the squashfs-tools package before proceeding."
exit 1
fi



[ -z "$APPNAME" ] && echo "You must specify an extension name." && exit 1

[ -z "$1" ] && echo "You must specify a file."
if [ ! "$INPUT" == "deb" ] ; then
echo "Only Debian packages work with this."
exit 1
fi
EXT=${APPNAME##*.}
if [ `echo "$EXT" | grep "tcz"` 2>/dev/null ]; then
make_tcz
else
echo "You need to specify a tcz  for the output file."
exit 1
fi

if [ -f "$APPNAME" ]; then
echo "Success."
else
echo "Something went wrong."
fi