LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to convert a tar.gz-file to tgz-file ? (https://www.linuxquestions.org/questions/slackware-14/how-to-convert-a-tar-gz-file-to-tgz-file-479180/)

Knasen 08-31-2006 12:07 PM

How to convert a tar.gz-file to tgz-file ?
 
Hi !

How do I convert a tar.gz-file to tgz-file ?

I use Slackware 10.0.

Thanks !

mindsport 08-31-2006 12:09 PM

Code:

mv filename.tar.gz filename.tgz
the extention means the same thing; they are both "tar balls"

raska 08-31-2006 12:10 PM

It's the same
 
Code:

mv <zee_file>.tar.gz <zee_file>.tgz
Though I'm not so sure if that's what you meant... or are you trying to build your own tgz packages?

Knasen 08-31-2006 12:30 PM

Quote:

Originally Posted by raska
Code:

mv <zee_file>.tar.gz <zee_file>.tgz
Though I'm not so sure if that's what you meant... or are you trying to build your own tgz packages?

I've dowloaded a tar.gz-file and want's to have it in the .tgz-format instead.

Thats all ....

I want a Slackware pack ...

How do build a tgz-file from a tar.gz-file then ?

mindsport 08-31-2006 12:48 PM

if you want to build a slackware package you need to do the following..

Code:

mkdir /pack
tar -zxvf <package.tar.gz>
cd package
./configure

make
make DESTDIR=/pack install

cd /pack
makepkg package.tgz


gbonvehi 08-31-2006 12:59 PM

You may want to read a bit more about Slackware packages before trying to make them, a good starting point: http://www.linuxpackages.net/howto.php
Examining existing packages is a good learning experience too.
There's a little tool created by gnashley that can help you to compile programs easily and make packages from them, make a search on this forum, there's a thread about it ( http://www.linuxquestions.org/questi...d.php?t=462649 ).

drewhead 08-31-2006 01:26 PM

Quote:

Originally Posted by mindsport
the extention means the same thing; they are both "tar balls"

It may help to say that there is nothing about a .tgz suffixed file that implies a slackware package. It's just a gzip compressed tar file making it synonymous with .tar.gz

What makes a given .tgz a slackware package is the context of the contents of that archive. Therefore making some arbitrary .tar.gz suffixed file a slackware package is not merly a matter of some simple conversion, it is a matter of correctly constructing a package using some data that _may_ be in a .tar.gz file.

gbonvehi cites a good place to learn about package construction if that's really what you want to do. But the conversion between tar.gz distributed source and a slackware package isn't some one step command.

pbhj 08-31-2006 06:05 PM

I was reading over this post and thinking "what's the quickest way to recognise that it's a tar.gz or a slackware package (tgz)?". Probably it would be that

A tar.gz (source files) ...
1) has text files called README, INSTALL with info on compilation (but tgz may have these too)
2) has Makefile or some text files that mention make, or perhaps a setup script like setup.pl
2) has a autogen.sh or configure script used to start off the package making routine
3) has a src/, doc/ or lib/ directory but not usually a bin/ directory

A tgz usually has just a couple of directories in the root of the file and they usually correspnd to high level system dir such as usr, share. A tgz also usually has an install/ dir with a doinst.sh file.

Daga 09-01-2006 01:58 AM

and you can look for those directories with "tar -tzf filename.tgz|less"

uselpa 09-01-2006 07:44 AM

or simply "less filename.tgz"

Knasen 09-01-2006 02:14 PM

OK !!! :scratch:

Thank you all very much for the information.

Well, then it is little more complicated to build a Slackwarepackage from a sourcepackage.

Very confusing to have Slackwarepackages named after tarball's.

Thanks !
Philip

raska 09-01-2006 04:11 PM

Quote:

Originally Posted by Knasen
Well, then it is little more complicated to build a Slackwarepackage from a sourcepackage

You can always get a bunch of Slackware ready-to-install packages at http://www.linuxpackages.net/

drkstr 09-01-2006 09:52 PM

Quote:

Originally Posted by Knasen
OK !!! :scratch:

Thank you all very much for the information.

Well, then it is little more complicated to build a Slackwarepackage from a sourcepackage.

Very confusing to have Slackwarepackages named after tarball's.

How so? This is exactly what it is. A Slackware package is just a tarball of install files. If you wanted to, you can install a Slackware package by simply untarring it to the root directory (Infact this is how I installed pkgtools in Knoppix so I could install the downloaded Slackware packages to a mounted partition).

In my opinion, you couldn't find a better package management system.

regards,
...drkstr

**edit**
my 1000'th post. Neato!

shilo 09-02-2006 05:36 AM

Quote:

Originally Posted by drkstr
If you wanted to, you can install a Slackware package by simply untarring it to the root directory

Don't forget to manually run the doinst.sh script and clean up the /install directory if you go that route. :)

Daga 09-04-2006 12:02 AM

Quote:

Originally Posted by uselpa
or simply "less filename.tgz"

That's a cool trick. Thanks!


All times are GMT -5. The time now is 05:45 PM.