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.
I have make a SlackBuild for nixnote (formerly nevernote) and it's available on SlackHacks. I have also submitted to SBo, but it would take some time before it gets approved by the admins
@willysr: Why use three mkdir commands, followed by three move commands to shift over the files to another directory? You currently have the following:
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 07: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).
the *.sh is not that harmless, so i will leave it as it is
as for the selection of source, i would rather use the tarballs instead of RPM or DEB format
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 06:20 AM.
Reason: Simplified my example shell script a little
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.