Rebuild webpack during RPM build
This is necessary to comply with Fedora's packaging policy: https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/ Include the node cache in the source rpm, unpack it into the main source dir, and force a webpack rebuild in `%build`.
This commit is contained in:
parent
4ca75f143c
commit
9574611768
3 changed files with 18 additions and 5 deletions
|
|
@ -4,8 +4,10 @@ Release: 1%{?dist}
|
|||
Summary: Cockpit Starter Kit Example Module
|
||||
License: LGPLv2+
|
||||
|
||||
Source: cockpit-starter-kit-%{version}.tar.xz
|
||||
Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/cockpit-starter-kit-%{version}.tar.xz
|
||||
Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/cockpit-starter-kit-node-%{version}.tar.xz
|
||||
BuildArch: noarch
|
||||
BuildRequires: nodejs
|
||||
BuildRequires: make
|
||||
BuildRequires: libappstream-glib
|
||||
|
||||
|
|
@ -17,7 +19,13 @@ Requires: cockpit-system
|
|||
Cockpit Starter Kit Example Module
|
||||
|
||||
%prep
|
||||
%setup -n cockpit-starter-kit
|
||||
%setup -q -n cockpit-starter-kit
|
||||
%setup -q -a 1 -n cockpit-starter-kit
|
||||
|
||||
%build
|
||||
# ignore pre-built webpack in release tarball and rebuild it
|
||||
rm -rf dist
|
||||
NODE_ENV=production make
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue