CHANGE mod_netconf renamed to netopeerguid
Now installing as a service netopeerguid.rc.
diff --git a/netopeerguid.spec.in b/netopeerguid.spec.in
new file mode 100644
index 0000000..d20c23b
--- /dev/null
+++ b/netopeerguid.spec.in
@@ -0,0 +1,42 @@
+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
+%doc README