Module-Assistant - using upstream tarballs

From NewbieDOC

--Andrewsw 01:00, 17 January 2007 (CET)


This issue has come up on debian-user a few times now in recent history (early 2007). The package gpsca-source is the source code for building modules for a whole slew of webcams. Upstream has been keeping up a pretty good release pace that even sid has trouble keeping up with.

I needed drivers for a Logitech Notebook Webcam. A quick check of lsusb and the compatibility list showed that the camera was supported, but unfortunately in a new release than was available in sid.

Just to double check, I did an aptitude install gspca-source and built the modules with module-assistant. This confirmed that the camera was not recognised. So how to proceed?

Contents

1 Use the Source:

Download the source tarball from upstream. mv it to /usr/src and unpack it.

tar -xzf gspcav1-xxxx.tar.gz

It will unpack in /usr/src/ but needs to be in /usr/src/modules/ so mv it there. Or be smarter than me and unpack it there in the first place.

2 Get the appropriate packages:

aptitude install gspca-source

(this should bring in module-assistant too...). unpack gspca-source.tar.bz2 (its in /usr/src/)

tar -xjvf gspca-source.tar.bz2

3 Compare the two directories.

You'll see that there is only one difference between the two: the debian package has an additional sub-dir "debian". cp -a that "debian" sub-dir into the upstream source directory:

cp -a /usr/src/modules/gspca/debian /usr/src/modules/gspcav1-xxxx  # xxxx is the versioning info from upstream.

4 Get rid of the debian source directory

rm -rf /usr/src/modules/gspca  #CAREFUL!!

or you could mv it aside

mv /usr/src/modules/gspca /usr/src/modules/gspca-deb

5 rename the upstream directory:

mv /usr/src/modules/gspcav1-xxxx /usr/src/modules/gspca

6 rename the debian source tarball:

mv /usr/src/gspca-source.tar.bz2 /usr/src/gspca-source-orig.tar.bz2

7 ball up the modified upstream source:

cd /usr/src
tar -cjf gspca-source.tar.bz2 modules/gspca

8 Launch module-assistant and build away:

m-a build gspca-source  # I actually did it from the curses interace, so that's a guess

- or -

module-assistant # follow instructions on screen


This successfully built gspca modules using sid source package (version 1.0.4) and the upstream tarball (version 1.0.12). May not work for others... but its worth a shot.

Enjoy.

Content is available under GNU Free Documentation License 1.2, unless otherwise stated.