[prev in list] [next in list] [prev in thread] [next in thread]
List: openais
Subject: [Openais] [PATCH] openais/trunk: add support for pkgconfig
From: "Fabio M. Di Nitto" <fdinitto () redhat ! com>
Date: 2009-01-30 18:50:35
Message-ID: 1233341435.15682.28.camel () cerberus ! int ! fabbione ! net
[Download RAW message or body]
Hi Steven,
this is the equivalent of corosync svn 1755 for openais as discussed
before.
Same changes across the line.
Please ack or apply.
Fabio
["pc.diff" (pc.diff)]
Index: Makefile.inc
===================================================================
--- Makefile.inc (revision 1687)
+++ Makefile.inc (working copy)
@@ -3,6 +3,26 @@
DESTDIR=
LCRSODIR=$(PREFIX)/libexec/lcrso
+ARCH=$(shell uname -p)
+
+ifeq (,$(findstring 64,$(ARCH)))
+PRELIBDIR=$(PREFIX)/lib
+else
+PRELIBDIR=$(PREFIX)/lib64
+endif
+ifeq (s390,$(ARCH))
+PRELIBDIR=$(PREFIX)/lib
+endif
+ifeq (s390x,$(ARCH))
+PRELIBDIR=$(PREFIX)/lib64
+endif
+ifeq (ia64,$(ARCH))
+PRELIBDIR=$(PREFIX)/lib
+endif
+
+LIBDIR=$(PRELIBDIR)/openais
+PKGCONFIGDIR=$(PRELIBDIR)/pkgconfig
+
# Do not modify below this line
# Basic OS detection
Index: pkgconfig/libtemplate.pc.in
===================================================================
--- pkgconfig/libtemplate.pc.in (revision 0)
+++ pkgconfig/libtemplate.pc.in (revision 0)
@@ -0,0 +1,11 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+libdir=@LIBDIR@
+includedir=${prefix}/include
+
+Name: @LIB@
+Version: trunk
+Description: @LIB@
+Requires:
+Libs: -L${libdir} -l@LIB@
+Cflags: -I${includedir}
Index: pkgconfig/Makefile
===================================================================
--- pkgconfig/Makefile (revision 0)
+++ pkgconfig/Makefile (revision 0)
@@ -0,0 +1,50 @@
+# Copyright (c) 2009 Red Hat, Inc.
+#
+# All rights reserved.
+#
+# This software licensed under BSD license, the text of which follows:
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# - Neither the name of the MontaVista Software, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR ENGINES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+# Include configuration
+#
+srcdir ?= $(CURDIR)/../
+subdir ?= pkgconfig
+
+include $(srcdir)/Makefile.inc
+
+LIBS = SaAmf SaCkpt SaClm SaEvt SaLck SaMsg
+
+all:
+ for i in $(LIBS); do \
+ cat ${srcdir}/pkgconfig/libtemplate.pc.in | sed \
+ -e 's#@PREFIX@#$(PREFIX)#g' \
+ -e 's#@LIBDIR@#$(LIBDIR)#g' \
+ -e 's#@LIB@#'$${i}'#g' \
+ > lib$${i}.pc; \
+ done;
+
+clean:
+ rm -f *.pc
Index: Makefile
===================================================================
--- Makefile (revision 1687)
+++ Makefile (working copy)
@@ -43,30 +43,15 @@
MANDIR=$(PREFIX)/share/man
SBINDIR=$(PREFIX)/sbin
ETCDIR=/etc
-ARCH=$(shell uname -p)
-ifeq (,$(findstring 64,$(ARCH)))
-LIBDIR=$(PREFIX)/lib/openais
-else
-LIBDIR=$(PREFIX)/lib64/openais
-endif
-ifeq (s390,$(ARCH))
-LIBDIR=$(PREFIX)/lib/openais
-endif
-ifeq (s390x,$(ARCH))
-LIBDIR=$(PREFIX)/lib64/openais
-endif
-ifeq (ia64,$(ARCH))
-LIBDIR=$(PREFIX)/lib/openais
-endif
-
-SUBDIRS:=$(builddir)lib $(builddir)test $(builddir)services
+SUBDIRS:=$(builddir)lib $(builddir)test $(builddir)services $(builddir)pkgconfig
sub_make = srcdir=$(srcdir) builddir=$(builddir) subdir=$(1)/ $(MAKE) \
-I$(srcdir)$(1) -f $(srcdir)$(1)/Makefile $(2)
all: $(SUBDIRS)
@(cd $(builddir)lib; echo ==== `pwd` ===; $(call sub_make,lib,all));
@(cd $(builddir)services; echo ==== `pwd` ===; $(call sub_make,services,all));
@(cd $(builddir)test; echo ==== `pwd` ===; $(call sub_make,test,all));
+ @(cd $(builddir)pkgconfig; echo ==== `pwd` ===; $(call sub_make,pkgconfig,all));
# subdirs are not phony
.PHONY: all clean install doxygen
@@ -104,6 +89,7 @@
(cd $(builddir)lib; echo ==== `pwd` ===; $(call sub_make,lib,clean));
(cd $(builddir)services; echo ==== `pwd` ===; $(call sub_make,services,clean));
(cd $(builddir)test; echo ==== `pwd` ===; $(call sub_make,test,clean));
+ (cd $(builddir)pkgconfig; echo ==== `pwd` ===; $(call sub_make,pkgconfig,clean));
rm -rf $(builddir)doc/api
AIS_LIBS = SaAmf SaClm SaCkpt SaEvt SaLck SaMsg
@@ -120,6 +106,7 @@
mkdir -p $(DESTDIR)$(MANDIR)/man5
mkdir -p $(DESTDIR)$(MANDIR)/man8
mkdir -p $(DESTDIR)$(ETCDIR)/ld.so.conf.d
+ mkdir -p $(DESTDIR)$(PKGCONFIGDIR)
for aLib in $(AIS_LIBS); do \
( cd $(builddir) ; \
@@ -156,5 +143,7 @@
install -m 644 $(srcdir)man/*.5 $(DESTDIR)$(MANDIR)/man5
install -m 644 $(srcdir)man/*.8 $(DESTDIR)$(MANDIR)/man8
+ install -m 644 $(builddir)/pkgconfig/*.pc $(DESTDIR)$(PKGCONFIGDIR)
+
doxygen:
mkdir -p doc/api && doxygen
_______________________________________________
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic