SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Then run your chown and chmod commands on $PKG itself.
However I would actually give the tar a miss and start with the rpm package, given you are not compiling anything. The advantage of this is that the rpm (and deb) packages include some docs and a man page. The tar does not have these, it just has an empty man directory in the wrong (for Slackware) location. Additionally you do not need to strip or exclude anything. Rather than use rpm2cpio + cpio (as is traditional with rpms), just use bsdtar to do the extraction in one pass, like so:
Optionally you might want to replace the stupid usr/bin/nixnote shell script with a simple symlink to usr/share/nixnote/nixnote.sh. Personally I would also skip setting things like SLKCFLAGS and LIBDIRSUFFIX since you don't need them (because you never compile and the lib directory is not used). All they currently do is make the SlackBuild harder to follow for inexperienced users, who might try to work out why these are set and how they are used.
Last edited by ruario; 06-15-2013 at 08:35 AM.
Reason: Added example of deb extraction; removed [un]install scripts from tra extraction; further clarification on mv commands
Cool, I still think you should use the rpm or deb but hey you are the one offering to maintain it so its your call.
P.S. You could always extract the man page from the rpm or deb and have it as an extra file alongside the SlackBuild from where it could be installed. It will probably be OK since these things don't change so often (and this one wasn't even written by the original authors of the software anyway). Again, it is your call though.
P.P.S. You might also want to kill ./usr/share/nixnote/install.sh and ./usr/share/nixnote/uninstall.sh (as I did with my tar --exclude above).
I don't think I will ever understand why people are reluctant to use an rpm in cases like this. It would make perfect sense to me if the tar was actual source code and the rpm a recompiled binary but that is not the case here. They have exactly the same contents but for a few extra (useful) files in the rpm (i.e. a man page and some docs).
For me what you state is the same as saying "I would rather use tarballs instead of cpio archives as a source", because that is exactly what an rpm is, a compressed cpio archive with a tiny bit of meta information tacked on the front. Those few extra bytes can easily be ignored on any non-rpm distro, where you can consider it just another archive format rather than a package.
Besides the wealth of dedicated, pre-installed tools that can pull apart an rpm provided by Slackware (bsdtar, bsdcio, rpm2cpio, etc.) it is even possible to strip the rpm header off the front of the archive with little more than grep and tail, e.g. the following shell script would do the job for pretty much every rpm you are ever likely to care about:
(Yes, the above would fail for an LZMA compressed rpm archives, but these days those are rarer than hens teeth!)
As for using deb packages, everything useful is actually within a tar archive (data.tar.*), with an ar archive wrapped around it (plus a couple of meta files), so here it is the same as saying, "I would rather use tarballs instead of tarballs!"
Last edited by ruario; 06-16-2013 at 07:20 AM.
Reason: Simplified my example shell script a little