[Frugalware-devel] FB add package smartcam

Miklos Vajna vmiklos at frugalware.org
Fri Mar 25 09:45:24 CET 2011


Hi,

In general: this is an external kernel module: do you know what is the
long term plan with that? Do they plan to submit it to the vanilla
kernel tree?

> pkgname=smartcam
> pkgver=1.4.0
> pkgrel=1
> pkgdesc="Turns a camera phone (S60, WinMo6.x, Android, Samsung Bada) with bluetooth or WiFi into a handy webcam ready to use with your PC"
> url="http://sourceforge.net/projects/smartcam/"
> depends=('bluez' 'gconf' 'hicolor-icon-theme' 'intltool')
> Finclude kernel-module
> makedepends=('kernel-headers' 'kernel-source' 'gtk+2')

I would do the Finclude kernel-module first, then append the other
dependencies so that you get the right kernel=something dependency
right.

> build() {
>     # make client program
>     Fcd
>     ./configure --prefix=/usr

Why don't you use Fconf here that automatically sets prefix?

>     Fmake
>     Fmakeinstall
>     # make kernel module
>     cd driver_src/
>     make -C /lib/modules/`uname -r`/build M=`pwd` || return 1

If you use uname -r here, you can't "cross-compile" (if current has
2.6.38 but you run 2.6.39-rc1, you should be able to build a package for
2.6.38). An alternative is to use 'make -C $_F_kernelmod_dir/build ...'

>     Ffilerel smartcam.ko $_F_kernelmod_dir/kernel/drivers/video/smartcam.ko

shorter version: Ffilerel $_F_kernelmod_dir/kernel/drivers/video/smartcam.ko

> post_install() {
>     echo
>     echo "Load modules before running Smartcam: # modprobe videodev; modprobe smartcam"
>     echo

echo is bad - if a user installs this package in GFpm, she won't see
this message. Add a README.Frugalware if you think this is an important
info, or just remove it.

>     update-desktop-database -q
>     gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
>     /sbin/depmod

This will fail when you run stable and you install this package in a
current chroot, as by default /sbin/depmod uses uname -r.

See what the acerhk package does: set $_F_kernelmod_scriptlet to
$pkgname.install, see source/include/kernel-module.install on how to
invoke /sbin/depmod, finally invoke Fbuild_kernelmod_scriptlet from
build().

>     /bin/true

Is this necessary? We don't check the return code of these functions.

Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: </pipermail/attachments/20110325/43f3bd01/attachment.asc>


More information about the Frugalware-devel mailing list