blob: e40e980fc943af5a11109f03f43ca1b99da5eb6b [file] [log] [blame]
Summary: Netopeer-GUI (backend)
Name: netopeerguid
Version: @VERSION@
Release: @RELEASE@
URL: https://github.com/CESNET/mod_netconf
Source: %{name}-%{version}-%{release}.tar.gz
Group: Liberouter
License: BSD
Vendor: CESNET, z.s.p.o.
Packager: @USERNAME@ <@USERMAIL@>
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
BuildRequires: json-c-devel libwebsockets-devel libnetconf-devel libyang-devel
Requires: json-c libwebsockets libnetconf libyang
%description
Backend for Netopeer-GUI, available at https://github.com/CESNET/Netopeer-GUI
%prep
%setup
%build
%configure --prefix="$RPM_BUILD_ROOT"
make
%install
#make DESTDIR=$RPM_BUILD_ROOT RUN="RPM" install
make install
%post
#add device module to configuration only when installing, not on update or reinstall.
#https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Running_scriptlets_only_in_certain_situations
service netopeerguid.rc restart
%postun
#delete device module from configuration only when erasing, not on update.
#https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Running_scriptlets_only_in_certain_situations
service netopeerguid.rc stop
rm -f /var/run/netopeerguid.sock
%files
%{_bindir}/netopeerguid
%doc README
@SYSTEMD_SERVICE_FILE@