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.

Leave a Reply




Welcome!

Some recent desktops


July 16, 2009
Openbox 3.4.7.2 on Crux Linux
1Ghz Pentium III 512Mb PC133


July 11, 2009
screen-vs on Crux Linux
550Mhz Celeron 192Mb PC100


Feb. 13, 2009
Awesome 2.3.4 on Crux Linux
100Mhz Pentium 16Mb PC66 120Gb

A recent game


Warzone 2100
IceWM 1.2.37 on Arch Linux
1Ghz Pentium III 512Mb PC133

Be counted!

License

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

Downloads

Blog Stats

  • 1,220,789 hits

Categories

Archives

Calendar

January 2009
S M T W T F S
« Dec   Feb »
 123
45678910
11121314151617
18192021222324
25262728293031