LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 07-15-2012, 11:13 PM   #1
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 201Reputation: 201Reputation: 201
Creating a Slackware package.


As I understand them, the basic point of packages is so that they can be easily upgraded or removed. I have a directory that has precompiled files in the subdirectories /etc and /usr. Copying the corresponding files into /usr and /etc on my machine yield a working program. Is there an easy way to create a package so that rather than manually copying them I can just use installpkg and then later either upgrade them or remove them with removepkg or upgradepkg? I know there are programs and scripts to help create packages, but I've never used any of them.
 
Old 07-15-2012, 11:17 PM   #2
astrogeek
Senior Member
 
Registered: Oct 2008
Distribution: Slackware [64]X{.0|.1|.2|-current} ::X>=12<=14, FreeBSD_10{.0|.1}
Posts: 2,188

Rep: Reputation: 862Reputation: 862Reputation: 862Reputation: 862Reputation: 862Reputation: 862Reputation: 862
When I need to do things like that, and there is no SBo script for it, I create an SBo type script based on the template or a package with a similar build environment (i.e., GNU automake, etc.).

What program is it?

Last edited by astrogeek; 07-15-2012 at 11:19 PM.
 
Old 07-15-2012, 11:25 PM   #3
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,298

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
If you have a proper directory tree just add an install directory with slack-desc and (if required) doinst.sh files, cd to the directory tree and run
Code:
makepkg -l y -c n ../packagename.txz
as root. You should make sure the permissions on the directory tree are correct (since they will overwrite the permissions on the real /) -- root:root and usually 755 for directories and 644 for files. Technically you can pass '-c y' to makepkg instead of '-c n' which will reset all permissions of the package, but this is really done best beforehand so you can verify that all permissions are correct (especially if some directories/files have weird permissions intentionally). See `man makepkg`. I think you can technically get away with not having a slack-desc file but it makes the log messy so I would advise against it.

[edit] By proper directory tree, I mean in /path/to/tree there are for example etc/ and usr/ directories with the desired files. [/edit]
[edit2] Heh, I forgot the package name -- the most important part. Added. [/edit2]

Last edited by T3slider; 07-15-2012 at 11:29 PM.
 
1 members found this post helpful.
Old 07-15-2012, 11:27 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4096Reputation: 4096Reputation: 4096Reputation: 4096Reputation: 4096Reputation: 4096Reputation: 4096Reputation: 4096Reputation: 4096Reputation: 4096Reputation: 4096
If you have the files already in the right tree-structure (which seems to be the case for you), just cd into that directory and launch the command
Code:
makepkg ../programname-version.txz
 
1 members found this post helpful.
Old 07-15-2012, 11:30 PM   #5
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 527
Blog Entries: 3

Rep: Reputation: 126Reputation: 126
I believe makepkg is the command you're looking for. I've had success making some homebrew slack packages in the past.

Something along the lines of
Code:
make 
mkdir pkg
make DESTDIR=pkg install
cd pkg
makepkg packagename.tgz
installpkg packagename.tgz
edit: darn, third.
 
1 members found this post helpful.
Old 07-15-2012, 11:54 PM   #6
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Original Poster
Rep: Reputation: 201Reputation: 201Reputation: 201
Wow yall were fast on that! I used makepkg and it seemed to work. The program is minidlna and it has a slackbuild, but it refuses to build with the newest ffmpeg package from Eric. What I found is they have a static tarball that is ready to go that works without building or regard to the other packages. It seems to have worked. It's running and the .conf file wound up in /etc just the way I should have! Thanks!

Edit: Worked great! I'm super happy with the way that worked! Thanks again!

Last edited by damgar; 07-16-2012 at 12:22 AM.
 
Old 07-16-2012, 12:30 AM   #7
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,960

Rep: Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977
Quote:
Originally Posted by damgar View Post
What I found is they have a static tarball that is ready to go that works without building or regard to the other packages.
You can even write a proper SlackBuild script for your static tarball. If you don't know exactly how to go about that, you can take a peek at the various SlackBuild scripts for icon themes, for example, where content is just uncompressed and repacked.
 
Old 07-16-2012, 12:37 AM   #8
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Original Poster
Rep: Reputation: 201Reputation: 201Reputation: 201
Quote:
Originally Posted by kikinovak View Post
You can even write a proper SlackBuild script for your static tarball. If you don't know exactly how to go about that, you can take a peek at the various SlackBuild scripts for icon themes, for example, where content is just uncompressed and repacked.
That sounds like something worth checking into!
 
Old 07-16-2012, 02:48 AM   #9
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,960

Rep: Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977
Just send me the link to your application tarball, and I'll write the SlackBuild script for you, if it helps.
 
  


Reply


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
What are the steps to build and install a Slackware package from a RPM package? sudeepkulkarni Slackware 6 04-25-2011 01:51 PM
Creating a php package for Slackware 13.1 Ramurd Slackware 4 10-13-2010 07:51 PM
creating rpm package javimd786 Linux - Newbie 1 01-05-2010 02:02 PM
LXer: Pretending a Package is Installed by Creating an Empty Package with Checkinstal LXer Syndicated Linux News 0 05-03-2009 04:10 PM
Creating a package repository Thakowbbery Suse/Novell 0 10-13-2005 09:40 AM


All times are GMT -5. The time now is 04:35 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration