apt-get clean
apt-get update

myarch=amd64
mybits=64
mytarget=dvd
myextension=iso
mydirectory=debian-$mytarget-$mybits
mydate=`date +%Y%m%d`
myversion=sid
mymirror='http://ftp.fr.debian.org/debian/'

rm -fr $mydirectory
mkdir  $mydirectory
cd     $mydirectory
lh_clean  

lh_config \
--debian-installer=enabled \
-a $myarch -d $myversion -m $mymirror \
--hostname 'kdenlive.org' \
--categories 'main contrib non-free' --keyring-packages 'debian-multimedia-keyring undebian-archive-keyring' \
-p gnome --packages 'aufs-modules-2.6-amd64 kdenlive-dbg libmlt1/unstable dvgrab frei0r-plugins swh-plugins mkisofs recordmydesktop dvdauthor \
vlc totem-xine totem-plugins \
gstreamer0.10-ffmpeg gstreamer0.10-alsa gstreamer0.10-esd gstreamer0.10-lame \
gstreamer0.10-plugins-bad gstreamer0.10-plugins-really-bad gstreamer0.10-plugins-ugly gstreamer0.10-schroedinger gstreamer0.10-sdl gstreamer0.10-tools gstreamer0.10-x \
gnome-subtitles mplayer mencoder \
dvdrip transcode mjpegtools ogmtools unrar-free hal xine-ui subtitleripper \
quicktime-utils quicktime-x11utils mpgtx \
ardour audacity qjackctl jackd jack-tools jack-rack gnomebaker \
rawstudio inkscape f-spot synfig blender \
ntfs-3g ntfsprogs dosfstools gparted ntfsprogs jfsutils xfsprogs reiserfsprogs lvm2 \
firmware-linux firmware-ralink firmware-bnx2 firmware-iwlwifi firmware-qlogic \
wireless-tools wpasupplicant network-manager network-manager-gnome twinkle \
usbmount fusefat fuseext2 fusedav fusesmb gnome-volume-manager \
iceweasel flashplugin-nonfree evolution \
virtualbox-ose-guest-utils virtualbox-ose-modules-2.6-amd64'

#Add debian multimedia repositories

echo 'deb http://www.debian-multimedia.org sid main' >> config/chroot_sources/debian-multimedia.chroot
echo 'deb http://www.debian-multimedia.org sid main' >> config/chroot_sources/debian-multimedia.binary

echo 'deb http://www.debian-multimedia.org testing main' >> config/chroot_sources/debian-multimedia.chroot
echo 'deb http://www.debian-multimedia.org testing main' >> config/chroot_sources/debian-multimedia.binary

echo 'deb http://live.debian.net/debian/ ./' >> config/chroot_sources/debian-multimedia.chroot
echo 'deb http://live.debian.net/debian/ ./' >> config/chroot_sources/debian-multimedia.binary

lh_build
cp -f binary.$myextension ../debian-live-$mytarget-$mydate.x$mybits.$myextension
scp ../debian-live-$mytarget-$mydate.x$mybits.$myextension www.poure.com:/home/html/poure.com/kdenlive/
