Tomas Cejka | 834004f | 2014-04-27 20:13:39 +0200 | [diff] [blame] | 1 | Summary: Netopeer-GUI (backend) |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 2 | Name: mod_netconf |
Tomas Cejka | 834004f | 2014-04-27 20:13:39 +0200 | [diff] [blame] | 3 | Version: @VERSION@ |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 4 | Release: @RELEASE@ |
Tomas Cejka | 834004f | 2014-04-27 20:13:39 +0200 | [diff] [blame] | 5 | URL: https://github.com/CESNET/mod_netconf |
| 6 | Source: %{name}-%{version}-%{release}.tar.gz |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 7 | Group: Liberouter |
| 8 | License: BSD |
| 9 | Vendor: CESNET, z.s.p.o. |
| 10 | Packager: @USERNAME@ <@USERMAIL@> |
| 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} |
| 12 | |
Tomas Cejka | 834004f | 2014-04-27 20:13:39 +0200 | [diff] [blame] | 13 | BuildRequires: apr apr-util libxml2-devel json-c-devel libwebsockets-devel libnetconf-devel |
| 14 | Requires: json-c libwebsockets libnetconf httpd libxml2 |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 15 | |
| 16 | %description |
Tomas Cejka | 834004f | 2014-04-27 20:13:39 +0200 | [diff] [blame] | 17 | Backend for Netopeer-GUI, available at https://github.com/CESNET/Netopeer-GUI |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 18 | |
| 19 | %prep |
| 20 | %setup |
| 21 | |
| 22 | %build |
Tomas Cejka | 834004f | 2014-04-27 20:13:39 +0200 | [diff] [blame] | 23 | %configure --prefix="$RPM_BUILD_ROOT" httpdmoduledir="/usr/lib64/httpd/modules" httpdconfddir="/etc/httpd/conf.d" |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 24 | make |
| 25 | |
| 26 | %install |
Tomas Cejka | 834004f | 2014-04-27 20:13:39 +0200 | [diff] [blame] | 27 | make install |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 28 | |
| 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 Cejka | ba21b38 | 2013-04-13 02:37:32 +0200 | [diff] [blame] | 32 | [ -d /var/run/httpd ] || { mkdir -p /var/run/httpd && chown apache:apache /var/run/httpd; } |
Tomas Cejka | 438142c | 2013-11-17 23:57:30 +0100 | [diff] [blame] | 33 | chcon system_u:object_r:httpd_modules_t:s0 /etc/httpd/modules/mod_netconf.so |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 34 | service 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 |
| 39 | service httpd restart |
| 40 | rm -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 | |