feat: first build of ProxLB
Build / Build on AlmaLinux 8 (pull_request) Failing after 35s

- version 1.0.2
- setup gitea actions workflows
This commit is contained in:
2024-09-01 01:02:34 +10:00
parent 5b47fd7869
commit 104345fa17
5 changed files with 182 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
# Makefile for building and packaging ProxLB as an RPM
VERSION=1.0.2
REPO_URL=https://github.com/gyptazy/ProxLB.git
BUILD_DIR=/workspace/build
PACKAGE_DIR=workspace/packages
REPO_DIR=/workspace/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); \
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)