My current project is to package mjpg-streamer for openSUSE. With quite some effort and a lot of help from Malcolm I got it building ok. The package lacks a desktop icon to start/stop it which I added. The actual commands are coded in a bash script running without a terminal and doing all communication using kdialog. Unfortunately GNOME users will have to use the CLI until I find a better solution.
I should mention that I found a document giving a good introduction into packaging and hands-on exercises for writing and debugging spec files. I recommend it for everyone new to building packages: GURULABS-RPM-GUIDE.
The package now builds well and works when installed, at least for me. It is at Software.openSUSE.org. Before going on to bite another brick I would like to polish some remaining issues. Please allow me a few more questions regarding output in the build-log:
In the log, after “booting XEN kernel …”, I see messages like:
PCI: Fatal: No config space access function found
FATAL: Module ext4 not found.
Q1: Can I ignore these?
There is a warning regarding make:
make -C plugins/input_uvc all
make[1]: Entering directory `/usr/src/packages/BUILD/mjpg-streamer-2.0/plugins/input_uvc'
make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
gcc -c -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o v4l2uvc.lo v4l2uvc.c
Q2: What does this mean? Should I use ‘make -j 4’ instead of ‘make’. Or is there a macro for ‘make’ to be used?
There are three warnings about missing files in the rpm macro directory. I have seen them in many other posts on this forum but could not find any explanation:
+ /usr/lib/rpm/brp-desktop
WARNING: '/usr/lib/rpm/brp-desktop.data/suse-screensavers.menu' does not exist
WARNING: '/usr/lib/rpm/brp-desktop.data/preferences-gnome.menu' does not exist
WARNING: '/usr/lib/rpm/brp-desktop.data/applications-kmenuedit.menu' does not exist
+ /usr/lib/rpm/brp-rpath
warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
In order for make processes to communicate, the parent will pass information to the child. Since this could result in problems if the child process isn’t actually a make, the parent will only do this if it thinks the child is a make. The parent uses the normal algorithms to determine this (see How the MAKE Variable Works). If the makefile is constructed such that the parent doesn’t know the child is a make process, then the child will receive only part of the information necessary. In this case, the child will generate this warning message and proceed with its build in a sequential manner.
Thus the relevant line in the Makefile should read: