mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #3246 from thornbill/fix-ci-builds
Fix Fedora and CentOS builds
This commit is contained in:
commit
4e3e91f069
2 changed files with 8 additions and 6 deletions
|
@ -4,9 +4,8 @@ $(info $(shell set -x; if [ "$$(id -u)" = "0" ]; then echo "Installing git"; dnf
|
||||||
NAME := jellyfin-web
|
NAME := jellyfin-web
|
||||||
VERSION := $(shell set -x; sed -ne '/^Version:/s/.* *//p' $(DIR)/$(NAME).spec)
|
VERSION := $(shell set -x; sed -ne '/^Version:/s/.* *//p' $(DIR)/$(NAME).spec)
|
||||||
RELEASE := $(shell set -x; sed -ne '/^Release:/s/.* *\(.*\)%{.*}.*/\1/p' $(DIR)/$(NAME).spec)
|
RELEASE := $(shell set -x; sed -ne '/^Release:/s/.* *\(.*\)%{.*}.*/\1/p' $(DIR)/$(NAME).spec)
|
||||||
GIT_VER := $(shell set -x; git describe --tags | sed -e 's/^v//' -e 's/-[0-9]*-g.*$$//')
|
SRPM := jellyfin-web-$(subst -,~,$(VERSION))-$(RELEASE)$(shell rpm --eval %dist).src.rpm
|
||||||
SRPM := jellyfin-web-$(subst -,~,$(GIT_VER))-$(RELEASE)$(shell rpm --eval %dist).src.rpm
|
TARBALL :=$(NAME)-$(subst -,~,$(VERSION)).tar.gz
|
||||||
TARBALL :=$(NAME)-$(subst -,~,$(GIT_VER)).tar.gz
|
|
||||||
|
|
||||||
epel-7-x86_64_repos := https://rpm.nodesource.com/pub_16.x/el/\$$releasever/\$$basearch/
|
epel-7-x86_64_repos := https://rpm.nodesource.com/pub_16.x/el/\$$releasever/\$$basearch/
|
||||||
|
|
||||||
|
@ -20,9 +19,9 @@ $(DIR)/$(TARBALL):
|
||||||
cd $(DIR)/; \
|
cd $(DIR)/; \
|
||||||
SOURCE_DIR=.. \
|
SOURCE_DIR=.. \
|
||||||
WORKDIR="$${PWD}"; \
|
WORKDIR="$${PWD}"; \
|
||||||
version=$(GIT_VER); \
|
version=$(VERSION); \
|
||||||
tar \
|
tar \
|
||||||
--transform "s,^\.,$(NAME)-$(subst -,~,$(GIT_VER))," \
|
--transform "s,^\.,$(NAME)-$(subst -,~,$(VERSION))," \
|
||||||
--exclude='.git*' \
|
--exclude='.git*' \
|
||||||
--exclude='**/.git' \
|
--exclude='**/.git' \
|
||||||
--exclude='**/.hg' \
|
--exclude='**/.hg' \
|
||||||
|
@ -34,7 +33,6 @@ $(DIR)/$(TARBALL):
|
||||||
-C $${SOURCE_DIR} ./
|
-C $${SOURCE_DIR} ./
|
||||||
|
|
||||||
$(DIR)/$(SRPM): $(DIR)/$(TARBALL) $(DIR)/jellyfin-web.spec
|
$(DIR)/$(SRPM): $(DIR)/$(TARBALL) $(DIR)/jellyfin-web.spec
|
||||||
./bump_version $(GIT_VER)
|
|
||||||
cd $(DIR)/; \
|
cd $(DIR)/; \
|
||||||
rpmbuild -bs $(NAME).spec \
|
rpmbuild -bs $(NAME).spec \
|
||||||
--define "_sourcedir $$PWD/" \
|
--define "_sourcedir $$PWD/" \
|
||||||
|
|
|
@ -30,6 +30,10 @@ Jellyfin is a free software media system that puts you in control of managing an
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if 0%{?rhel} > 0 && 0%{?rhel} < 8
|
||||||
|
# Required for CentOS build
|
||||||
|
chown root:root -R .
|
||||||
|
%endif
|
||||||
npm ci --no-audit --unsafe-perm
|
npm ci --no-audit --unsafe-perm
|
||||||
%{__mkdir} -p %{buildroot}%{_datadir}
|
%{__mkdir} -p %{buildroot}%{_datadir}
|
||||||
mv dist %{buildroot}%{_datadir}/jellyfin-web
|
mv dist %{buildroot}%{_datadir}/jellyfin-web
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue