blob: eb03869b80f79185b237567c491c61b7b2912d5a [file] [log] [blame]
Tomas Cejka834004f2014-04-27 20:13:39 +02001Summary: Netopeer-GUI (backend)
Tomas Cejka96f4e612012-12-10 00:03:32 +01002Name: mod_netconf
Tomas Cejka834004f2014-04-27 20:13:39 +02003Version: @VERSION@
Tomas Cejka96f4e612012-12-10 00:03:32 +01004Release: @RELEASE@
Tomas Cejka834004f2014-04-27 20:13:39 +02005URL: https://github.com/CESNET/mod_netconf
6Source: %{name}-%{version}-%{release}.tar.gz
Tomas Cejka96f4e612012-12-10 00:03:32 +01007Group: Liberouter
8License: BSD
9Vendor: CESNET, z.s.p.o.
10Packager: @USERNAME@ <@USERMAIL@>
11BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
12
Tomas Cejka834004f2014-04-27 20:13:39 +020013BuildRequires: apr apr-util libxml2-devel json-c-devel libwebsockets-devel libnetconf-devel
14Requires: json-c libwebsockets libnetconf httpd libxml2
Tomas Cejka96f4e612012-12-10 00:03:32 +010015
16%description
Tomas Cejka834004f2014-04-27 20:13:39 +020017Backend for Netopeer-GUI, available at https://github.com/CESNET/Netopeer-GUI
Tomas Cejka96f4e612012-12-10 00:03:32 +010018
19%prep
20%setup
21
22%build
Tomas Cejka834004f2014-04-27 20:13:39 +020023%configure --prefix="$RPM_BUILD_ROOT" httpdmoduledir="/usr/lib64/httpd/modules" httpdconfddir="/etc/httpd/conf.d"
Tomas Cejka96f4e612012-12-10 00:03:32 +010024make
25
26%install
Tomas Cejka834004f2014-04-27 20:13:39 +020027make install
Tomas Cejka96f4e612012-12-10 00:03:32 +010028
29%post
30#add device module to configuration only when installing, not on update or reinstall.
31#https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Running_scriptlets_only_in_certain_situations
Tomas Cejkaba21b382013-04-13 02:37:32 +020032[ -d /var/run/httpd ] || { mkdir -p /var/run/httpd && chown apache:apache /var/run/httpd; }
Tomas Cejka438142c2013-11-17 23:57:30 +010033chcon system_u:object_r:httpd_modules_t:s0 /etc/httpd/modules/mod_netconf.so
Tomas Cejka96f4e612012-12-10 00:03:32 +010034service httpd restart
35
36%postun
37#delete device module from configuration only when erasing, not on update.
38#https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Running_scriptlets_only_in_certain_situations
39service httpd restart
40rm -f /tmp/mod_netconf.sock
41
42%files
43%doc README
44%{_libdir}/httpd/modules/*.so
45%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
46