[SOLVED] Simplenote or similar .deb package install Slackware64 14.2?
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.
Simplenote or similar .deb package install Slackware64 14.2?
I have studied the threads that I have been able to find on using .deb files in Slackware, and bassmadrigal seems to have the best KISS method for extracting the contents of a .deb file:
Code:
ar p package-name-0.1.2.deb data.tar.xz | unxz | tar -xv
When I run:
Code:
ar p Simplenote-linux-1.1.3.deb data.tar.xz | unxz | tar -xv
I get two directories ("opt" and "usr") with the contents of the .deb file. How do you tell if everything needed to create a Slackware package is in the correct place? Specifically, what do you need to look out for?
I have found this command:
Code:
makepkg -l y -c n ../app-version-arch-tag.tgz
in the Slackware Docs
According to the manpage, the "-l" option seems safe:
Quote:
If y, add any symbolic links found to the install script (doinst.sh) and delete them.
as does the "-c" option, but what is the alternative to default permission and ownership for a Slackware package? Here, I am particularly wondering if the complexity of the program has an effect or simply the number of directories generated by "ar". I could imagine that a more complex program such as a DAW would need to be treated with more care...
Any advice on creating a Simplenote (or similar) Slackware package?
Last edited by globetrotterdk; 04-17-2018 at 04:14 AM.
ar p Simplenote-linux-1.1.3.deb data.tar.xz | unxz | tar -xv
I get two directories ("opt" and "usr") with the contents of the .deb file. How do you tell if everything needed to create a Slackware package is in the correct place? Specifically, what do you need to look out for?
You need to look at everything and ask yourself for each item these questions:
Do i need this in the package?
Where should it be installed in Slackware?
This being said there is also a tar binary package available and personally, I would certainly stay away from an app the needs a web account to be used, not knowing who stores the notes and where.
You need to look at everything and ask yourself for each item these questions:
Do i need this in the package?
Where should it be installed in Slackware?
Thanks for the reply. These questions are a bit difficult to answer as I am relatively new to Slackware and have never tried this before.
Quote:
Originally Posted by Didier Spaier
This being said there is also a tar binary package available and personally, I would certainly stay away from an app the needs a web account to be used, not knowing who stores the notes and where.
So in this instance, I should use src2pkg with the tar binary package? I have used Simplenote for some years, mainly to save notes that I have written about songs that I practice playing by ear in my rehearsal room, so I am not really worried about giving info away. I always have it with me on my phone and I can edit at home or on the road without much effort. It is also a way to avoid Google Keep
So in this instance, I should use src2pkg with the tar binary package? I have used Simplenote for some years, mainly to save notes that I have written about songs that I practice playing by ear in my rehearsal room, so I am not really worried about giving info away. I always have it with me on my phone and I can edit at home or on the road without much effort. It is also a way to avoid Google Keep
The package that Didier linked to is a binary package, in theory you should be able to extract it and run it. If you wanted to get fancy and make a SlackBuild for it you would need to figure out where you want to install it (probably /opt) make a .desktop, link icons, link the binary and so on. If you want a SlackBuild I could make one and put it in my GitHub repo, but I probably wouldn't test the program itself or maintain it.
I've also submitted it to SBo so it should be there by this weekend. But I don't plan on keeping up with it too often. If you see that there is a update let me know and I'll update it.
Or you can take it over, it shouldn't need more than a version bump when it gets updated.
Sorry I had to remove and resubmit the SlackBuild. I forgot to add the doinst.sh to the SlackBuild.
I need to ask - how did you learn to write SlackBuild scripts? I have looked at a couple of beginner howtos, but your script is over my head. I went through it and found a lot of stuff at the beginning that I assume is for Github and SlackBuilds.org verification (and of course this is unfortunately an Electron program), but there still seems to be way more links, HTML, metadata and such than I would expect in a SlackBuild script.
I need to ask - how did you learn to write SlackBuild scripts? I have looked at a couple of beginner howtos, but your script is over my head. I went through it and found a lot of stuff at the beginning that I assume is for Github and SlackBuilds.org verification (and of course this is unfortunately an Electron program), but there still seems to be way more links, HTML, metadata and such than I would expect in a SlackBuild script.
The SlackBuild itself is relatively straightforward and mostly well commented (beyond the normal commands that exist in most SlackBuilds like setting the variables, extracting the source, and ensuring proper permissions are there).
The .info file is used by SBo (SlackBuilds.org) to provide all the information on the program, the homepage, the download location, the md5sum to ensure the download isn't corrupted, and the maintainer's information. It can also include dependencies if the program requires them. These are used to display the information you see on a program's page on SBo (in addition to the README).
The slack-desc is a file used by Slackware's package manager to display the information on the package. You can view this information in pkgtool.
The doinst.sh is an optional post-install script that can do things like update menus/icons, copy new configs into place, and create any symlinks that might be needed.
Finally, he also included a .desktop file, which will allow this program to be accessed within "start" menus of various Window Managers/Desktop Environments like KDE or XFCE. Many programs will include this automatically and won't need to be generated by the maintainer.
If you have any specific questions on what code or files do, feel free to ask and one of us would be happy to answer
I need to ask - how did you learn to write SlackBuild scripts? I have looked at a couple of beginner howtos, but your script is over my head. I went through it and found a lot of stuff at the beginning that I assume is for Github and SlackBuilds.org verification (and of course this is unfortunately an Electron program), but there still seems to be way more links, HTML, metadata and such than I would expect in a SlackBuild script.
For me it took a little bit of studying a SlackBuild someone else made, opening up the source/binary archive, comparing them, seeing what was going on and it just made sense to me. The first one that I made was a simple binary repackage (like this Simplenote one) where all I had to do was extract the archive and put everything in the right place, then I moved on to a source build.
This is really the only part of the SlackBuild that I had to write:
Code:
# Install into /opt
mkdir -p $PKG/opt/Simplenote
cp -vr * $PKG/opt/Simplenote
# Link the Binary
mkdir -p $PKG/usr/bin
ln -s /opt/Simplenote/Simplenote $PKG/usr/bin/Simplenote
# Link the Icon
mkdir -p $PKG/usr/share/icons/hicolor/256x256/apps
ln -s /opt/Simplenote/Simplenote.png \
$PKG/usr/share/icons/hicolor/256x256/apps/Simplenote.png
# Install the .desktop file
mkdir -p $PKG/usr/share/applications
cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications
and i "borrowed" the .desktop file from the Debian package.
After some time and figuring out how to find the options that you can use (like './configure -h' for a autotools build) it became relatively easy. (I'm no pro and the guys over at SBo still have to touch up any new ones that I submit)
I also use a handy little tool called mkslack by David Woodfall that you run against the source archive and it figures out what kind of build job it is and makes the necessary files (.SlackBuild, .info, slack-desc, etc) then you only need to fill in the blanks of what cannot be done automagically.
You are not going to get the first one perfect the first time, at least I didn't, and some are more difficult than others. A little bit of bash scripting knowledge goes a long way with making SlackBuilds.
bassmadrigal has laid out a very good overview of the files.
You can also look at the templates they have over at SBo to get a feel of what is a pretty standard SlackBuild, and they are well commented: https://slackbuilds.org/templates/
I would suggest saving one and opening it in a text editor so that you get the syntax highlighting.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.