LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Creating a txz install package from source (http://www.linuxquestions.org/questions/slackware-14/creating-a-txz-install-package-from-source-4175431543/)

mitusf 10-10-2012 03:47 PM

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.

kikinovak 10-10-2012 04:09 PM

You might begin here:

http://www.slackwiki.com/Writing_A_SlackBuild_Script

Old, but still OK as an introduction.

D1ver 10-10-2012 05:05 PM

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.

zhtengw 10-10-2012 08:46 PM

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.

samac 10-11-2012 02:45 AM

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

BroX 10-11-2012 03:16 AM

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.

Alien Bob 10-11-2012 03:58 AM

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

mitusf 10-11-2012 05:19 AM

Thanks for your answers.


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