Add requests as a dependency, split install target
* Add requests as a dependency on all OSs * Split the install target into a common target and separate install-systemd and install-openrc targets to support installing on Alpine
This commit is contained in:
40
Makefile
40
Makefile
@@ -23,7 +23,7 @@ SUPPORTED := ubuntu-20.04 \
|
||||
# These targets are the main ones to use for most things.
|
||||
##
|
||||
|
||||
.PHONY: all clean tgz test query-tests install
|
||||
.PHONY: all clean tgz test query-tests install-common install-openrc install-systemd
|
||||
|
||||
|
||||
# Build all packages
|
||||
@@ -69,12 +69,11 @@ test:
|
||||
query-tests:
|
||||
cd tests ; ./run-tests.sh
|
||||
|
||||
# Install the script at the specified base directory
|
||||
install:
|
||||
# Install the script at the specified base directory (common components)
|
||||
install-common:
|
||||
# Set up directories
|
||||
mkdir -p $(DESTDIR)/etc/$(PACKAGE_NAME)
|
||||
mkdir -p ${DESTDIR}/etc/logrotate.d
|
||||
mkdir -p $(DESTDIR)/lib/systemd/system
|
||||
mkdir -p $(DESTDIR)/usr/local/bin
|
||||
mkdir -p $(DESTDIR)/usr/share/man/man1
|
||||
|
||||
@@ -89,12 +88,35 @@ install:
|
||||
# Install sample config
|
||||
cp sample-config/* $(DESTDIR)/etc/$(PACKAGE_NAME)/
|
||||
|
||||
# Install systemd unit files
|
||||
cp systemd/* $(DESTDIR)/lib/systemd/system/
|
||||
|
||||
# Install logrotate config
|
||||
cp logrotate/${PACKAGE_NAME}.logrotate ${DESTDIR}/etc/logrotate.d/${PACKAGE_NAME}
|
||||
|
||||
# Install for systemd
|
||||
install-systemd:
|
||||
# Install the common stuff
|
||||
$(MAKE) install-common
|
||||
|
||||
# Set up directories
|
||||
mkdir -p $(DESTDIR)/lib/systemd/system
|
||||
|
||||
# Install systemd unit files
|
||||
cp systemd/* $(DESTDIR)/lib/systemd/system/
|
||||
|
||||
# Install for open-rc
|
||||
install-openrc:
|
||||
# Install the common stuff
|
||||
$(MAKE) install-common
|
||||
|
||||
# Set up directories
|
||||
mkdir -p $(DESTDIR)/etc/init.d
|
||||
mkdir -p $(DESTDIR)/etc/conf.d
|
||||
|
||||
# Install init script
|
||||
cp openrc/pgmon.initd $(DESTDIR)/init.d/pgmon
|
||||
|
||||
# Install init script config file
|
||||
cp openrc/pgmon.confd $(DESTDIR)/conf.d/pgmon
|
||||
|
||||
|
||||
# Run all of the install tests
|
||||
.PHONY: install-tests debian-%-install-test rockylinux-%-install-test ubuntu-%-install-test gentoo-install-test
|
||||
@@ -167,7 +189,7 @@ package-image-%:
|
||||
|
||||
# Debian package creation
|
||||
actually-package-debian-%:
|
||||
$(MAKE) install DESTDIR=/output/debian-$*
|
||||
$(MAKE) install-systemd DESTDIR=/output/debian-$*
|
||||
cp -r --preserve=mode DEBIAN /output/debian-$*/
|
||||
dpkg-deb -Zgzip --build /output/debian-$* "/output/$(PACKAGE_NAME)-$(VERSION)-debian-$*.deb"
|
||||
|
||||
@@ -182,7 +204,7 @@ actually-package-rockylinux-%:
|
||||
|
||||
# Ubuntu package creation
|
||||
actually-package-ubuntu-%:
|
||||
$(MAKE) install DESTDIR=/output/ubuntu-$*
|
||||
$(MAKE) install-systemd DESTDIR=/output/ubuntu-$*
|
||||
cp -r --preserve=mode DEBIAN /output/ubuntu-$*/
|
||||
dpkg-deb -Zgzip --build /output/ubuntu-$* "/output/$(PACKAGE_NAME)-$(VERSION)-ubuntu-$*.deb"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user