LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 10-21-2012, 05:15 PM   #1
alagenchev
Member
 
Registered: Oct 2004
Location: USA
Distribution: Slackware, Debian, Ubuntu
Posts: 223

Rep: Reputation: 30
differences between makepkg and src2pkg


I haven't used slackware since 2005 and I've used only Debian and Linux Mint Debian since then.
I decided to get back into playing with slackware and found out that I can use a program called src2pkg for creating my own packages. Back in the days, I used to use checkinstall to install software.
What is the advantage of src2pkg over makepkg, apart from simplicity? I understand that checkinstall isn't recommended anymore. Is that true?

Why would I use src2pkg instead of makepkg?
 
Old 10-21-2012, 09:46 PM   #2
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,684

Rep: Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441
Code:
src2pkg /path/to/source-version.tgz
vs

Code:
tar xf source-version.tgz
cd source
./configure --prefix=/usr --docdir=/usr/doc --mandir=/usr/man
make
mkdir -p ~/source-root
make install DESTDIR=~/source-root
cd ~/source-root
su
/sbin/makepkg -l y -c n /tmp/source-version-arch.txz
Regarding Checkinstall, it lost all its users because it went for several years without a stable release that would work with the current Slackware version.

Last edited by dugan; 10-22-2012 at 09:05 AM.
 
2 members found this post helpful.
Old 10-22-2012, 09:49 AM   #3
alagenchev
Member
 
Registered: Oct 2004
Location: USA
Distribution: Slackware, Debian, Ubuntu
Posts: 223

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by dugan View Post
Code:
src2pkg /path/to/source-version.tgz
vs

Code:
tar xf source-version.tgz
cd source
./configure --prefix=/usr --docdir=/usr/doc --mandir=/usr/man
make
mkdir -p ~/source-root
make install DESTDIR=~/source-root
cd ~/source-root
su
/sbin/makepkg -l y -c n /tmp/source-version-arch.txz
Regarding Checkinstall, it lost all its users because it went for several years without a stable release that would work with the current Slackware version.
Thanks Dugan, how stable is src2pkg? Are there any pitfalls associated with it, or is it just as good as makepkg?
 
Old 10-22-2012, 10:33 AM   #4
nivieru
Member
 
Registered: Feb 2008
Posts: 48

Rep: Reputation: 7
To build packages from source you can also use slackbuild scripts from slackbuilds.org, either manually or with the excellent tool sbopkg (get it from sbopkg.org)
 
Old 10-22-2012, 11:44 AM   #5
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,684

Rep: Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441Reputation: 1441
If you can get a prebuilt package from Alien Bob, use that first.

If you can't, look for a build script from SlackBuilds.org. SBoPkg is a great frontend for that.

If that's not available, then try src2pkg. It works great 99% of the time.

If you do any of the above, you will benefit from the package building process, which includes running makepkg, having been done for you.

If you actually need to run makepkg yourself, then you might as well write a SlackBuild script and submit it to SBo.

Last edited by dugan; 10-22-2012 at 11:50 AM.
 
Old 10-22-2012, 03:19 PM   #6
alagenchev
Member
 
Registered: Oct 2004
Location: USA
Distribution: Slackware, Debian, Ubuntu
Posts: 223

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by dugan View Post
If you can get a prebuilt package from Alien Bob, use that first.

If you can't, look for a build script from SlackBuilds.org. SBoPkg is a great frontend for that.

If that's not available, then try src2pkg. It works great 99% of the time.

If you do any of the above, you will benefit from the package building process, which includes running makepkg, having been done for you.

If you actually need to run makepkg yourself, then you might as well write a SlackBuild script and submit it to SBo.

thanks, this makes sense.
 
Old 10-22-2012, 06:13 PM   #7
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1
Posts: 146

Rep: Reputation: 27
src2pkg comes with a program called trackinstall which essentially does what checkinstall used to do.
 
Old 10-23-2012, 11:56 AM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,755

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
Yes, gbowden, trackinstall does exactly that -except that it does not (really) install the package by default like checkinstall does.

makepkg is a very low-level tool which is meant to be used on already-collected and massaged package content. trackinstall (and checkinstall) are used with pre-configured, pre-built sources. src2pkg does the whole process from finding, unpacking, configuring, compiling and then massaging the content for package conformity. Unlike checkinstall, trackinstall also does the content massaging just like the full src2pkg command. src2pkg and trackinstall offer several methods of 'faking' the 'make install' command so that files don't usually actually get installed to your system.
 
2 members found this post helpful.
  


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
Arch equivalent for "Slacker" makepkg or src2pkg Alexvader Arch 2 02-27-2010 08:40 PM
[ANNOUNCE] src2pkg-2.0 and src2pkg-ng-0.0.1 gnashley Slackware 11 12-21-2009 11:41 AM
New src2pkg release available for download -Introducing the src2pkg WIKI gnashley Slackware 11 05-06-2008 11:09 AM
makepkg - 10.2 and/or 11.0 TL_CLD Slackware 2 10-10-2006 02:49 PM
anybody use makepkg? servnov Slackware 20 12-23-2005 03:27 PM


All times are GMT -5. The time now is 11:49 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration