### this file is sourced not run
PKGVER=1.9.8
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=notecase-1.9.8_src.tar.gz
MD5SUM=9fe7d2db959d4c457d53313bb8faac35
SRC_URL=http://downloads.sourceforge.net/notecase/$TARBALL
BUNDLE=

SLACKREQ='gtk2 libgtksourceview'
SLACKDESC='notecase: notecase 1.9.8 (Hierarchical note manager)  
notecase:  
notecase: NoteCase is a hierarchical note manager (aka. outliner). It helps 
notecase: you organize your everyday text notes into a single document, with 
notecase: individual notes placed in the tree-like structure (each note can 
notecase: have its sub-notes, ...). To ensure your privacy, encrypted document 
notecase: format is supported, along with standard unencrypted format.  
notecase: 
notecase: 
notecase: 
notecase: 
'

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/notecase* &&
	patch -Np1 -i $CHROOT_DIR/tmp/pkg/notecase-1.9.8-build.patch &&
	patch -Np1 -i $CHROOT_DIR/tmp/pkg/notecase-1.9.8-zlib.patch &&
	patch -Np1 -i $CHROOT_DIR/tmp/pkg/notecase-1.9.8-autostart.patch &&
	
	true
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/notecase*
	# fix 100% cpu usage - defaults to using system locale
	sed -i -e '/g_objIni.GetValue/ s|bUseSystemLang|bUseSystemLang, 1|' src/main.cpp && 
	make && make install &&
	pkg_build_slackdesc &&

	# this is stupid but it is how we do things around here :)
	sed -i -e 's|^Categories=.*|Categories=ContactManagement;|' /usr/share/applications/notecase.desktop
}


