%global debug_package %{nil} %global source_date_epoch_from_changelog 0 Name: zmq2ws Version: 1.20231012.0 Release: 1%{?dist} Summary: ZeroMQ to WebSocket Group: System Environment/Libraries License: LGPL v3+ Source0: %{name}-%{version}.tar.gz BuildRequires: cmake, zeromq-devel, gcc-c++, python3-setuptools BuildRequires: systemd Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Requires: zeromq, nodejs %if 0%{?rhel} == 7 || 0%{?el7} == 1 BuildRequires: nodejs, npm %else BuildRequires: nodejs, npm, python3 %endif %global debug_package %{nil} %description ZeroMQ to WebSocket broker %prep %setup -q %build npm install npm run build mkdir build cd build cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/share/%{name} cd ../ %install rm -rf %{buildroot} cd build make install DESTDIR=%{buildroot} cd ../ ln -sfn %{_sysconfdir}/%{name}/config.yml %{buildroot}%{_datadir}/%{name}/config.yml %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service # Restarting %{name}.service (maybe we don't want it) %postun %systemd_postun_with_restart %{name}.service %files %{_datadir}/%{name}/* %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config(noreplace) %{_sysconfdir}/%{name}/config.yml %{_unitdir}/%{name}.service %changelog