From d81e3d0bada9b5f1cd56d3594b6b377a5008f1af Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Wed, 19 Apr 2006 15:23:10 +0000 Subject: [PATCH] configure/makefile tidying + pkg-config support. --- WHATS_NEW_DM | 4 ++++ daemons/dmeventd/Makefile.in | 10 +++++++--- daemons/dmeventd/libdevmapper-event.pc.in | 12 ++++++++++++ libdm/Makefile.in | 14 ++++++++------ libdm/libdevmapper.pc.in | 11 +++++++++++ 5 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 daemons/dmeventd/libdevmapper-event.pc.in create mode 100644 libdm/libdevmapper.pc.in diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 38ae2ec24..82ee2f4a8 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,9 @@ Version 1.02.05 - ============================= + Separate install_include target in makefiles. + Separate out DEFS from CFLAGS. + Support pkg-config. + Check for libsepol. Version 1.02.04 - 14 Apr 2006 ============================= diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in index 6280ccae7..ef21c7afa 100644 --- a/daemons/dmeventd/Makefile.in +++ b/daemons/dmeventd/Makefile.in @@ -30,7 +30,7 @@ include ../make.tmpl CLDFLAGS += -ldl -ldevmapper -lpthread -.PHONY: install_dynamic install_static +.PHONY: install_dynamic install_static install_include INSTALL_TYPE = install_dynamic @@ -40,13 +40,17 @@ endif install: $(INSTALL_TYPE) +install_include: + $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper-event.h \ + $(includedir)/libdevmapper-event.h + install_dynamic: libdevmapper-event.$(LIB_SUFFIX) $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ $(libdir)/libdevmapper-event.$(LIB_SUFFIX).$(LIB_VERSION) $(LN_S) -f libdevmapper-event.$(LIB_SUFFIX).$(LIB_VERSION) \ $(libdir)/libdevmapper-event.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper-event.h \ - $(includedir)/libdevmapper-event.h + $(INSTALL) -D $(OWNER) $(GROUP) -m 444 devmapper-event.pc \ + $(usrlibdir)/pkgconfig/libdevmapper-event.pc install_static: libdevmapper-event.a $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ diff --git a/daemons/dmeventd/libdevmapper-event.pc.in b/daemons/dmeventd/libdevmapper-event.pc.in new file mode 100644 index 000000000..aacb2613d --- /dev/null +++ b/daemons/dmeventd/libdevmapper-event.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: devmapper-event +Description: device-mapper event library +Version: @DM_LIB_VERSION@ +Requires: devmapper +Cflags: -I${includedir} +Libs: -L${libdir} -ldevmapper-event +Libs.private: -lpthread -ldl diff --git a/libdm/Makefile.in b/libdm/Makefile.in index f2c8df3c7..8fd990eca 100644 --- a/libdm/Makefile.in +++ b/libdm/Makefile.in @@ -42,7 +42,7 @@ CFLAGS += -DDEVICE_UID=@DEVICE_UID@ -DDEVICE_GID=@DEVICE_GID@ \ include ../make.tmpl -.PHONY: install_dynamic install_static \ +.PHONY: install_dynamic install_static install_include \ install_fs install_ioctl install_ioctl_static INSTALL_TYPE = install_dynamic @@ -51,18 +51,18 @@ ifeq ("@STATIC_LINK@", "yes") INSTALL_TYPE += install_static endif -install: $(INSTALL_TYPE) +install: $(INSTALL_TYPE) install_include + +install_include: + $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper.h \ + $(includedir)/libdevmapper.h install_dynamic: install_@interface@ $(LN_S) -f libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION) \ $(libdir)/libdevmapper.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper.h \ - $(includedir)/libdevmapper.h install_static: install_@interface@_static $(LN_S) -f libdevmapper.a.$(LIB_VERSION) $(libdir)/libdevmapper.a - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper.h \ - $(includedir)/libdevmapper.h install_fs: fs/libdevmapper.$(LIB_SUFFIX) $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ @@ -71,6 +71,8 @@ install_fs: fs/libdevmapper.$(LIB_SUFFIX) install_ioctl: ioctl/libdevmapper.$(LIB_SUFFIX) $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ $(libdir)/libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION) + $(INSTALL) -D $(OWNER) $(GROUP) -m 444 devmapper.pc \ + $(usrlibdir)/pkgconfig/libdevmapper.pc install_ioctl_static: ioctl/libdevmapper.a $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ diff --git a/libdm/libdevmapper.pc.in b/libdm/libdevmapper.pc.in new file mode 100644 index 000000000..4d15446e0 --- /dev/null +++ b/libdm/libdevmapper.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: devmapper +Description: device-mapper library +Version: @DM_LIB_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -ldevmapper +Libs.private: -lselinux -lsepol