Making a Crux port - GNU/Linux

Users browsing this thread: 1 Guest(s)
thetornainbow
Members
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:

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

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

name=FrankenWM
version=1.0
release=4
source=(https://github.com/sulami/$name/archive/v$version.$release.tar.gz)

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).


Messages In This Thread
Making a Crux port - by Houseoftea - 20-07-2015, 10:27 AM
RE: Making a Crux port - by thetornainbow - 20-07-2015, 01:04 PM
RE: Making a Crux port - by Houseoftea - 20-07-2015, 06:57 PM
RE: Making a Crux port - by z3bra - 21-07-2015, 06:01 AM