All checks were successful
Build RPMs / Build on AlmaLinux 8 (pull_request) Successful in 3m49s
- remove .drone.yml - create .gitea/workflows/deploy.yaml and build.yaml - install node in default container - updated makefile
33 lines
1001 B
Makefile
33 lines
1001 B
Makefile
.PHONY: all prep download build clean
|
|
|
|
RPMBUILD := /workspace/src/rpmbuild
|
|
SOURCES := $(RPMBUILD)/SOURCES
|
|
SPECS := $(RPMBUILD)/SPECS
|
|
SPECFILE := gonic.spec
|
|
|
|
# Extract the version from the spec file
|
|
VERSION := $(shell grep "^Version:" $(SPECFILE) | awk '{print $$2}')
|
|
|
|
all: build
|
|
|
|
prep:
|
|
@echo "Creating rpmbuild directories..."
|
|
@mkdir -p $(RPMBUILD)/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
|
|
|
download: prep
|
|
@echo "Downloading sources..."
|
|
@wget -O $(SOURCES)/gonic-$(VERSION).tar.gz https://github.com/sentriz/gonic/archive/refs/tags/v$(VERSION).tar.gz
|
|
@wget -O $(SOURCES)/gonic-config https://raw.githubusercontent.com/sentriz/gonic/master/contrib/config
|
|
@wget -O $(SOURCES)/gonic.service https://raw.githubusercontent.com/sentriz/gonic/master/contrib/gonic.service
|
|
@echo "Sources downloaded."
|
|
|
|
build: $(SPECFILE) download
|
|
@echo "Building RPM..."
|
|
@rpmbuild -ba --define "_topdir $(RPMBUILD)" $(SPECFILE)
|
|
@echo "RPM built."
|
|
|
|
clean:
|
|
@echo "Cleaning up..."
|
|
@rm -rf $(RPMBUILD)
|
|
@echo "Clean up done."
|