Name: zmq2ws Version: 1.0.0 Release: 0.1.rc12%{?dist} Summary: ZeroMQ to WebSocket Group: System Environment/Libraries License: LGPL v3+ Source0: %{name}-%{version}.tar.gz BuildRequires: cmake, zeromq-devel, nodejs BuildRequires: systemd Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Requires: zeromq, nodejs %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