Nightscout now builds
This commit is contained in:
parent
68b706a565
commit
255a29b9fb
2 changed files with 11 additions and 8 deletions
|
@ -17,7 +17,6 @@ DevicePolicy=closed
|
||||||
|
|
||||||
ProtectSystem=strict
|
ProtectSystem=strict
|
||||||
ProtectHome=tmpfs
|
ProtectHome=tmpfs
|
||||||
BindPaths=/home/git
|
|
||||||
ProtectControlGroups=yes
|
ProtectControlGroups=yes
|
||||||
ProtectKernelModules=yes
|
ProtectKernelModules=yes
|
||||||
ProtectKernelTunables=yes
|
ProtectKernelTunables=yes
|
||||||
|
|
|
@ -26,11 +26,9 @@ Nightscout CGM in the cloud.
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post nightscout.service
|
%systemd_post nightscout.service
|
||||||
|
|
||||||
if [ "$1" = 1 ]; then
|
if [ "$1" = 1 ]; then
|
||||||
pushd %{nodejs_sitelib}/%{name}
|
pushd %{nodejs_sitelib}/%{name}
|
||||||
node bin/generateRandomString.js > %{_sysconfdir}/nightscout/randomString
|
node bin/generateRandomString.js > %{_sysconfdir}/nightscout/randomString
|
||||||
ln -s %{_sysconfdir}/nightscout/randomString tmp/randomString
|
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,16 +42,22 @@ fi
|
||||||
%forgesetup
|
%forgesetup
|
||||||
|
|
||||||
%build
|
%build
|
||||||
npm install --no-audit --no-fund --omit=dev --ignore-scripts
|
npm install --no-audit --no-fund --omit=dev
|
||||||
#webpack --mode production --config webpack/webpack.config.js
|
rm tmp/randomString
|
||||||
|
ln -s %{_sysconfdir}/nightscout/randomString tmp/randomString
|
||||||
|
chmod -R -x+X *
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{nodejs_sitelib}/%{name}
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{name}
|
||||||
cp -r --no-preserve=mode,ownership * %{buildroot}%{nodejs_sitelib}/%{name}
|
cp -pr \
|
||||||
chmod -R -x %{buildroot}%{nodejs_sitelib}/%{name}
|
package.json \
|
||||||
|
lib \
|
||||||
|
server.js \
|
||||||
|
bundle \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/%{name}
|
||||||
|
cp -pr node_modules %{buildroot}%{nodejs_sitelib}/%{name}
|
||||||
|
|
||||||
install -D docs/example-template.env %{buildroot}%{_sysconfdir}/nightscout/nightscout-environ
|
install -D docs/example-template.env %{buildroot}%{_sysconfdir}/nightscout/nightscout-environ
|
||||||
|
|
||||||
install -D %{SOURCE1} %{buildroot}%{_unitdir}/nightscout.service
|
install -D %{SOURCE1} %{buildroot}%{_unitdir}/nightscout.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
|
Loading…
Reference in a new issue