Making a Crux port - GNU/Linux

Users browsing this thread: 1 Guest(s)
Long time nixers
I've been using FrankenWM for awhile now and am very happy with it, On the eve of switching to crux I have been trying to figure out how to port it over.

I have been reading:

But the documentation is sparse and obviously geared torwards someone who knows a little more about the process than I do.

I was wondering how difficult it would be to create a port of:

I could just install from github but I was concerned about the xcb dependencies, how would I install those?

so either:
How to install the xcb dependencies and build from git
How to create a port that would help streamline the process
The documentation is sparse simply because you don't need much to write a port. Generally what I do when I sit down to port something is check out a slackbuild or PKGBUILD or gentoo or similar to see what sort of dependencies it needs. From the looks of the PKGBUILD, it only needs xcb-util-{keysyms,wm}.

I'll then search for ports with those names using prt-get dsearch %s. Crux has both in the xorg repo, called xorg-xcb-util-keysyms and xorg-xcb-util-wm. You can write a pkgfile that will pull a git repo, but I like doing by release. So a very simple one to get you started could be as follows:

$ prtcreate # this creates a template Pkgfile you can follow
$ $EDITOR Pkgfile

# Description: WM for Mary Shelley
# URL:
# Maintainer:  Houseofteapain
# Depends on:  xorg-xcb-util-wm xorg-xcb-util-keysyms


build () {
    cd $name-$version.$release

    # This command sets bin prefix and mandir prefix
    make PREFIX=/usr MANDIR=/usr/man DESTDIR=$PKG all
    make install

    # Decruftify a tad
    rm -r $PKG/usr/share

$ pkgmk -d

# At this point, you should have a working port made

Now, this can vary greatly depending on the package and software, how you download it, etc. But in general, this is how I do it. I'm not a super pro, so you may want to ask someone better at it and the devs are friendly if you run into trouble.

This should get you started. Hope I helped more than I hurt :)

Edit: Also make sure to check out prtcheck and prtverify (I think those are the names). They're part of pkgutils and they'll help you check dependencies, get rid of stuff you don't really need (like /usr/share).
Long time nixers
Thank you so much!

That was super helpful
Grey Hair Nixers
You might want to automate the process a bit, by using templates. I use the two following templates:

Pkgfile and Pkgfile-git. The second one is for git based ports. The guidelines specify that git based ports should use a commit number, so the Pkgfile will pull all changes, and checkout the specified commit.
If you're interrested, you can take a look at those two scripts of mine: prtmk - prtup.
prtmk will use the above templates to generate a Pkgfile for your package using prompts. The special version "git" will use the -git template, and prompt for a commit number.
prtup is made to update git ports and should be ran in the same directory as the Pkgfile. It will source it, clone/check the repo and update the Pkgfile with the latest commit number. Then you can rebuild the package to ensure it still works, and commit your work.