SlackwareThis Forum is for the discussion of Slackware Linux.
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.
just curious on the best way to build my own packages. ive read the tutorial on linuxpackages and its seems simple enough, but what are the pros and cons of using either makepkg or checkinstall?
i swear by checkinstall. lets me compile source packages for my machine, but keep track of them easily since checkinstall puts an entry in /var/log/packages. honestly, it's brilliant.
i've never used makepkg so i can't compare them. this is what i do to install a tar.gz
tar -xvzf package.tar.gz
./configure --prefix=/path/to/install
make
su
checkinstall
and it's done. the program is installed, i can see it listed with pkgtool or slackpkg search, or in /var/log/packages. i can uninstall it just like any other slack pack. and there's a .tgz in the build directory if i should want it for the future.
checkinstall is a combination of 'packages made easy' and 'what if it doesn't respect DESTDIR'
'makepkg' is still considered the proper way to build a package, as checkinstall doesn't always catch every file being installed. On the flip side, makepkg et al can be a bit OTT sometimes if it's for personal consumption and you just want a quick and dirty way to get rid of a piece of software in future. Also, some make install's don't respect DESTDIR, so checkinstall is very useful in those cases.
checkinstall is a great tool, but it was designed to keep track of
software that is compiled from source, not for package distrobution.
checkinstall will allow you to see all of your locally compiled software
through pkgtool, which as said before puts a file in /var/log/packages.
okay, i get it now... thanks for the explanations guys...
yeah, i've run into the DESTDIR issue a couple times in the past... i think what i did was use something called installwatch to tell me where everything went and then i manually moved everything into the package directory and undid anything that was done to the system... yeah, it's kinda sick... hehe...
but i'm the type of slackware user that only installs packages... and all non-patrick packages on my box are built by me personally... i script the download, configuration, compile, and packaging - and i make sure i explodepkg the package and go through it with a fine-tooth comb before i do the installpkg...
what i think would be great (for situations where DESTDIR doesn't work) is something that would go one step further than installwatch but not as far as checkinstall... something that would intercept the files, so that they land in the package directory right away without ever having had to hit the system's... that way i could continue using my home-made build scripts without having to manually do stuff when something isn't DESTDIR-compatible...
it's been a long time since i had to do that manual thing with installwatch, i can't even remember exactly what software i had to use it for... everything i've packaged since then has worked either with DESTDIR or some --installprefix configure option or something...
makepkg is the "official" method and is not that hard.
When DESTDIR doesn't work you have good chance trying a "make prefix=/path/to/temp/dir install".
If the sources produce just a binary file and a couple of libraries is not that hard to create manually the required directories and copy there the necessary files (/usr/, usr/bin & /usr/lib), just take care of files permissions.
Another possibility is you edit the Makefile. A little experience at shell scripting is usually enough.
Linuxpackages web site offers good documentations and howto's.
Hope this helps
Ciao
Checkinstall uses (and installs) the installwatch library. it's very handy, but unless you make a valid slack-desc file it will be uninstallable with pkgtool/removepkg.
checkinstall can intercept other commands as well.
I usally build packages manually, following the Makfile.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.