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-jellyfin-web/Makefile
Ben Vincent c94c534367
Some checks failed
continuous-integration/drone/push Build is failing
feat: initial setup
- add Makefile
- add spec file
2024-08-26 23:19:29 +10:00

32 lines
814 B
Makefile

.PHONY: all prep download build clean
NAME := jellyfin-web
RPMBUILD := /drone/src/rpmbuild
SOURCES := $(RPMBUILD)/SOURCES
SPECS := $(RPMBUILD)/SPECS
SPECFILE := $(NAME).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)/$(NAME)-$(VERSION).tar.gz https://github.com/jellyfin/jellyfin-web/archive/refs/tags/v$(VERSION).tar.gz
@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."