You are not logged in.

#1 2014-01-08 18:25:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

[SOLVED] PKGBUILD equivalents for other distros

I'd like to package some of my tools for other distros - mainly .deb and .rpm based for now.  Ideally, I'd like to not have to build full packages for each distro, but instead host build scripts or equivalents of PKGBUILDs for other distros.  As I am not nearly as well versed in other distros as I am with arch, I'm not sure how to find the needed information to accomplish this.

To take .deb as an example, the pacman rosetta page suggests debuild is the equivalent tool to makepkg.  However, the debuild man page indicates that debuild can simply be run within the source tree to build a package.  Certainly this can't be the case, unless there are distro-specific files within that source tree that debuild finds and uses.  That man page does not indicate what these files are and how they are written.

I have found documentation for creating full binary packages for debian-based distros, but is there an equivalent to a PKGBUILD?  I know for Gentoo, ebuilds are well documented and should be quite doable.  But frankly I'm pretty sure most gentoo users wouldn't need my help with those.  I'm currently primarily targeting .deb as many novice linux users that I'd like to make a couple of my tools available to seem to use ubuntoo.

I suspect I may just be missing the proper documentation and/or am not using the right search terms.  Any nudges in the right direction would be appreciated.

(edit: marked 'solved' as I now have the information I needed to get started working on this - but more input can always be handy.)

Last edited by Trilby (2014-01-08 20:34:26)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#2 2014-01-08 18:55:58

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,465

Re: [SOLVED] PKGBUILD equivalents for other distros

I think this is where you need to start for .deb: https://wiki.debian.org/Packaging

Edit: good luck on your journey. I guarantee it will make you appreciate the simplicity of Arch PKGBUILDS. smile

Last edited by Scimmia (2014-01-08 18:57:29)

Online

#3 2014-01-08 19:39:30

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] PKGBUILD equivalents for other distros

Scimmia has given you a good pointer for Debian packages. The closest "equivalent" to a PKGBUILD in Debian is the .dsc package. Take a look at the man page for dpkg-source: http://manpages.ubuntu.com/manpages/luc … rce.1.html

If you'd like to make a package available for CRUX, it should be very simple: http://crux.nu/Main/Handbook3-0#ntoc21. I think ideally you would make a complete port and make it available in a shared collection: http://crux.nu/Main/Handbook3-0#ntoc31

Last edited by 2ManyDogs (2014-01-08 20:00:24)


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#4 2014-01-08 19:55:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] PKGBUILD equivalents for other distros

This should feel quite familiar.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-01-08 20:32:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] PKGBUILD equivalents for other distros

