LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-19-2006, 12:47 AM   #1
itzig
Member
 
Registered: Jan 2006
Location: bay area
Distribution: slackware, Ubunutu, OSX
Posts: 77

Rep: Reputation: 15
makepkg install- tgz in root?


When I make a package and install it as:

$ ./configure --prefix=/home/pkgmanager/builddir
$ make
$ make install
$ cd /home/pkgmanager/builddir
$ makepkg packagename.tgz
$ installpkg packagename.tgz

it cretes a copy of all packges (tgz's) in my root folder. How do I stop that? I am sure they are meant to go elsewhere..

thanks!
 
Old 03-19-2006, 05:51 AM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,648

Rep: Reputation: 148Reputation: 148
I'm not sure if I understand your problem completely (copy of all packages in root folder). But I noticed that you use another "configure" and "make install" approach than it is used in the official Slackware build scripts.
I thought until now that you have to give configure the prefix where the files should be installed with an unaltered "make install" (--prefix=/usr/bin) and not where they shall go temporarily for packageing. On the other hand the official build scripts use the DESTDIR option with "make install" (for example "make install DESTDIR=/home/pkgmanager/builddir") to solve this.

I hope this helps in any way.
 
Old 03-19-2006, 07:14 PM   #3
itzig
Member
 
Registered: Jan 2006
Location: bay area
Distribution: slackware, Ubunutu, OSX
Posts: 77

Original Poster
Rep: Reputation: 15
Thanks!!, Yes, that kinda helps. The method I used to create packages, is one of the options I read about. I am trying to figure out how to build proper packages, and I was looking for a simple way.

Let me see if I get this right:
you are suggesting I do a normal "./configure", then
make
make install DESTDIR=/home/pkgmanager/builddir
..and this will install the packages in the right place, and the build area, to make a tgz?
I guess I am confused about having to "install" twice. does "make install" actually install it, or does it just prepare the package so I can use "makepkg"?
After installing the tgz I made, can I remove the p. installed with make install? maybe that's the problem!?

Dankeschoen!
 
Old 03-20-2006, 02:43 AM   #4
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,648

Rep: Reputation: 148Reputation: 148
Yes, you can build many packages like that. But there are exceptions.

make install DESTDIR ... will not "install" in the special meaning that you can use the program after doing this. It is "blind" about where to install.
So the idea is, as I understood it, to create a clean place to build the package, let make install copy all files there (it will build folders like usr, etc, usr/share etc. as needed) and leave you the freedom to add additional stuff like a description or even a file to list dependencies. Then you call makepkg from within the "clean" folder and it creates the pkg and handles the files -- so the build package will have relative paths,for example usr/share instead of /usr/share. installpkg will then extract the files relative to the root folder / so that the files will actually be copied to /usr/share during the call of installpkg.

There are exceptions, like some programs that use qmake instead of ./configure or that just build one binary and may not have a rule to install it in the system. But most programs should be fine to compile the given way.
EDIT: To illustrate this: A few days ago I tried to compile tuxcards from source. But it resisted to take any prefix or DESTDIR. So the first step was to call qmake like this: "qmake INSTALL_ROOT=$PKG tuxcards.pro" where $PKG was a path like /tmp/pkg-tuxcards.

Last edited by titopoquito; 03-20-2006 at 02:46 AM.
 
Old 03-20-2006, 02:56 AM   #5
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,648

Rep: Reputation: 148Reputation: 148
I think you should maybe look at an original buildscript from Patrick Volkerding. On the third and fourth CD there are the scripts, or get it from a Slackware mirror site.
Another good source of information might be this thread (http://www.linuxquestions.org/questi....php?t=365655).

If you look through the scripts you will see that there is not much "magic" but the process of building a package is rather straight forward. They include some extras like correcting wrong permissions, gzipping uncompressed manpages, add some docs like the ChangeLog and the License ...
 
Old 03-22-2006, 03:12 PM   #6
itzig
Member
 
Registered: Jan 2006
Location: bay area
Distribution: slackware, Ubunutu, OSX
Posts: 77

Original Poster
Rep: Reputation: 15
hey thanks! that helps a great Deal. That clears up any questions I had left!

`grazias
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Install tgz packages shadkong Slackware 22 10-26-2005 01:07 AM
How do I install .tgz files! cddesjar Linux - Software 4 07-01-2004 02:21 PM
How can I install my .tgz package under a directory besides root? bankfishin Slackware 1 05-22-2004 05:31 PM
how to install .tgz files? bw8 Linux - Newbie 10 08-21-2003 03:03 PM
X Sever crash after xset.tgz & vg16.tgz install lachlan Slackware 0 08-13-2003 02:48 AM

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

All times are GMT -5. The time now is 12:18 PM.

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