LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   differences between makepkg and src2pkg (http://www.linuxquestions.org/questions/slackware-14/differences-between-makepkg-and-src2pkg-4175433395/)

alagenchev 10-21-2012 05:15 PM

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?

dugan 10-21-2012 09:46 PM

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.

alagenchev 10-22-2012 09:49 AM

Quote:

Originally Posted by dugan (Post 4811772)
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?

nivieru 10-22-2012 10:33 AM

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)

dugan 10-22-2012 11:44 AM

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.

alagenchev 10-22-2012 03:19 PM

Quote:

Originally Posted by dugan (Post 4812302)
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.

gbowden 10-22-2012 06:13 PM

src2pkg comes with a program called trackinstall which essentially does what checkinstall used to do.

gnashley 10-23-2012 11:56 AM

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.


All times are GMT -5. The time now is 10:48 AM.