Category Archives: Crux ports

Where have you been my whole life?

For the six months or so I’ve been tapping away with Crux Linux, smushing together my own Pkgfiles from Arch versions, I wished there was an easier way to do it.

Lucky me, Colin Zheng came up with a script that does most of the preliminary conversion automatically, and submitted it to the Crux mailing list yesterday.

Download, save, make executable if need be. Import all the relevant Arch materials from the package repositories and run the script. You should end up with a clean Pkgfile that is a fairly close translation to the original PKGBUILD, just in Crux-speak.

It will still need a little fine-tuning, and I don’t think I would just build anything arbitrarily from a new Pkgfile without double-checking all the touchy points. I’ve tested one or two of the packages I use frequently that aren’t in the Crux repos, and the results are usually close to my own Frankenstein creations … if not better.

And both pkgmk and pkgadd seem happy, which makes me happy. :D

Thanks to Colin for making things just a little bit easier.

A Crux port for Sakura

Sakura is still my favorite terminal emulator — it’s clean and logical, it follows your GTK theme and it handles tabs in the same way Firefox or PCManFM or others do.

I hadn’t set up a port in Crux — I have been using rxvt-unicode for the past few months — but I got a wild surge and decided to make one for it.

This follows, basically, the instructions for Sakura that are bundled with the source code.

# Description:  A terminal emulator based on GTK and VTE.
# URL:          http://pleyades.net/david/sakura.php
# Maintainer:
# Packager:
# Depends on:   gtk vte cmake

name=sakura
version=2.2.0
release=1
source=(http://pleyades.net/david/projects/$name/$name-$version.tar.bz2)

build() {
        cd $name-$version
        cmake -DCMAKE_INSTALL_PREFIX=/usr .
        make
        make DESTDIR=$PKG PREFIX=/usr install 
        rm -rf $PKG/usr/share/locale
}

Note that VTE is not part of core/contrib/opt/xorg; you’ll have to add the Gnome or XFCE repository to get that (or copy it into a local repo, like I do ;) ). Enjoy!

A Crux port for AlsaPlayer

Since I mentioned it, I’ll post the revised Crux port for AlsaPlayer here. I built this one off the one in the han repositories. This allows streaming Internet audio, mp3 playback, ogg formats and the 3D visualizations too. It also enables the GTK2 interface while allowing the console control as well.

# Description: pcm audio player for Linux and other similar systems
# URL:         http://www.alsaplayer.org/
# Maintainer:  
# Packager:    
# Depends on:  alsa-lib libmad libtheora

name=alsaplayer
version=0.99.80
release=1
source="http://www.alsaplayer.org/alsaplayer-$version.tar.gz"

build()
{
    cd $name-$version
    ./configure \
        --prefix=/usr \
	--mandir=/usr/man \
	--enable-opengl \
	--enable-oggvorbis \
	--enable-mad \
	--disable-jack \
	--disable-mikmod \
	--disable-esd \
	--disable-sparc \
	--disable-oss \
	--disable-sgi \
	--disable-nas \
	--disable-audiofile \
        --disable-nls
    make
    make install DESTDIR=$PKG
}

I tried to space out the options available, so they’re easy to disable or enable according to your hardware and sound subsystem. Feel free to correct any of this, if it looks out of whack. ;)

A Crux port for NetSurf

Continuing in my quest for esoteric, lightweight software for my Crux systems, I managed to convert the AUR PKGBUILD for NetSurf over to Crux. Here are the results.

# Description: Lightweight, fast web browser
# URL: http://www.netsurf-browser.org
# Maintainer:
# Packager:
# Depends on: libmng curl libglade librsvg lcms re2c

name=netsurf
version=1.2
release=1
source=(http://www.netsurf-browser.org/downloads/releases/$name-$version-src.tar.gz \
	http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lemon.c \

http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lempar.c)

