Name: pbench-web-server Version: 0.47 %define gdist g2cfe130 Release: 1%{?gdist}%{!?gdist:} Summary: The pbench web server bits License: GPLv3+ URL: http://github.com/distributed-systems-analysis/pbench Source0: http://pbench.perf.lab.eng.bos.redhat.com/test-repo/pbench-web-server-%{version}.tar.gz Buildarch: noarch Requires: npm %define installdir opt/pbench-web-server %define static %{installdir}/html/static %define versions 0.2 0.3 %define EXTRA_FILES %{buildroot}/extra.list %description The pbench web server bits. %prep %setup %build %install touch %{EXTRA_FILES} rm -rf %{buildroot} mkdir -p %{buildroot}/%{static}/css mkdir -p %{buildroot}/%{static}/js for version in %{versions};do install -m 755 -d %{buildroot}/%{static}/css/v$version install -m 755 -d %{buildroot}/%{static}/js/v$version install -m 755 -d %{buildroot}/%{static}/pages/v$version done for version in %{versions};do case "$version" in 0.2) ;; 0.3) echo /extra.list > %{EXTRA_FILES} ;; 0.4) # v0.4 temp cruft install -m 755 -d %{buildroot}/%{static}/pages/v0.4/react-dashboard for x in core docs icons pages public test utils ;do install -m 755 -d %{buildroot}/%{static}/pages/v0.4/react-dashboard/$x done cat > %{EXTRA_FILES} <