Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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!
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.