LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-08-2009, 08:05 PM   #1
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Rep: Reputation: 38
Building packages


Where is the right place to install packages I build: in /usr or /usr/local. what is the purpose of /ust/local?

A couple examples of packages I want to build are:
A driver for a modem.
A program I want to use to send faxes from:
http://www.tpc.int/

When I install the package with destdir variable should I run this as
root or a normal user:
I'm thinking or permissions and ownership of files, and also if destdir
doesn't work properly the program might get partially installed (or is
this not a concern)?


Thanks
 
Old 06-08-2009, 08:27 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Packages are installed to /usr, never /usr/local (even though many makefiles default to /usr/local).

It sounds like you are trying to do this manually, which is more effort than is necessary. If you are going to be building Slackware packages, you should look into SlackBuilds. Even if the SB repository doesn't have a build script for the programs you want, you can use their templates and documentation to write your own build script which will put out the perfect package every time.
 
Old 06-08-2009, 08:48 PM   #3
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
The Slackware way is to install to /usr. You may have a reason to install it to a different destdir, and that is just fine also. Its your system, so do what is best for you.

All installs are done as root, unless this is something you are installing in your /home/yourname directory. If you choose a different destdir, you need to make sure that users are in the path of the executable, or add the path to the users that need access.

There are times when I don't exactly follow the Slackware convention. I use /opt for some software, especially some games and things I may get tired of. I can get rid of them easier this way.

That said, I just respectfully disagree with MS3FGX. But I do agree with using SlackBuilds, even if I do modify them beyond recognition sometimes.
 
Old 06-09-2009, 12:37 PM   #4
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
I meant using the DESTDIR variable to install into a temporary directory
so I could make a Slackware package before installing.
eg. make DESTDIR=/tmp/slackpack/example-0.1-beta install

I read somewhere if a person uses this as root and DESTDIR doesn't work
properly some of the files from the program could be installed in /.
I like to build as a user then install as root.

When I run makepkg should I change ownership and permissions of
all directories to root:root and 0755

Thanks for help
 
Old 06-09-2009, 02:24 PM   #5
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
Actually, I just did this with k9copy. I created a directory in /home/michael named slackpkg. I used this as the install directory for k9copy. It created the directory tree inside of slackpkg and then I ran makepkg from inside of /slackpkg.

Code:
makepkg -l y -c y -p /tmp/k9copy-2.3.2-mfl.tgz
I did the compile as a normal user, which is why the -c y is in there.
 
Old 06-11-2009, 05:01 PM   #6
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
compiling as a normal user.

I comfigured FaxMail:
Code:
./configure --prefix=/usr --sysconfig=/etc --localstate=/var
then
Code:
make
then make install
There was no DESTDIR so I used prefix

Code:
bash-3.1$ make prefix=/home/joe/slackpkg/faxmail-package/usr/ install
checking wish interpreter...
checking mailer exists...
checking temp directory...
mkdir -p /usr/lib/FaxMail
mkdir: cannot create directory `/usr/lib/FaxMail': Permission denied
make: *** [install] Error 1

why is this not making a directory in faxmail-package?
Is it trying to make this directory in the root directory?
I want to install this into a temporary directory first then
make a package with makepkg.

Thanks

Last edited by JosephS; 06-14-2009 at 05:45 PM.
 
  


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
Looking for a distro with good support for building packages teddyt Linux - Distributions 2 02-19-2008 12:32 PM
Need information on re-building packages from source PeteRossi Slackware - Installation 1 05-22-2007 06:16 PM
Building Slackware packages web_spy_der Slackware - Installation 3 09-07-2006 09:10 AM
properly building slackware packages blazemonger Slackware 1 05-11-2006 08:44 AM
Building your own slackware packages CrEsPo Slackware 19 06-07-2005 10:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:49 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