1 # Author: Stunts <f.pinamartins@gmail.com>
2 # Contibutor: ianux <ianux@free.fr>
7 pkgdesc="A driver for the Ricoh r592 Memory Stick reader"
10 depends=(kernel26-headers)
12 url="http://gitorious.org/ricoh-kernel/ricoh-kernel/trees/master"
14 install=${pkgname}.install
16 _gitroot=git://gitorious.org/ricoh-kernel/memstick/ricoh-kernel.git
21 msg "Connecting to gitorious.org GIT server..."
22 if [ -d $srcdir/$_gitname ] ; then
23 pushd $_gitname && git pull origin && popd
24 msg "The local files are updated."
28 msg "GIT checkout done or server timeout"
29 msg "Starting make..."
31 [ -d ${_gitname}-build ] && rm -rf ${_gitname}-build
32 cp -r ${_gitname} ${_gitname}-build
33 cd ${_gitname}-build/memstick
34 find ${srcdir} -type f -name Makefile -exec sed -i 's/depmod -a//g' {} \;
35 #find ${srcdir} -type f -name Makefile -exec sed -i 's/$(KERNELDIR)/$(DESTDIR)$(KERNELDIR)/g' {} \;
39 cd ${_gitname}-build/memstick
40 install -d ${pkgdir}/lib/modules/$(uname -r)/updates
41 install -D -m 644 ${srcdir}/${_gitname}-build/memstick/ms_block.ko ${pkgdir}/lib/modules/$(uname -r)/updates/ms_block.ko
42 install -D -m 644 ${srcdir}/${_gitname}-build/memstick/r592.ko ${pkgdir}/lib/modules/$(uname -r)/updates/r592.ko
43 install -d ${pkgdir}/usr/share/icons/hicolor
44 cp -r ${srcdir}/${_gitname}-build/user/icons/hicolor ${pkgdir}/usr/share/icons/
45 install -d ${pkgdir}/etc/udev/rules.d
46 install -D -m 644 ${srcdir}/${_gitname}-build/user/95-udisks-cardreader.rules ${pkgdir}/etc/udev/rules.d/95-udisks-ms.rules