Do not call ldconfig when building Debian package

Hi,

If I want to build Debian package, it fails with the following message:

    ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
    make[1]: *** [install-lib] Error 1

The reason is that I build the package as a non-root user and make
install invokes ldconfig unconditionally. The following patch contains a
workaround, but I think that a more correct solution would be to check
the condition LIBDIR_IN_LDCONFIG directly when make install is invoked
rather than in configure as it is done now.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
This commit is contained in:
Michal Sojka 2010-06-16 16:14:18 +02:00 committed by Carl Worth
parent ce6390cee7
commit f7a688ec53

View file

@ -36,9 +36,11 @@ SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE) LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
LIBRARY_LINK_FLAG = -shared -Wl,-soname=$(SONAME) LIBRARY_LINK_FLAG = -shared -Wl,-soname=$(SONAME)
ifeq ($(LIBDIR_IN_LDCONFIG),1) ifeq ($(LIBDIR_IN_LDCONFIG),1)
ifeq ($(DESTDIR),)
LIBRARY_INSTALL_POST_COMMAND=ldconfig LIBRARY_INSTALL_POST_COMMAND=ldconfig
endif endif
endif endif
endif
dir := lib dir := lib
extra_cflags += -I$(dir) -fPIC extra_cflags += -I$(dir) -fPIC