summaryrefslogtreecommitdiffstats
path: root/debian/patches/libpgport-pkglibdir
blob: 0f544109e62aa78d8a9d8c1ac19fb2bb6f09a9dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Author: Christoph Berg <myon@debian.org>
Description: Move libpgport/libpgcommon/libpgfeutils from libdir to pkglibdir
 This allows client applications to link to version-specific libraries.
 Used by pg-checksums.
Forwarded: No, (somewhat) Debian specific

--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -124,15 +124,15 @@ distprep: kwlist_d.h
 
 # libpgcommon is needed by some contrib
 install: all installdirs
-	$(INSTALL_STLIB) libpgcommon.a '$(DESTDIR)$(libdir)/libpgcommon.a'
-	$(INSTALL_STLIB) libpgcommon_shlib.a '$(DESTDIR)$(libdir)/libpgcommon_shlib.a'
+	$(INSTALL_STLIB) libpgcommon.a '$(DESTDIR)$(pkglibdir)/libpgcommon.a'
+	$(INSTALL_STLIB) libpgcommon_shlib.a '$(DESTDIR)$(pkglibdir)/libpgcommon_shlib.a'
 
 installdirs:
-	$(MKDIR_P) '$(DESTDIR)$(libdir)'
+	$(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
 
 uninstall:
-	rm -f '$(DESTDIR)$(libdir)/libpgcommon.a'
-	rm -f '$(DESTDIR)$(libdir)/libpgcommon_shlib.a'
+	rm -f '$(DESTDIR)$(pkglibdir)/libpgcommon.a'
+	rm -f '$(DESTDIR)$(pkglibdir)/libpgcommon_shlib.a'
 
 libpgcommon.a: $(OBJS_FRONTEND)
 	rm -f $@
--- a/src/fe_utils/Makefile
+++ b/src/fe_utils/Makefile
@@ -48,13 +48,13 @@ distprep: psqlscan.c
 
 # libpgfeutils could be useful to contrib, so install it
 install: all installdirs
-	$(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(libdir)/libpgfeutils.a'
+	$(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(pkglibdir)/libpgfeutils.a'
 
 installdirs:
-	$(MKDIR_P) '$(DESTDIR)$(libdir)'
+	$(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
 
 uninstall:
-	rm -f '$(DESTDIR)$(libdir)/libpgfeutils.a'
+	rm -f '$(DESTDIR)$(pkglibdir)/libpgfeutils.a'
 
 clean distclean:
 	rm -f libpgfeutils.a $(OBJS) lex.backup
--- a/src/port/Makefile
+++ b/src/port/Makefile
@@ -70,15 +70,15 @@ all: libpgport.a libpgport_shlib.a libpg
 
 # libpgport is needed by some contrib
 install: all installdirs
-	$(INSTALL_STLIB) libpgport.a '$(DESTDIR)$(libdir)/libpgport.a'
-	$(INSTALL_STLIB) libpgport_shlib.a '$(DESTDIR)$(libdir)/libpgport_shlib.a'
+	$(INSTALL_STLIB) libpgport.a '$(DESTDIR)$(pkglibdir)/libpgport.a'
+	$(INSTALL_STLIB) libpgport_shlib.a '$(DESTDIR)$(pkglibdir)/libpgport_shlib.a'
 
 installdirs:
-	$(MKDIR_P) '$(DESTDIR)$(libdir)'
+	$(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
 
 uninstall:
-	rm -f '$(DESTDIR)$(libdir)/libpgport.a'
-	rm -f '$(DESTDIR)$(libdir)/libpgport_shlib.a'
+	rm -f '$(DESTDIR)$(pkglibdir)/libpgport.a'
+	rm -f '$(DESTDIR)$(pkglibdir)/libpgport_shlib.a'
 
 libpgport.a: $(OBJS)
 	rm -f $@
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -600,7 +600,7 @@ libpq = -L$(libpq_builddir) -lpq
 ifeq ($(PORTNAME),darwin)
 libpq_pgport = $(libpq)
 else ifdef PGXS
-libpq_pgport = -L$(libdir) -lpgcommon -lpgport $(libpq)
+libpq_pgport = -L$(pkglibdir) -lpgcommon -lpgport $(libpq)
 else
 libpq_pgport = -L$(top_builddir)/src/common -lpgcommon -L$(top_builddir)/src/port -lpgport $(libpq)
 endif
@@ -611,7 +611,7 @@ endif
 # done if they don't, since they will have satisfied all their references
 # from these libraries.)
 ifdef PGXS
-libpq_pgport_shlib = -L$(libdir) -lpgcommon_shlib -lpgport_shlib $(libpq)
+libpq_pgport_shlib = -L$(pkglibdir) -lpgcommon_shlib -lpgport_shlib $(libpq)
 else
 libpq_pgport_shlib = -L$(top_builddir)/src/common -lpgcommon_shlib -L$(top_builddir)/src/port -lpgport_shlib $(libpq)
 endif