SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It could be a set of functions (downloading from source, from git/svn/..., extract, patch, etc...), it could be a set of variables plus some external scripts, etc...
I have begun to read Arch Linux doc, and they seems to have such "framework".
Could you give me the opinion of maintainers on this subject please ?
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
I don't know whether you'd qualify any of my suggestions as "package building frameworks" however have a look at solutions such as Gilbert Ashley's src2pkg, Chess Griffin's (and other's) sbopkg and also Dave Woolfall's mkslack. All very useful tools - maybe "frameworks". Apologies if I've missed anyone's package building solutions out.
Edit: Perhaps I should have accredited sbopkg with it's other authors being Mauro Giachero and slakmagik. Apologies to both - no offence intended.
It could be a set of functions (downloading from source, from git/svn/..., extract, patch, etc...), it could be a set of variables plus some external scripts, etc...
I have read the Writing_A_SlackBuild_Script from the slackbuild site, and the http://www.slackbook.org/html/book.h...AGE-MANAGEMENT section of the slackbook. But it seems that every one is free to write the script anyway he wants, but that he can't reuse kind of "macro" for repetitives task we can find in every scripts. Every one who write a generator for slackbuilds could generate different structures... A slackbuild script seems to has only one requirement : generate a package. No naming convention, no predefined variables, no restriction on external programs, etc...
So the tools you suggest are not really the framework i would imagine....
If every program would compile the exact same way, such a thing would be practical
./configure is seen most of the time, but the options to it differ.
make install DESTDIR=/foo/bar same, but not all programs follow this defacto standard; sometimes it's ISNTALLDIR=/foo/bar or make prefix=/foo/bar install
I can continue for a while, so the various projects all use different standards.
pkgtools "recognize" only one standard naming convention, hence packagers will follow this standard as the naming convention. As with many more things, Slackware doesn't hold your hand here.
There are frameworks many people use and find useful. src2pkg is one that would fit your description. I prefer to do things a little bit different, and developed my own slackbuild scripts which are function based. Most of the times I only have to set the application name, version and the parameters to configure. But often enough I have found that a standard does not work.
Also, people will wan their own options to applications; for example php: an src2pkg or any framework would not do (for me), as I want to compile things in, that others don't want. Also the default package doesn't provide what I want, so I have to build it for myself. I never wanted a one-flavor-for-all approach.
I have begun to read Arch Linux doc, and they seems to have such "framework".
Since you used Arch you might like slkbuild (not to be confused with SlackBuilds). slkbuild is "An Arch-like tool for easy Slackware packaging" and is used extensively in the Slackware based distro SalixOS. The format of the SLKBUILD build/packaging meta-files is very to that of Arch PKGBUILDs but will generate Slackware packages.
Correction: It actually generates a build script and that build script generates a Slackware package. Which is handy as you can share the build script with someone who does not have slkbuild installed.
What I like about the slackbuild scripts is that as everything is in-line, nothing is hidden from you and is much easier to customise. If you know shell scripting, you're set. No need to learn any extra functions or macros, and the templates that are available give you a good starting point.
Also, if using an external framework, you also need to worry about what version of it is available. Slackbuild templates are self contained thus avoiding this consideration.
Edit: Others have already said the following. This is just my own spin
Alternatively, if you don't want to go down the slkbuild route because you don't like relying on a third party tool, then you may find these useful for ensuring you make high quality build scripts.
The templates are particularly handy. All the boring stuff like untarring, setting man/doc install directories, setting permissions, stripping binaries, compressing man and info pages, removing unneeded files, etc. will probably just work as is. Generally you only need to change a few variables and do a few other minor tweaks.
I would argue that the Wiki and templates are as close to an 'official' framework as you are likely to get, given the involvement of Slackware team members (like Robby Workman) in their creation and maintenance.
Last edited by ruario; 03-09-2011 at 05:16 AM.
Reason: just clarifying that I have read sycamorex and GazL's comments
To create a package creator that conforms with slackbuilds.org guidelines, you need to create several files and before running the slackbuild script, you need to manually download the source tarball.
If you prefer a slackbuild that does all of the work in a single file, you might like to have a look at https://slack.sarava.org/slackbuilds/. The scripts there would make a useful template for one of your own scripts.
What I like about the slackbuild scripts is that as everything is in-line, nothing is hidden from you and is much easier to customise
One one hand i share this point of view.
On the other hand, i maintain my own embedded system builder, a kind of very basic openembedded or buildroot (if you are curious, here is the source http://paul.chavent.free.fr/sdk/sdk.tar.bz2). And as i have scripts for building my packages, i wondered if i could stick to an already existing convention. As i use slackware as OS, i asked you this question.
That's exactly the sort of thing I don't like to see. Download to where? Extract to where? Without digging into your function library I simply don't know and if I ever needed to change the location
then that gets ugly
I'd have less of a problem with a framework that worked something like
Code:
pkg_extract --from "$tarfile" --to "$tmpdir"
as everything important is still visible to the reader. My philosophy on functions is that you should use them to hide 'how', but never 'what'.
If you plan to submit to slackbuilds.org, then they expect you to do it their way and use their templates to keep things consistent.
If you're going to make them available on your own site, or just for personal use, then use whatever you're comfortable with.
From post #13, opencvlibrary has a BSD licence and libdc1394 has a GPL license, yet your framework does not appear to meet the requirements for redistribution.
Just one of those little annoyances that the Slackbuild maintainers might pick up.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.