[CLUE-Tech] If I want to install a program to extract "rar" files?

Joe Linux joelinux at earthlink.net
Tue Mar 4 10:17:21 MST 2003


Thanks for the very detailed instructions.  I will try to see if I can 
successfully follow them.   The "/apps" directory it actually just a 
"downloaded program" holder. Which is then hopefully processed into 
something useful.  Perhaps at some future install fest you or someone 
else could give instructions (private or small group lessons) on exactly 
how to install and uninstall these "tar.gz" type of applications.  In 
other words those of us in the Idiot class could practice installing and 
uninstalling certain applications.    I think your approach to separate 
program directories makes a lot of sense as intermingling these type of 
programs with the standard system is most likely asking for trouble.

mgushee at havenrock.com wrote:

>On 3 Mar 2003 at 15:15, Joe Linux wrote:
>
>  
>
>>The instructions (?) are as follows:
>>    
>>
>
>I guess you could call them instructions. To be more precise, we're 
>looking at the contents of a Makefile. So, what do you do with a 
>Makefile (don't everybody yell at once)?
>
>Make! Or, to be more precise,
>
>  $ make
>
>Even if you've never done that, you probably know that 'make' is most 
>often used to compile software packages. But it can also be used to 
>install binaries; that appears to be what this Makefile is intended 
>for.
>
>  
>
>>###################################################################
>># Installing RAR executables, configuration files and SFX modules #
>># to appropriate directories                                      #
>>###################################################################
>>
>>PREFIX=/usr/local
>>    
>>
>
>PREFIX tells make where to install things. So your executables will 
>presumably go to /usr/local/bin, config files to /usr/local/etc, and 
>so on.
>
>  
>
>>install:
>>    cp rar unrar $(PREFIX)/bin
>>    cp rarfiles.lst /etc
>>    cp default.sfx $(PREFIX)/lib
>>    
>>
>
>The above is a *make target*. You can invoke 'make' followed by the 
>name of any target that is defined in the Makefile, so in this case:
>
>  $ make install
>
>The simple command
>
>  $ make
>
>Invokes make with the default target. Now, I can't recall offhand how 
>the default target is specified, but if 'install' is the only one 
>defined, then I suppose it will be the default.
>
>  
>
>>In all honesty, I really don't know exactly what to do. Presently I have 
>>a folder in "/apps" (a directory I created) called "rar"
>>
>>So I guess it's in /apps/rar
>>    
>>
>
>And from the looks of things, you could just run the program directly 
>from there if /apps/rar were on your path ... but I bet it isn't. And 
>since it's your personal system, you can install things in whatever 
>weird directories you feel like. Me, I like to do things in at least 
>semi-standard fashion. What I would probably do in your shoes is:
>
> 1. Unpack the rar package in /var/tmp:
>     $ cd /var/tmp
>     $ tar zxvf rar.tar.gz    # or whatever its name is -- I trust  
>                                    # you get the idea
>     $ cd rar
> 2. Edit the Makefile, changing PREFIX to /opt/rar.
> 3. Become root
> 4. # mkdir /opt/rar
> 5. # make install
> 6. Exit from root shell
> 7. $ cd ..
> 8. $ rm -rf rar   # Everything's installed, don't need this  
>                        # temporary directory any more.
> 9. Symlink the executables to a standard executable directory 
>     $ ln -s /opt/rar/bin/rar /usr/local/bin/rar
>     $ ln -s /opt/rar/bin/unrar /usr/local/bin/unrar
>
>The reason I don't use the default prefix of /usr/local is that I 
>install a *lot* of third-party packages, and if their components are 
>all jumbled together in /usr/local/bin, /usr/local/lib, etc., it 
>becomes a nightmare to try to uninstall anything. By installing each 
>package in its own subdirectory under /opt, uninstallation becomes a 
>simple matter of blowing away the package directory. I use the 
>'symlinks' program periodically to clear away the dangling links that 
>are left behind.
>
>With that said, there are different schools of thought as to the best 
>way to handle third-party packages. Some people like to add a new 
>entry to their PATH for each new package; others just throw caution 
>to the winds and toss it all into /usr/local, hoping that that won't 
>create conflicts in the future. For what it's worth, I think my 
>method is quite similar to how Solaris normally installs optional 
>packages.
>
>  
>
>>[jl at user-10cm429 jl]$ cd /apps/rar
>>[jl at user-10cm429 rar]$ ls
>>default.sfx*  Makefile   rar_faq.txt   rar_static*  register.txt  unrar*
>>file_id.diz   order.txt  rarfiles.lst  rar.txt      rereg.txt     
>>whatsnew.txt
>>license.txt   rar*       rar_site.txt  readme.txt   technote.txt
>>    
>>
>
>Typical binary package. It's pretty clear there are no source code 
>files here, and the asterisked files are executables (though I'm not 
>sure default.sfx should be ... it's supposed to go in $PREFIX/lib).
>
>Hope this helps.
>
>--
>Matt Gushee
>Englewood, CO USA
>_______________________________________________
>CLUE-Tech mailing list
>CLUE-Tech at clue.denver.co.us
>http://clue.denver.co.us/mailman/listinfo/clue-tech
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue-tech/attachments/20030304/7348f6d2/attachment.html


More information about the clue-tech mailing list