LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-09-2004, 08:06 AM   #1
cpukiller
LQ Newbie
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware 10
Posts: 9

Rep: Reputation: 0
installing programs a clean way


hi,

i'm using Slackware 10. i would like to know if there's a way to install programs from sources as packages.

It's something I hate in linux... when we install from sources, the files are copied at many places in the system. the problems come when we want to uninstall them. i know that we can uninstall them if we keep the sources and use the command "make uninstall" but it's unsure since the source files must exactly the same(at least the names). also... i don't want to keep the sources of all the programs i use.

i wish that there's a way to do this. If not, i had an idea but i don't know if it can work...

I would like that the command 'make install' copies the files not in the root file system directly but in a subfolder... say /home/user/pkg-name. Then i could make a package in the slackware format: .tgz and install it, upgrade it and remove it cleanly. I don't know how to tell 'make' to install the files in a subfolder and not in the root file system.

if it works... i could just do a simple script to automate this and i think there would be no simplier and faster way to manage source packages correctly. If there's another way, i'll happy to read your suggestions
 
Old 08-09-2004, 08:33 AM   #2
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
When you are familiar with compiling from source you probably know, that there are ways to configure the source-code - mostly by running the configure-script.

You can give this script arguments that specify, for instance, where the compiled binaries and libraries are to be installed... running this script with this argument, shows them all:

./configure --help | less

There is of course still the issue to keep track of what got installed where and an easy way to remove things - in case you want to upgrade or just don't need some software anymore...

This is especially true for LFS - which has no kind of any package-management - because everything is made from source by yourself.

There are several ways to get a facility which enables you to keep track of things which got installed and also get you an easy way to uninstall things...

The one I'm using is installwatch - the adresses below may not work, because it has been some time, since I got it from one of them - check it out!

http://asic-linux.com.mx/~izto/check...tallwatch.html

http://proyectos.glo.org.mx/checkins...tallwatch.html
 
Old 08-09-2004, 01:08 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
There are two apps I know of which may give you what you want: stow and encap. When used as an aid to installing, they will each create a directory in /usr/local (either /usr/local/stow or /usr/local/encap). The apps will create a subfolder in their own folder, and symlink to the usual locations. Removal is as easy as encap -r <filename>. Encap also allows the upgrade of tarball installations, rather than parallel installation. It's also easy to write a simple bash script to include all the steps in the installation of a tarball, in order, with options, and have the encap utility epkg do the install for you.
For future reference, it you can't find the Slackware package you need, get a .rpm or a .deb and use Alien to convert to .tgz.
 
Old 08-09-2004, 01:43 PM   #4
m0rt3r
Member
 
Registered: Mar 2004
Distribution: slackware 10
Posts: 75

Rep: Reputation: 15
Hi,

There is a program called checkinstall which does what you want, it installs converts the source code of any program into either .rpm, .tgz or .deb packages. If you downloaded the third CD of slac 10, you can installed checkinstall from there, i think is in the /extra folder.
If you did not download the third CD, you can go to slackware.com and download the package from the /extra directory under slackware 10. Also in the slackware forum some time ago i read a post that say there was an issue if you installed the libsafe library. I think if you installed that library you were unable to use checkinstall, which by the way comes with watchinstall, anyway but you can edit a file so that you'll be able to use checkinstall. that is if you installed the safelib library. I suggest you do a search on the forum for the solution in case you installed the safelib library. If you did not installed the safelib library you'll be good.


Here's a link to the package:

checkinstalllink
 
Old 08-10-2004, 03:00 AM   #5
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
You can compile with --prefix=/opt/<prog_name>, and then either:
- add what is necessary to /etc/profile (PATH, LD_LIBRARY_PATH, C_INCLUDE_PATH), and /etc/ld.so.conf;
- or make the needed links from /opt/<prog_name>/* to /usr/local/*.

The latter is how I do it, with the help of a script I wrote, in the spirit of GoboLinux.

Yves.
 
Old 08-10-2004, 04:23 AM   #6
insyte
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 308

Rep: Reputation: 30
I agree with m0rt3r and would recommend checkinstall. This is the homepage where you can get the latest release.

This is very convenient because it will create the .tgz package for you.

It also has a frontend for gnome called gnome-pkgtool. You can get it here. Very useful program coz it can install .tgz packages or compile from source and install using checkinstall.
 
Old 08-10-2004, 02:37 PM   #7
cpukiller
LQ Newbie
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware 10
Posts: 9

Original Poster
Rep: Reputation: 0
thx everybody for your help!

i'll check it out as soon as i have some time. I think i'll go with checkinstall but i'll try the other solutions too.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Very limited space, how do I clean out all programs and clutter I dont need? Javahulk Linux - General 1 03-19-2005 10:30 PM
Installing a CLEAN Debian System questions terfy Debian 31 01-08-2005 03:16 PM
"Can't run C compiled programs" on clean RH9 install smirnoff Linux - Newbie 8 03-16-2004 03:11 PM
Programs won't run using clean Mandrake 9.2 insatll Boudewijn Linux - Software 1 11-21-2003 05:02 AM
Installing programs thegreenearth Linux - Newbie 1 11-09-2001 06:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration