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 | 5ab8ff2 | 2014-07-23 01:30:19 +0200 | [diff] [blame] | 27 | #make DESTDIR=$RPM_BUILD_ROOT RUN="RPM" install |
Tomas Cejka | 834004f | 2014-04-27 20:13:39 +0200 | [diff] [blame] | 28 | make install |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 29 | |
| 30 | %post |
| 31 | #add device module to configuration only when installing, not on update or reinstall. |
| 32 | #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] | 33 | [ -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] | 34 | 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] | 35 | service httpd restart |
| 36 | |
| 37 | %postun |
| 38 | #delete device module from configuration only when erasing, not on update. |
| 39 | #https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Running_scriptlets_only_in_certain_situations |
| 40 | service httpd restart |
| 41 | rm -f /tmp/mod_netconf.sock |
| 42 | |
| 43 | %files |
| 44 | %doc README |
| 45 | %{_libdir}/httpd/modules/*.so |
| 46 | %config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf |
| 47 | |