Thanks for all the input - that should get me going in the right direction.  The .dsc package does seem to be what I was looking for with debian/*buntoo (I think).  Though that man page looks like it was written by a team of lawers.  I'll set up a few VMs and do some tinkering now.

Slackware does seem pretty straightforward.  Though like Gentoo, I supsect any interested slackware users wouldn't need much handholding.  Not that I wouldn't want those package scripts eventually - most potential users who would be completely clueless on their own will likely be ubuntoo users (this is no insult to ubuntoo - quite the opposite as it is simple enough for anyone to use for the basics).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#6 2014-01-08 21:30:29

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] PKGBUILD equivalents for other distros

Trilby wrote:

Thanks for all the input - that should get me going in the right direction.  The .dsc package does seem to be what I was looking for with debian/*buntoo (I think).  Though that man page looks like it was written by a team of lawers.

Well, it is an Ubuntu man page. (-; I'm sure you can find better references if you look; that was the just the first one I came across. It has a link to some samples, and if you set up Debian in a VM and simply "apt-get source" something you will have a package you can look at.

Or here is the source package for wm2:  http://bpaste.net/show/166127/

Last edited by 2ManyDogs (2014-01-08 21:38:40)


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#7 2014-01-25 23:59:10

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: [SOLVED] PKGBUILD equivalents for other distros

I'll leave these here just to complement.

NixOS:

Void Linux

Actually these two distros are quite similar to Arch on some aspects.

But Trilby, have you ever looked into openSUSE Build Service? It is a way to build packages for several distributions at once (see its documentation to see what distros / package managers are supported). Never tried myself, but I used openSUSE before, it looks like quite a reliable service.

Offline

#8 2014-01-26 00:11:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] PKGBUILD equivalents for other distros

That openSUSE build service looks quite promising and (so far) seems well documented.  The option for just maintaining a simple  build script (like a PKGBUILD) for the common "user-friendly" distros is seeming a little less promising than originally hoped, so having one tool that would allow me to build a full package for several of these distros would be very handy.  Thanks for the suggestion.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#9 2014-05-30 17:29:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] PKGBUILD equivalents for other distros

I recently discovered Debian's `checkinstall` which is very close to what I was looking for.  One can easily create a script that will download and install a "non-debianized" source package as a .deb that can be managed by dpkg/apt-get.

Allegedly it can also create rpm packages, but I'm not going to worry about trying that out for a while.

A simple example of a script to allow debian/*buntu users to install one of my packages can be seen here.  There is an executable script called `makedeb` - guess what it does.  There is also a package-specific file called DEBBUILD - guess what that's for smile.  With just those two files, a debian user could run the script which would get the needed info from the DEBUILD to install the needed dependencies, download and build the source, install under the watch of checkinstall to a temp directory, have checkinstall build a .deb package, remove the builddeps (and optionally all deps installed during the build), and leave them with a *.deb file ready for dpkg.

This instance of makedeb was intentionally made generic so it could work for other packages, however it is also *very* simple and so will not work for all other packages.  A DEBBUILD is nearly identical to a PKGBUILD, except the dependency names need to be converted to the debian deps (and there may be many more deps needed as you cannot assume our base/base-devel components are there ... and split -dev packages suck).

Making this DEBBUILD + makedeb made me wonder how hard it would be to convert our own makepkg over to work on top of apt-get/dpkg.  I've installed debian (crunchbang) on one of my systems to experiment with this.  I've realized there may not be much to it really.  I've just completed my revision to the actual makepkg script (and makepkg.conf) to make a full featured makedeb and makedeb.conf.  It is not yet tested - and once I test it I may find it is not nearly as complete as I had hoped.  But the goal is to allow PKGBUILD -> DEBBUILD conversions to be quite easy (just change the deps).

I may post my full featured makedeb in "community contributions" if/when it passes a few basic tests.  It will not run on arch, but it is suited for archers who need to make debs.  It may eventually run on arch (there are dpkg is in the AUR, and so is checkinstall, though it is very broken ATM), but this is not a goal of mine.

Last edited by Trilby (2014-05-30 17:37:40)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#10 2014-05-30 22:12:50

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: [SOLVED] PKGBUILD equivalents for other distros

Looks promising. If, in the future, the only thing one should change do adapt a PKGBUILD to a DEBBUILD is the dependency names, I would certainly use and recommend it.

For tests with .deb packages, I would use something like docker or a chroot. You don't need a full distro like crunchbang just to test the package.

Last edited by thiagowfx (2014-05-30 22:13:47)

Offline

#11 2014-05-30 22:25:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] PKGBUILD equivalents for other distros

Thanks - but as one of my projects is for professional use [1] I need to be able to test it on the type of system it will run on.  And having a debian distro around has an added benefit - when friends/family change to linux I usually steer them towards debian-based distros (usually Mint), so if I can refamiliarize myself with debian, I'll be of more use to them when they hit snags.

[1] the software itself is FOSS, but it will need to be reliable to compete with proprietary tools with general users.

Last edited by Trilby (2014-05-30 22:26:53)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#12 2014-05-31 14:47:14

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: [SOLVED] PKGBUILD equivalents for other distros

Offline

#13 2014-05-31 15:18:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] PKGBUILD equivalents for other distros

Yup, that page was created/started by Alad as described in his thread.  These thread topics are sufficiently different to remain separate, but it's good to have each crossreference the other now as anyone interested in one may also be interested in the other.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#14 2014-07-26 05:39:07

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: [SOLVED] PKGBUILD equivalents for other distros

Just stumbled upon this [1] today. See also those [2] introductory slides.

[1]: https://github.com/jordansissel/fpm
[2]: https://docs.google.com/presentation/d/ … de=id.i224

If you decide to try it, Trilby, please let me know what you have found. I'll probably experiment it a day.

Offline

#15 2014-08-28 15:14:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] PKGBUILD equivalents for other distros

(delayed reply) I looked a bit at FPM - it's interesting, but a very large/complex project.  It may be overkill for my needs and doesn't hit my desire for a simple approach.

I did mostly give up on doing deb packages correctly, and I'll just rely on `checkinstall`.  RPMs however are pretty easy with rpmbuild.  I made a "makerpm" script which will work with a slightly modified spec file allowing it to pull from a git source - so makerpm plus a spec file (with revisions as noted in `makeprm help`) are functionally homologous to makepkg and a PKGBUILD.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#16 2014-08-29 01:55:39

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: [SOLVED] PKGBUILD equivalents for other distros

I'll save your makerpm script here to give a look to it later. Thanks for your reply.

Offline

Board footer

Powered by FluxBB