Name: slswebapp Version: 1.0.1 Release: 1%{?dist} Summary: ZeroMQ to WebSocket Group: System Environment/Libraries License: LGPL v3+ Source0: %{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: cmake, nodejs Requires: nginx %global debug_package %{nil} %description Webapp %prep %setup -q %build sed -i 's/"homepage":.*/\"homepage\":\"https:\/\/'localhost'\/\",/g' package.json npm install npm run build --production mkdir build-cmake cd build-cmake cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/share/%{name} cd ../ %install rm -rf %{buildroot} cd build-cmake make install DESTDIR=%{buildroot} cd ../ rm -f %{buildroot}/usr/share/%{name}/build/env*.js ln -sfn %{_sysconfdir}/%{name}/env.production.js %{buildroot}/usr/share/%{name}/build/env.production.js %post #sed -i 's/salsahost/'$HOSTNAME'/g' %{_sysconfdir}/nginx/nginx.conf.%{name} sed -i 's/salsahost//g' %{_sysconfdir}/nginx/nginx.conf.%{name} %files %{_datadir}/%{name}/* %config(noreplace) %{_sysconfdir}/nginx/nginx.conf.http.%{name} %config(noreplace) %{_sysconfdir}/nginx/nginx.conf.https.%{name} %config(noreplace) %{_sysconfdir}/%{name}/env.production.js %changelog