feat: first build of ProxLB
Build / Build on AlmaLinux 8 (pull_request) Successful in 1m46s

- version 1.0.2
- setup gitea actions workflows
This commit is contained in:
2024-09-01 01:02:34 +10:00
parent 5b47fd7869
commit d99d19ee0d
4 changed files with 149 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=$(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)