In the udev Makefile, right before:
define Package/udev/install
paste:
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libudev.so $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libudev.pc $(1)/usr/lib/pkgconfig
endef
Then make package/udev/{clean,compile,install}
I was able to build an app which linked against libudev (-ludev). Note that I had to define a caveat in the program source before it would compile:
#include <stdio.h>
#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE
#include <libudev.h>
Otherwise it will prevent you from using the library.
I haven't tested the app on the target itself, but since the udev package copies libudev over to the rootfs, I don't see why it wouldn't work.
(Last edited by aport on 6 Dec 2010, 19:24)