LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-17-2018, 03:27 AM   #1
globetrotterdk
Member
 
Registered: Nov 2006
Posts: 153

Rep: Reputation: 7
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.
 
Old 04-17-2018, 04:36 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,198

Rep: Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977
Quote:
Originally Posted by globetrotterdk View Post
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?
You need to look at everything and ask yourself for each item these questions:
  1. Do i need this in the package?
  2. 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.
 
2 members found this post helpful.
Old 04-17-2018, 04:52 AM   #3
globetrotterdk
Member
 
Registered: Nov 2006
Posts: 153

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by Didier Spaier View Post
You need to look at everything and ask yourself for each item these questions:
  1. Do i need this in the package?
  2. 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 View Post
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
 
Old 04-17-2018, 04:57 AM   #4
Skaendo
Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 613

Rep: Reputation: Disabled
Quote:
Originally Posted by globetrotterdk View Post
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.

EDIT:
Actually, here you go:
https://github.com/Skaendo/slackbuil...ter/Simplenote

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.

Last edited by Skaendo; 04-17-2018 at 06:10 AM.
 
1 members found this post helpful.
Old 04-17-2018, 06:29 AM   #5
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,204
Blog Entries: 4

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Protip: these Electron packages are truly *awful*. Just look at the ocean of bloat inside that thing.
 
1 members found this post helpful.
Old 04-17-2018, 06:31 AM   #6
Skaendo
Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 613

Rep: Reputation: Disabled
Quote:
Originally Posted by 55020 View Post
Protip: these Electron packages are truly *awful*. Just look at the ocean of bloat inside that thing.
Sorry I had to remove and resubmit the SlackBuild. I forgot to add the doinst.sh to the SlackBuild.
 
Old 04-17-2018, 06:39 AM   #7
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,204
Blog Entries: 4

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Ssssh!!! that's our secret
 
1 members found this post helpful.
Old 04-17-2018, 01:02 PM   #8
globetrotterdk
Member
 
Registered: Nov 2006
Posts: 153

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by 55020 View Post
Protip: these Electron packages are truly *awful*. Just look at the ocean of bloat inside that thing.
I know! It is really disappointing that the developers have apparently shifted to Electron.
 
Old 04-17-2018, 01:10 PM   #9
globetrotterdk
Member
 
Registered: Nov 2006
Posts: 153

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by Skaendo View Post
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.
 
Old 04-17-2018, 03:51 PM   #10
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: Newport News, VA
Distribution: Slackware
Posts: 5,046

Rep: Reputation: 2855Reputation: 2855Reputation: 2855Reputation: 2855Reputation: 2855Reputation: 2855Reputation: 2855Reputation: 2855Reputation: 2855Reputation: 2855Reputation: 2855
Quote:
Originally Posted by globetrotterdk View Post
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
 
2 members found this post helpful.
Old 04-17-2018, 06:14 PM   #11
Skaendo
Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 613

Rep: Reputation: Disabled
Quote:
Originally Posted by globetrotterdk View Post
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.

Last edited by Skaendo; 04-17-2018 at 06:30 PM.
 
1 members found this post helpful.
  


Reply

Tags
deb package, makepkg, slackware64


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me!! I can't install .deb package in my debian asoko2 Linux - Newbie 8 11-28-2015 05:10 AM
[SOLVED] install .deb package shakira19 Linux - Newbie 11 12-20-2012 04:32 PM
[SOLVED] How best to install deb package jkirchner Slackware 5 10-21-2012 12:38 PM
skype or similar package for Deb 4.0 Greebstreebling Debian 3 02-23-2008 08:46 AM
How to install deb package tstrickland Linux - Newbie 10 07-21-2005 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration