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.

About these ads

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s




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,960,597 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: