An assortment of Crux ports

This is another one of those posts that will only be of use to Crux users, or to me in a few months, if I find myself looking for a port for one of these programs. Most of these, as usual, were stolen rather shamelessly from AUR or from the Arch repositories, and converted in part through Colin Zheng’s fantastic PKGBUILD2Pkgfile script, and with a little nudging from me. No fair laughing at the results.

Here’s a port for bs, which I mentioned the other day among a group of console games.

# Description:  The classic game of Battleships against the computer. Ncurses.
# URL:          http://www.catb.org/~esr/bs/
# Maintainer:
# Depends on:   ncurses

name=bs
version=2.7
release=1
source=(http://www.catb.org/~esr/$name/$name-$version.tar.gz)
build ()
{
        cd $name-$version
        make

        mkdir -p $PKG/usr/bin $PKG/usr/share/man/man6

        cp bs $PKG/usr/bin
        cp bs.6 $PKG/usr/share/man/man6/bs.6
}

And gnuchess, since it too was mentioned.

# Description:  Lets most modern computers play a full game of chess
# URL:          http://www.gnu.org/software/chess/chess.html
# Maintainer:
# Depends on:   glibc ncurses readline

name=gnuchess
version=5.07
release=1
source=(ftp://ftp.gnu.org/pub/gnu/chess/$name-$version.tar.gz
        http://repos.archlinux.org/wsvn/packages/$name/repos/extra-i686/$name-gcc4.patch
        http://repos.archlinux.org/wsvn/packages/$name/repos/extra-i686/$name-glibc210.patch)
build ()
{
    cd $name-$version
    patch -Np1 -i $SRC/gnuchess-gcc4.patch
    patch -Np0 -i $SRC/gnuchess-glibc210.patch
    ./configure --prefix=/usr --enable-ncurses
    make
    make DESTDIR=$PKG install
}

Come to think of it, I don’t know if including those patches in the source lines will work or not; I had downloaded them manually before I included them in the Pkgfile. I’m still ironing out a way to wget patches and other stuff from the Arch repos. Accessing them via the Web site is actually showing an HTML page, so if your patches don’t quite work right, download them manually and move them into the gnuchess port folder. Sorry. 😦

I also mentioned alsaequal a long time ago, but I don’t think I ever made a “backup” of the ports I used to build it. Alsaequal wants ladspa and caps; ladspa is in the contrib repo I believe, but this is for caps.

# Description: C* Audio Plugin Suite
# URL:         http://www.quitte.de/dsp/caps.html
# Maintainer:
# Depends on:  ladspa

name=caps
version=0.4.4
release=1
source=(http://www.quitte.de/dsp/${name}_${version}.tar.gz)

build() {
    cd $name-$version
    make
    make DEST=$PKG/usr/lib/ladspa install
    chmod 755 $PKG/usr/lib/ladspa/*.so
    make RDFDEST=$PKG/usr/share/ladspa/rdf rdf-install
}

I think that one came from the vico ports originally, but I updated it to the current-at-the-time-of-writing version. 😉 And here is Alsaequal proper.

# Description: A real-time adjustable equalizer plugin for ALSA sound server.
# URL: http://www.thedigitalmachine.net/alsaequal.html
# Maintainer:
# Depends on: glibc ladspa caps

name=alsaequal
version=0.4
release=1
source=(http://www.thedigitalmachine.net/tools/$name-$version.tar.bz2
	http://aur.archlinux.org/packages/$name/$name/$name.patch)
build ()
{
    cd $name
    mkdir -p $PKG/usr/lib/alsa-lib/
    patch < ../alsaequal.patch
    make
    make DESTDIR=$PKG install
}

That time the patch download should work; it’s only from the Arch repos that I have trouble directly downloading the plain, unadulterated patch. AUR works fine.

As a final group, I mentioned abcde a long time ago as a console CD ripper. Other people have since mentioned crip, but to be honest, I find myself gravitating toward the former. No real reason; I just happen to like it. This one needs a lot of help though, and I’ll post the port for abcde first so you can see what you’re getting into.

# Description: A frontend command-line utility that grabs tracks off a CD, encodes them to ogg or mp3 format, and tags them
# URL: 		http://code.google.com/p/abcde
# Maintainer:
# Depends on: 	bash cd-discid wget cdparanoia cdrkit lame vorbis-tools vorbisgain flac id3 id3v2

name=abcde
version=2.4.0
release=2
source=(ftp://ftp.archlinux.org/other/$name/$name-$version.tar.bz2
        ftp://ftp.archlinux.org/other/$name/fix-mp3-tagging.patch)
build ()
{
    cd $name-$version
    patch -Np0 -i $SRC/fix-mp3-tagging.patch
    sed -e "s:normalize-audio:normalize:g" -i $name
    sed -e "s:/usr/bin/less:/bin/less:g" -i $name
    install -Dm 0755 $name $PKG/usr/bin/$name
    install -Dm 0755 cddb-tool $PKG/usr/bin/cddb-tool
    install -Dm 0644 cddb-tool.1 $PKG/usr/share/man/man1/cddb-tool.1
    install -Dm 0644 $name.1 $PKG/usr/share/man/man1/$name.1
    install -Dm 0644 $name.conf $PKG/etc/$name.conf
}

Many of those dependencies are available from within the Crux repos; the ones that are “orphans” are here. First, cd-discid.

# Description: cd-discid is a backend utility to get CDDB discid information from a CD-ROM disc.
# URL: http://lly.org/~rcw/cd-discid/
# Maintainer:
# Depends on: glibc

name=cd-discid
version=0.9
release=1
source=(http://lly.org/~rcw/$name/${name}_${version}.orig.tar.gz)
build ()
{
    cd $name-$version
    make
    make DESTDIR=$PKG install
}

As well as id3 and id3v2.

# Description:  Utility to edit id3v1 and id3v2 tags
# URL:          http://home.wanadoo.nl/squell/id3.html
# Maintainer:
# Depends on:   gcc

name=id3
version=0.78
release=1
source=(http://home.wanadoo.nl/squell/files/$name-$version.tar.gz
        id3-0.78-gcc44.patch)
build ()
{
    cd $name-$version
    patch -Np1 -i $SRC/id3-0.78-gcc44.patch
    make
    make prefix=$PKG/usr mandir=$PKG/usr/share/man install
    install -Dm644 COPYING $PKG/usr/share/licenses/$name/LICENSE
}
# Description:  Utility to edit id3v2 tags
# URL:          http://id3v2.sourceforge.net/
# Maintainer:
# Depends on:   gcc glibc id3lib zlib

name=id3v2
version=0.1.11
release=1
source=(http://downloads.sourceforge.net/sourceforge/$name/$name-$version.tar.gz)
build ()
{
    cd $name-$version
    make clean
    make
    install -Dm 0755 $name $PKG/usr/bin/$name
    install -D -m644 id3v2.1 $PKG/usr/share/man/man1/id3v2.1
}

Unless I am mistaken, the remainder should be filled out by the Crux repos, whether it’s contrib or opt. If I omitted something, let me know. And for those who mentioned crip or perhaps prefer it, there is a port here but I don’t vouch for it. Enjoy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s