Archive for the 'Crux ports' Category



A Crux port for Zim

I use Zim a lot, as you might have noticed in my screenshots. It’s great for everything, and I strongly recommend it if you have any kind of hierarchical documentation that changes regularly or needs to be kept up to date. I use it to keep notes as I tinker with things; I can add and adjust pages to remind myself of commands I used or steps I took when I tried something.

I’ve been reluctant to put together a Crux port for Zim because there were a few dependencies that trickled down into Perl land, and all I know about Perl is how to spell it. Beyond that, I’m completely lost.

So in short: Fear of messing something up kept me from doing this before now. But I breathed deeply, put on the first season of Kung Fu, stuffed up my courage and waded into the mess. And I think this time I’ve got a winner.

Zim needs librsvg, which you can get out of the Xfce repos without drawing any other packages. It also needs shared-mime-info, which is in opt and may already be installed on your system. After that you need Perl’s File-BaseDir, File-DesktopEntry and File-MimeInfo.

# Description: Use the Freedesktop.org base directory specification
# URL: http://search.cpan.org/dist/File-BaseDir/
# Maintainer: 
# Depends on: perl

name=p5-file-basedir
_realname=File-BaseDir
version=0.03
release=1
source=(http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/$_realname-$version.tar.gz)
build () 
{ 
    cd ${_realname}-${version};
    perl Makefile.PL 
    make OPTIMIZE="$CFLAGS"
    make install DESTDIR=$PKG
	# Remove perlcrap
	find $PKG \
		\( -name '.packlist' -or \
		-name '*.bs' -or \
		-name 'autosplit.ix' -or \
		-name 'perllocal.pod' \) -delete

	# Remove empty directories
	find $PKG -depth -empty -exec rm -rf {} \;
}
# Description: Object to handle .desktop files
# URL: http://search.cpan.org/dist/File-DesktopEntry/
# Maintainer: 
# Depends on: perl

name=p5-file-desktopentry
_realname=File-DesktopEntry
version=0.04
release=1
source=(http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/File-DesktopEntry/$_realname-$version.tar.gz)
build () 
{ 
    cd ${_realname}-$version;
    PERL_MM_USE_DEFAULT=1 perl Makefile.PL 
    make OPTIMIZE="$CFLAGS"
    make DESTDIR=$PKG install
	# Remove perlcrap
	find $PKG \
		\( -name '.packlist' -or \
		-name '*.bs' -or \
		-name 'autosplit.ix' -or \
		-name 'perllocal.pod' \) -delete

	# Remove empty directories
	find $PKG -depth -empty -exec rm -rf {} \;
}
# Description: Perl/CPAN File::MimeInfo module - Determine file type
# URL: http://search.cpan.org/dist/File-MimeInfo/
# Maintainer: 
# Depends on: p5-file-basedir p5-file-desktopentry shared-mime-info perl

name=p5-file-mimeinfo
_realname=File-MimeInfo
version=0.14
release=1
source=(http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/File-MimeInfo/File-MimeInfo-$version.tar.gz)
build () 
{ 
    cd ${_realname}-${version};
    perl Makefile.PL 
    make OPTIMIZE="$CFLAGS"
    make DESTDIR=$PKG install

	# Remove perlcrap
	find $PKG \
		\( -name '.packlist' -or \
		-name '*.bs' -or \
		-name 'autosplit.ix' -or \
		-name 'perllocal.pod' \) -delete

	# Remove empty directories
	find $PKG -depth -empty -exec rm -rf {} \;
}

If those all look remarkably alike, that’s because I followed the example of a Perl port that was in contrib. It seemed like the best idea.

Now Zim proper.

# Description: A WYSIWYG text editor that aims at bringing the concept of a wiki to the desktop
# URL: http://zim-wiki.org/
# Maintainer: 
# Depends on: p5-gtk2 librsvg p5-file-mimeinfo 

name=zim
_realname=Zim
version=0.27
release=1
source=(http://www.zim-wiki.org/downloads/$_realname-$version.tar.gz)
build () 
{ 
    cd ${_realname}-${version};
    perl Build.PL destdir=$PKG
    perl Build
    perl Build install
}

That should do it. I know Zim is a bit esoteric, and installing a package in Crux takes a bit of work and time, so you might want to try it in another distro before going through all that. For me, it’s well worth it.

The irony of this is, I had been keeping Arch on one machine almost exclusively because I use Zim on that, and it was just easier to install it in Arch than it was to build all the interlacing ports. And it turns out it wasn’t that bad after all.

“Because a man can see, he does not look.”

P.S.: Thanks again, Colin.

A Crux port for Dwarf Fortress

Silly me, I waxed poetic about Dwarf Fortress the other day, but never posted the Crux port I used to install it on my system.

Be aware that this doesn’t mention the dependency on GL libraries — libgl in the original Arch PKGBUILD — that you should add depending on your hardware. I use the proprietary hardware driver from Nvidia, which is why this doesn’t include it.

# Description: Dwarf Fortress is a single-player fantasy game.  You can control a dwarven outpost or an adventurer in a randomly generated, persistent world.
# URL: http://www.bay12games.com/dwarves/
# Maintainer:  
# Depends on: gtk libsdl sdl_image 

name=dwarffortress
version=v0.28.181.40d5
release=3
source=(http://www.bay12games.com/dwarves/df_28_181_40d5_linux.tar.bz2)
build () 
{ 
    cd df_linux;
    install -d $PKG/usr/bin/;
    cp -r $SRC/df_linux/ $PKG/usr/bin/;
    echo "#!/bin/sh" > $PKG/usr/bin/dwarffortress.sh;
    echo "cd /usr/bin/df_linux" >> $PKG/usr/bin/dwarffortress.sh;
    echo "./df" >> $PKG/usr/bin/dwarffortress.sh;
    chmod -R 777 $PKG/usr/bin/df_linux;
    chmod 777 $PKG/usr/bin/dwarffortress.sh;
    install -D $SRC/df_linux/readme.txt $PKG/usr/share/licenses/dwarffortress/readme.txt
}

Thanks once again to the Arch community for putting together a working PKGBUILD, and to Colin Zheng, for making the transition between Arch-ese and Crux-ese much, much easier.

Fonts as sharp as razors: Crux ports for -LCD patches

Edit: Unfortunately, the images originally included in this post are gone, because of hosting problems in late 2009. My apologies.

One of the things I always find amazing when I install Arch Linux is the patches for cairo, fontconfig and libxft that are specific to LCDs. Install those packages on a laptop, adjust the X settings to your hardware and it’s like you installed a new screen. Simply beautiful stuff.

Looking to mimic the same razor-sharp edges on my Crux system, I came up with three ports and hijacked two others, all of which I’ll duplicate here, just for future reference. I don’t maintain a Crux repository, so if you’re interested, you’ll have to copy-and-paste, manually update and then compile. But you might end up doing that anyway, so it probably won’t bother you.

Another over-exuberant thank-you to Colin Zheng, whose PKGBUILD2Pkgfile script was, once again, simply invaluable in this process. Two seconds and a brief edit, and these Pkgfiles were done.

Cairo-LCD.

# Description: Cairo vector graphics library (with custom LCD filter).
# URL: http://cairographics.org/
# Maintainer: 
# Depends on: libpng xorg-libxrender fontconfig xorg-libpixman xorg-libxcb pkg-config

name=cairo-lcd
version=1.8.0
release=1
source=(http://cairographics.org/releases/cairo-$version.tar.gz lcd-filter.patch)
build () 
{ 
    cd cairo-$version;
    patch -p1 < ../lcd-filter.patch || return 1;
    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-xcb --disable-static || return 1;
    make || return 1;
    make DESTDIR=$PKG install || return 1
}

LibXft-LCD. I have my CHOST variable set to i686-pc-gnu-linux or whatever, but I don’t think it’s truly necessary for this. Let me know if I’m wrong and I’ll trim those parts out.

# Description: FreeType-based font drawing library for X (with custom LCD filter)
# URL: http://xorg.freedesktop.org/
# Maintainer: 
# Depends on: fontconfig xorg-libxrender pkg-config

name=libxft-lcd
version=2.1.11
release=1
source=(http://xorg.freedesktop.org//releases/individual/lib/libXft-$version.tar.bz2 libxft_export.diff xorg-lib-libXft-lcd-filter.patch)
build () 
{ 
    cd libXft-${version};
    patch -Np0 -i ../libxft_export.diff || return 1;
    patch -Np1 -i ../xorg-lib-libXft-lcd-filter.patch || return 1;
    ./configure --prefix=/usr --sysconfdir=/etc --build=${CHOST} --host=${CHOST};
    make || return 1;
    make DESTDIR=$PKG install || return 1
}

FontConfig-LCD.

# Description: A library for configuring and customizing font access (custom LCD filter).
# URL: http://www.fontconfig.org/release/
# Maintainer: 
# Depends on: fontconfig

name=fontconfig-lcd
version=2.6.0
release=1
source=(10-lcd-filter.conf)
build () 
{ 
    install -D -m644 10-lcd-filter.conf $PKG/etc/fonts/conf.avail/10-lcd-filter.conf || return 1
}

Note that Cairo-LCD depends on xcb-util, which in turn is dependent on gperf. Both of those I found in the mxq repository, and I’ll copy here, just in case that’s not available.

xcb-util.

# Description: number of libraries which sit on top of libxcb
# URL: http://xcb.freedesktop.org/
# Maintainer: Bartlomiej Palmowski, maks1k at wp dot pl
# Depends on: xorg-libxcb gperf

name=xcb-util
version=0.3.0
release=1
source=(http://${name/-util}.freedesktop.org/dist/$name-$version.tar.bz2)

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

gperf.

# Description: perfect hash function generator
# URL: http://www.gnu.org/software/gperf/
# Packager: Mattias Hedenskog <mattias@hedenskog.se>
# Maintainer: Bartlomiej Palmowski, maks1k at wp dot pl

name=gperf
version=3.0.3
release=1
source=(ftp://mirrors.kernel.org/gnu/$name/$name-$version.tar.gz)

build() {
    cd $name-$version
    ./configure --prefix=/usr \
        --mandir=/usr/man



    make
    make DESTDIR=$PKG install
    rm -rf $PKG/usr/share
}

Thanks to the real maintainer for those.

Oh, and how do they look, you ask?

That’s probably not a very good example. And the JPG conversion loses some quality. But it should give you an idea.

P.S.: Don’t forget to download the actual patches, probably from the Arch repositories, and include them in the port directory. Otherwise, these just plain won’t work. :mrgreen:

Edit: Here’s the LM Roman 10 at 10-point in Leafpad. The image doesn’t really look as good as what’s on my screen, and I seem to have the best luck with 9-point fonts, but this isn’t bad for a 96dpi 1600×1200 screen. In my own humble opinion, of course. ;)

A Crux port for axel

As mentioned previously, I assembled a Crux port for axel today.

# Description: axel is a command-line download accelerator.
# URL: http://axel.alioth.debian.org/
# Maintainer: 
# Depends on: glibc 

name=axel
version=1.1
release=1
source=(http://alioth.debian.org/frs/download.php/2287/$name-$version.tar.gz)

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

I take almost no credit for this one though, since the heavy lifting was done by Colin Zheng’s PKGBUILD2Pkgfile script. I just polished some of the corners. :)

I should probably revise some of my old Frankenscripts and see if Colin’s tool makes them any smoother. :|

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.


Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,963,682 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers