mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Make DESTDIR fully-configurable in the Makefile.
DESTDIR always had /usr/bin appended which was a problem systems that don't use /usr/bin as the install location for binaries. Instead, use the value of DESTDIR exactly and update the Debian packages accordingly. Contributed by Douglas J Hunley.
This commit is contained in:
parent
60fe5b7365
commit
786e77a9fe
@ -119,6 +119,14 @@
|
|||||||
<p><code>MemContext</code> improvements. Improve performance of context and memory allocations. Use <code>contextTop</code>/<code>contextCurrent</code> instead of <code>memContextTop()</code>/<code>memContextCurrent()</code>. Don't make a copy of the context name.</p>
|
<p><code>MemContext</code> improvements. Improve performance of context and memory allocations. Use <code>contextTop</code>/<code>contextCurrent</code> instead of <code>memContextTop()</code>/<code>memContextCurrent()</code>. Don't make a copy of the context name.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
|
||||||
|
<release-item>
|
||||||
|
<release-item-contributor-list>
|
||||||
|
<release-item-contributor id="douglas.j.hunley"/>
|
||||||
|
</release-item-contributor-list>
|
||||||
|
|
||||||
|
<p>Make <id>DESTDIR</id> fully-configurable in the <file>Makefile</file>.</p>
|
||||||
|
</release-item>
|
||||||
|
|
||||||
<release-item>
|
<release-item>
|
||||||
<release-item-contributor-list>
|
<release-item-contributor-list>
|
||||||
<release-item-contributor id="luca.ferrari"/>
|
<release-item-contributor id="luca.ferrari"/>
|
||||||
|
@ -51,7 +51,7 @@ LDFLAGS = -lcrypto -lssl -lxml2 -lz $(LDPERL) $(LDEXTRA)
|
|||||||
# Install options
|
# Install options
|
||||||
####################################################################################################################################
|
####################################################################################################################################
|
||||||
# Modify destination install directory
|
# Modify destination install directory
|
||||||
DESTDIR =
|
DESTDIR = /usr/bin
|
||||||
|
|
||||||
####################################################################################################################################
|
####################################################################################################################################
|
||||||
# List of required source files. main.c should always be listed last and the rest in alpha order.
|
# List of required source files. main.c should always be listed last and the rest in alpha order.
|
||||||
@ -175,14 +175,14 @@ pgbackrest: $(OBJS)
|
|||||||
# Installation. DESTDIR can be used to modify the install location.
|
# Installation. DESTDIR can be used to modify the install location.
|
||||||
####################################################################################################################################
|
####################################################################################################################################
|
||||||
install: pgbackrest
|
install: pgbackrest
|
||||||
install -d $(DESTDIR)/usr/bin
|
install -d $(DESTDIR)
|
||||||
install -m 755 pgbackrest $(DESTDIR)/usr/bin
|
install -m 755 pgbackrest $(DESTDIR)
|
||||||
|
|
||||||
####################################################################################################################################
|
####################################################################################################################################
|
||||||
# Uninstallation. DESTDIR should be set to the same value as when installed.
|
# Uninstallation. DESTDIR should be set to the same value as when installed.
|
||||||
####################################################################################################################################
|
####################################################################################################################################
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)/usr/bin/pgbackrest
|
rm -f $(DESTDIR)/pgbackrest
|
||||||
|
|
||||||
####################################################################################################################################
|
####################################################################################################################################
|
||||||
# Clean object files and executable created by make
|
# Clean object files and executable created by make
|
||||||
|
11
test/patch/debian-package.patch
Normal file
11
test/patch/debian-package.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- rules
|
||||||
|
+++ rules
|
||||||
|
@@ -34,7 +34,7 @@
|
||||||
|
dh_auto_clean
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
- make -C src install DESTDIR=$(CURDIR)/debian/pgbackrest
|
||||||
|
+ make -C src install DESTDIR=$(CURDIR)/debian/pgbackrest/usr/bin
|
||||||
|
dh_auto_install
|
||||||
|
|
||||||
|
.PHONY: build
|
Loading…
x
Reference in New Issue
Block a user