LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   make your own slackware packages! (https://www.linuxquestions.org/questions/slackware-14/make-your-own-slackware-packages-47101/)

michaelslack 04-21-2013 07:27 PM

Quote:

Originally Posted by psionl0 (Post 4934552)
Not every Makefile honours the DESTDIR option...what to do if DESTDIR is not honoured.

In a lot of cases, src2pkg will do all the work of creating a package for you.

Ha! Nothing like a blast from the past.

I couldn't help but adding my two cents' worth here, it might be useful for others. Don't forget slacktrack, which is another utility for making a slackware package when DESTDIR doesn't work. I used it recently to make a package out of the texworks editor (just to try it out). The usual method (essentially that of the OP!) didn't work because DESTDIR was not honoured.

I was able to make a package (lazily) by doing the following:
  • obtaining the texworks source tarball: texworks-0.4.5-r1281.tar.gz
  • in the same directory as the tarball, I created a basic little build script tw.build:

    Code:

    #!/usr/bin/bash

    tar xf texworks-0.4.5-r1281.tar.gz
    cd texworks-0.4.5
    qmake
    make
    make install

    which ordinarily would have compiled and installed texworks ``directly'' onto the system, i.e. bypassing slackware's package management tools.
  • from the same directory execute, as root (after logging in with su - to get the proper PATHS setup, etc):

    Code:

    slacktrack -p texworks-0.4.5-i686-1custom.tgz ./tw.build

...and a beautiful new home-made slackware package appears at /tmp/texworks-0.4.5-i686-1custom.tgz

Michael

PS I couldn't resist giving slacktrack a plug here, given the contribution of moses (slacktrack's author?) to the original thread so long ago...I guess that was pre-slacktrack!!

Geremia 04-22-2013 01:38 AM

Quote:

Originally Posted by michaelslack (Post 4936086)
Code:

slacktrack -p texworks-0.4.5-i686-1custom.tgz ./tw.build
[/LIST]
...and a beautiful new home-made slackware package appears at /tmp/texworks-0.4.5-i686-1custom.tgz

Michael

PS I couldn't resist giving slacktrack a plug here, given the contribution of moses (slacktrack's author?) to the original thread so long ago...I guess that was pre-slacktrack!!

Wow, thanks! I can't believe I'd never heard of slacktrack before!

michaelslack 04-22-2013 02:00 AM

You're welcome Geremia, I'm glad you found the post helpful! I must say, it took me quite a while to work out what/how slacktrack is/works, it was a bit inaccessible. But I came across the following set of slides from a talk Stuart Winter gave on slackware packaging:

http://www.slackware.com/~mozes/docs...esentation.pdf

...and it helped me understand it a lot.

Cheers,

Michael

gnashley 04-22-2013 03:57 AM

Here's the list of DESTDIR-like syntax which src2pkg supports automatically:
CMAKE_INSTALL_PREFIX DESTDIR BUILDROOT INSTALLROOT INSTALL_ROOT INSTALL_PREFIX install_root instroot DIST_ROOT

If anyone knows of any more, I'll happily add them.

Toutatis 04-22-2013 04:09 AM

I use "spill" rather than create Slackware packages.

http://www.rpcurnow.force9.co.uk/spill/

"spill is a program for creating set of symbolic links from one directory hierarchy which point to corresponding filenames in a separate directory hierarchy. It's primary use is to allow packages built from source to be installed in separate directory trees, which are all linked together under a common directory tree (e.g. /usr/local) to reduce the length of the PATH environment variable. "

psionl0 04-22-2013 10:46 AM

"Spill" is not a part of Slackware and isn't included in SlackBuilds.org so I can't use "spill" to install "spill". ;)

More seriously, "spill" seems to assume that all configure files honour the --prefix option. You can't really afford to make any assumptions about a source. Each source needs to be treated as potentially a special case.

dive 04-23-2013 11:04 PM

I'd like to blow my own trumpet here:

mkslack - a SlackBuild generator script
(C) David Woodfall
(C) modifications by slakmagik

This slackbuild generator uses templates stored in /usr/share/mkslack/templates and a config file /etc/mkslack/mkslack.conf which you must edit for name, email, copyright etc.

http://www.dawoodfall.net/files/slac...rsion/mkslack/

gargamel 04-25-2013 04:07 PM

There's also src2pkg, of course. :)

gargamel


All times are GMT -5. The time now is 09:29 PM.