Remove lfs-uefi.txt symlink
[linux_from_scratch_hints.git] / PREVIOUS_FORMAT / tgz.txt
blob1f5db570da09efd837c19b563e181b4b7149d0e6
1 TITLE:          "make install" tracking, using slackware tools & checkinstall
2 LFS VERSION:    2.4.4
3 AUTHOR:         Michenaud Laurent <lmichenaud@free.fr>
5 SYNOPSIS:
6         Short guide, on how to be able to build .tgz from tarball.
8 HINT:
9 VERSION: 1.0    18-04-2001
11         One major problem with lfs is how to upgrade properly. When you do a
12         "make install", you don't really know which files are installed. Then,
13         if you want to upgrade properly, you have to remove the old files. If
14         there are no "make uninstall", it is a big problem. This hint explains
15         you how to build .tgz from a tarball install using the slackware package
16         system and the program checkinstall.
18 What you need :
20 - The slackware package tools avaible on www.slackware.com. 
21         The name of the package is :
22         hdsetup.tgz
23         
24 - Checkinstall program 
25         http://mayams.net/~izto/checkinstall-en.html
28 1 -  Installation of the slackware package tools
29 ------------------------------------------------
31 tar zxvf hdsetup.tar.gz
32 cd hdsetup/sbin
34 # Only these progs are useful :
35 cp explodepkg installpkg makepkg removepkg upgradepkg pkgtool.tty /usr/sbin/
37 # Giving executable modes if not gived before
38 cd /usr/sbin
39 chmod u+x explorepkg installpkg makepkg removepkg upgradepkg pkgtool.tty
41 # Rename of pkgtool
42 mv pkgtool.tty pkgtool
44 # Need some directory to keep log of installed packages
45 cd /var/log
46 mkdir packages scripts setup setup/tmp
49 2 - Installation of checkinstall
50 --------------------------------
52 tar zxvf checkinstall-1.3.2.tgz
53 cd checkinstall-1.3.2
55 # If you want to install checkinstall in another directoty than /usr/local/bin ( default ),
56 # you have to edit the following files and change the PREFIX :
57         Makefile
58         InstallWatch/Makefile
60 # Compiling
61         make
62         make install
64 # If before, you have changed the PREFIX, you have to edit the checkinstall script
65 # located in the directory where you have installed it.
66 # You have to change in this script the prefix for the three programs : checkinstall, installwatch, makepkg  
68 # Run checkinstall
69 checkinstall
72 3 - Example on how to use it ?
73 ------------------------------
75 # No changes for the beginning
76         tar zxvf xmms-1.2.2.tar.gz
77         cd xmms-1.2.2
78         ./configure
79         make
81 # Some classical files will have to be integrated in the .tgz file
82 # This step is not compulsory
83         mkdir doc-pak
84         cp README INSTALL COPYING Changelog TODO CREDITS doc-pak/
86 # Now, we have to create the .tgz and to install the files on your system
87 # if it is make install, just run
88         checkinstall
89 # if not, ( example make install-strip ), run
90         checkinstall make install
92 # Now, xmms is installed on your system and you have a xmms-1.2.2.tgz in source tree.
93 # To uninstall xmms from your system, run :
94         removepkg xmms-1.2.2.tgz
95 # To install again, run 
96         installpkg xmms-1.2.2.tgz
97         
98         
99 4 - Others things
100 -----------------
102 There are X11 programs to manage the tgz packages. They didnot work well with
103 me that is why i will use only console tools.
105 Checkinstall can create rpm files too. I didnot choose rpm because tgz tools needs only
106 a bash to work. Rpm needs librairy and is more complicated. When you will have to do
107 something in rescue phasing for example, tgz tools will have more chances to work properly
108 than a rpm system.