Module-Assistant - using upstream tarballs

From NewbieDOC

Andrewsw
(author)
Chris Lale
chrislale AT users DOT berlios DOT de (publisher)

Go to NewbieDOC index

Revision History


Revision 1.0 17th January 2007 Revised by Andrewsw
Initial release.

Revision 1.1 22nd November 2007 Revised by Chris Lale
Modified so that a stable version can be included in the "newbiedoc" package.


Image:Newbiedoc-32.png Stable document
You can comment on this document by clicking on the discussion tab.

You can edit the live version of this document: Module-Assistant - using upstream tarballs


Abstract

This is a simple hack to use an upstream tarball with Debian's module-assistant for upstream tarballs using gspca-source as an example.

This issue has come up on debian-user a few times now in recent history (early 2007). The package gspca-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

5.1 rename the debian source tarball:

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

6 ball up the modified upstream source:

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

7 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.

8 Appendix A: Licence

Copyright (c) 2007 Andrewsw

Copyright (c) 2007 Chris Lale. chrislale AT users DOT berlios DOT de

GNU FDL Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License."

Go to NewbieDOC index

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