# Maintainer : Dan Vratil (alias ProgDan) <vratil@progdansoft.com> # this isn't required but should be noted (t)here
pkgname=k3b-git
pkgver=20101227
pkgrel=1
pkgdesc='Feature-rich and easy to handle CD burning application (Git version)' # since it _is_ a git version
arch=('i686' 'x86_64')
license=('GPL')
url='http://k3b.sourceforge.net'
depends=('kdebase-runtime' 'kdemultimedia-kioslave' 'libsamplerate' 'libmad'
'ffmpeg' 'taglib' 'libmpcdec' 'libdvdread' 'cdrdao' 'cdrkit'
'shared-mime-info' 'libxft' 'flac')
makedepends=('git' 'cmake' 'automoc4' ) # 'pkgconfig' belongs to 'base-devel'
install="k3b.install"
optdepends=('dvd+rw-tools: for dvd burning support'
'vcdimager: for vcd burning support'
'transcode: for advanced mpeg conversion support'
'emovix: for bootable multimedia cd/dvd support')
options=('!libtool')
conflicts=('k3b') # replaces is meant for packages changing their name. Using a git version of the same package is not the same as forking a totally new project
_gitroot="git://git.kde.org/k3b"
_gitname="k3b"
build() { # flamelab forgot quotes around dir variables ("$srcdir" and "$pkgdir") in the whole function
msg "Connecting to GIT server...." # no need to cd to "srcdir" - you are already there
if [ -d $_gitname ] ; then
cd $_gitname
git pull origin
msg "The local files are updated."
else
git clone $_gitroot
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
if [[ -d "$srcdir/$_gitname-build" ]]; then
msg "Cleaning the previous build directory..."
rm -rf "$srcdir/$_gitname-build"
fi
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
sed -i 's/^add_subdirectory(\ doc\ )/#add_subdirectory(\ doc\ )/' CMakeLists.txt
cmake ./ -DCMAKE_INSTALL_PREFIX=/usr
make
}
package() { # some redundant extra free space in the package() function and after it
cd $_gitname-build # we are already in "$srcdir"
make DESTDIR="$pkgdir" install
}