This repository has been archived on 2025-07-06. You can view files and clone it, but cannot push or open issues or pull requests.
rpmbuild-proxlb/Makefile
Ben Vincent 668f28e658
All checks were successful
Build / Build on AlmaLinux 8 (pull_request) Successful in 1m49s
feat: first build of ProxLB
- version 1.0.2
- setup gitea actions workflows
2024-09-07 23:33:56 +10:00

40 lines
897 B
Makefile

# Makefile for building and packaging ProxLB as an RPM
VERSION=1.0.2
REPO_URL=https://github.com/gyptazy/ProxLB.git
BUILD_DIR=$(PWD)/build
PACKAGE_DIR=$(PWD)/packages
REPO_DIR=$(PWD)/ProxLB
.PHONY: all clean download prepare build package
# Default target
all: download prepare build package
# Clone the repository if not already cloned
download:
@if [ ! -d "$(REPO_DIR)" ]; then \
echo "Cloning repository..."; \
git clone $(REPO_URL) $(REPO_DIR); \
fi
# Prepare directories
prepare: download
mkdir -p $(PACKAGE_DIR)
mkdir -p $(BUILD_DIR)
cd $(REPO_DIR) && git checkout v$(VERSION)
# Build the project
build: prepare
cd $(BUILD_DIR) && cmake $(REPO_DIR)/packaging
# Package the project
package: build
cd $(BUILD_DIR) && cpack -G RPM .
cp $(BUILD_DIR)/*.rpm $(PACKAGE_DIR)
# Clean up build and package directories
clean:
rm -rf $(BUILD_DIR) $(PACKAGE_DIR)
rm -rf $(REPO_DIR)