build() {
	cd $name

	cp ../lempar.c .
	gcc ../lemon.c -o lemon
	PATH=`pwd`:$PATH

	make || return 1
	sed -i -e 's|NETSURFRES=`dirname $0`/gtk/res/|NETSURFRES=`dirname $0`/../share/netsurf/res/|' netsurf
	sed -i -e 's|exec `dirname $0`/nsgtk "$@" 2>$LOG|exec `dirname $0`/../share/netsurf/nsgtk "$@" 2>$LOG|' netsurf

	install -d ../../pkg/usr/bin ../../pkg/usr/share/netsurf
	install nsgtk ../../pkg/usr/bin
	ln -s nsgtk ../../pkg/usr/bin/netsurf
	rm -rf gtk/res/.svn gtk/res/docs/.svn
	cp -RL gtk/res/* ../../pkg/usr/share/netsurf

	rm -rf ../src/$_svnmod-build
}

Note that this relies on four or five packages from outside the standard core/xorg/opt/contrib array. All of them are available through the search system, usually in the han or romster ports. Make sure you check the versions on those searched ports though; I generally don’t add outside repositories because many of them are out of date.

NetSurf is primitive when compared to browsers like Firefox, but Firefox takes about five hours to compile on a sub-500Mhz machine, whereas all of NetSurf, from start to finish, takes about 15 minutes.

And NetSurf does a pretty good job. It’s not perfect, and there are a lot of things I would like to see added or improved, but in the mean time it’s a working, functional browser for a system that runs exceedingly light. Whether or not it will fit the bill for your old machine running Crux … is for you to decide. :)

A Crux port for GPRename

This is one of those applications I use very rarely, but it’s an incredible timesaver when I need it most. Batch photo renaming, search and replace in filenames, etc. Here’s a Crux port, grafted from the AUR version. Thanks again, gang.

# Description: 	A complete batch renamer for files and directories, coded for Linux in GTK2-Perl. 
# URL: 		http://gprename.sourceforge.net/
# Depends on:	perl p5-gtk2 p5-glib p5-libintl p5-locale-gettext

name=gprename
version=2.5
release=1
source="http://downloads.sourceforge.net/$name/$name-$version.tar.bz2"

build() {
  cd $name-$version
  make PREFIX=/usr DESTDIR=$PKG/usr install || return 1
}

And there it is. Note that it relies on p5-libintl, which technically isn’t in the Crux repositories, but is in the Crux port search.

Now if I could only get a version of Zim working. … :roll:

Crux port for Osmo

Hello Future Me. Here’s that Crux port for Osmo you were looking for.

# Description: A handy personal organizer which includes calendar, tasks manager and address book modules.
# URL:         http://clay.ll.pl/osmo/
# Depends on:  gtk libxml2

name=osmo
version=0.2.0
release=1
source="http://downloads.sourceforge.net/osmo-pim/$name-$version.tar.gz"

build() {
	cd $name-$version
	./configure --prefix=/usr
 	make DESTDIR=$PKG install || return 1
}

Thanks, Past Me. And thanks, AUR.

Crux port for Recorder

In between everything else I came up with a Crux port for Recorder, the wonderful little CD and DVD burning program that some fellow Archers have been fawning over these days. And with good reason: It’s fast, it’s light and it doesn’t require a mess of garbage just to burn a CD. It’s perfect.

Here’s a port against the 1.2.7 version, so you can build it in Crux.

# Description: A simple GTK+ disc burner.
# URL: http://code.google.com/p/recorder
# Maintainer: Alex Ciurana
# Depends on: pygtk, cdrkit, dvd+rw-tools

name=recorder
version=1.2.7
release=1
source=(http://recorder.googlecode.com/files/$name-$version.tar.bz2)

build () {
	cd $name-$version
	make DESTDIR=$PKG PREFIX=/usr install
}

I molded that from the Arch PKGBUILD in AUR, so it might not be picture-perfect. I’ll update it if it doesn’t quite work right. (In case you hadn’t noticed, I don’t bother actually “maintaining” a Crux repository. I just copy them back out of the blog and change the version number, if it’s needed. You can do the same.)