LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 10-10-2012, 03:47 PM   #1
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 147

Rep: Reputation: 2
Creating a txz install package from source


Hello,

I have a question which intrigues me for some time: what is the simplest/easiest method to obtain a .txz package for Slackware, if i have the source for some program? I know it is not quite simple, it might have to do with getting the right SB script for it, i guess, but i am curious, i want to learn, i know some bash scripting, but i have a lot to learn to be very proficient with these.

Thanks a lot.
 
Old 10-10-2012, 04:09 PM   #2
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
You might begin here:

http://www.slackwiki.com/Writing_A_SlackBuild_Script

Old, but still OK as an introduction.
 
1 members found this post helpful.
Old 10-10-2012, 05:05 PM   #3
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 598
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Check out src2pkg. It's a handy little tool that will attempt to build a Slackware package from a source archive. I believe it can also handle .deb/.rpm packages and repack them into slackware compatible packages.

It doesn't always work, but when it does, it's awesome.
 
2 members found this post helpful.
Old 10-10-2012, 08:46 PM   #4
zhtengw
LQ Newbie
 
Registered: Jul 2012
Location: Meizhou, China
Distribution: Slackware
Posts: 9

Rep: Reputation: Disabled
You can download some slackbuilds from SlackBuilds.org or Alien's Slackbuilds as templates, then just write you first slackbuild by youself. I will quickly be familiar to do this work.
 
1 members found this post helpful.
Old 10-11-2012, 02:45 AM   #5
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
Pkgtool has all the tools necessary. look up man makepkg. Once you know how to do it from scratch then it is easy to write a slackbuild script.

samac
 
2 members found this post helpful.
Old 10-11-2012, 03:16 AM   #6
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
As said, do it from scratch before creating slackbuild scripts. It as easy as:

After the usual ./configure and make bit, create a temporary build directory

Code:
$ mkdir /tmp/package-build
As root, make install with that build directory as destination

Code:
# DESTDIR=/tmp/package-build make install
And create a slackware package

Code:
# cd /tmp/package-build
# makepkg /tmp/package-version.txz
Of course adjust directory and file names to your liking.
 
1 members found this post helpful.
Old 10-11-2012, 03:58 AM   #7
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
You can play with http://slackware.com/~alien/AST which is an interactive tool to generate a SlackBuild script plus the accompanying slack-desc file, based on the input you supply.

Eric
 
2 members found this post helpful.
Old 10-11-2012, 05:19 AM   #8
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 147

Original Poster
Rep: Reputation: 2
Thanks for your answers.
 
  


Reply



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
How to configure a source package before creating an rpm breds Linux - Software 3 06-28-2012 01:44 PM
Which package manager do you like more, TXZ or Pacman? Amdx2_x64 Linux - Distributions 9 12-25-2010 01:41 AM
[SOLVED] Is there any openoffice-org.txz prebuilt package? cola Slackware 4 12-26-2009 06:24 AM
how to make slackware package txz hoanglong1712 Slackware 4 09-20-2009 08:19 AM
creating deb package from kernel source fakie_flip Linux - Kernel 2 12-31-2007 03:31 AM

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

All times are GMT -5. The time now is 08:00 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
Open Source Consulting | Domain Registration