-   Slackware (
-   -   Tool to create package from scratch (

FeyFre 12-12-2012 04:36 AM

Tool to create package from scratch

Is there any tool I can build slackware package from scratch. I mean, I have very uncontrollable software which does not knows what is "make install DESTDIR=/sandbox" and so on.
So I need a tool which allows me to do like next:
1. tool 1st-scan /path/to/sandbox
2. build, install, configure software manually
3. tool 2nd-sacn /path/to/sandbox
4. tool make-diff /path/to/sandbox
and optionally
5. tool make-package /path/to/sandbox
(or I shall do it using makepkg manually).

Tried slacktrack... it is not what I need.

malekmustaq 12-12-2012 05:39 AM

Have you tried source 2 package? Here.

If you will find an .rpm package you can turn it into a slackware package with rpm2tgz.

Try also how to create your own slackbuild script if this will serve your purpose.

Hope that helps.

Good luck.

kikinovak 12-12-2012 10:12 AM


Originally Posted by FeyFre (Post 4847599)

Is there any tool I can build slackware package from scratch.

I'm using Vim. Works great.


FeyFre 12-12-2012 10:15 AM

src2pkg... I knew I forgot something, thanks.
rpm2tgz - no, it is not rpm. And in some cases, there is no sources at all(software already built and installed)
I cannot automate most of tasks, they have to be done manually, because of non-trivial interaction.

FeyFre 12-12-2012 10:19 AM

@kikinovak, I have already answered: most of actions cannot be automated.

dugan 12-12-2012 11:24 AM

Write your own SlackBuild.

gnashley 12-13-2012 02:12 AM

src2pkg provides four ways to isolate the installation when DESTDIR is not supported. They can be accessed using the options: -JAIL, -UNION, -REAL or -SAFE. The last two actually install the software to the final location, but 'track' the operations and then copy the resulting files into the package tree. The first two attempt to install the files into a sort of sandbox. The fifth method which src2pkg can use(the default method) is DESTDIR.

For things that are already installed, you can simply use makepkg after reconstructing the package content in your temp dir(sandbox). You can also script these builds using a SlackBuild which, in turn, calls makepkg. You can also create a *.src2pkg build script to do this, or to assemble packages from any unusual content -like loose files, etc.

src2pkg has the advantage of doing rigurous checks of the content for common errors. Using either a SlackBuild or src2pkg build script ensures the repeatability and documentation of the process.

NonNonBa 12-13-2012 12:52 PM

Well, if I correctly understand what you are looking for, maybe you can build a solution around timestamps.


touch .timestamp
... build your software and install files in /path/to/sandbox ...
find /path/to/sandbox -newer .timestamp # show the files you've installed
cd /path/to/sandbox
find * -newer .timestamp | cpio -dmp /path/to/pkgdir # copy them in a temporary root.
cd /path/to/pkgdir
makepkg [options] .

Would something like that float your boat?

Martinus2u 12-13-2012 01:53 PM


Originally Posted by kikinovak (Post 4847795)
I'm using Vim. Works great.

lol i was gonna say the same. Although lately i'm getting mellow and use mousepad.

FeyFre 12-13-2012 01:58 PM

@NonNonBa, yes, something like that, but with option to exclude well know volatile zones(/tmp, /var/log, /dev, etc).

NonNonBa 12-13-2012 04:01 PM

You can add some "! -path xxx" option to the find listing the stuff to copy, or insert a "sed /^\(path1\|path2\|...\)$/d" between the find and cpio.

BTW, can you give an example of the unautomaticable software builds you have?

All times are GMT -5. The time now is 04:27 PM.