blob: b071560cb4e833b6a0cae97fa5243f6c3890a3a4 [file] [log] [blame]
Tomas Cejka96f4e612012-12-10 00:03:32 +01001Summary: Netopeer - client web user interface
2Name: mod_netconf
3Version: %(cut -f1 ./VERSION | tr -d '\n')
4Release: @RELEASE@
5URL: http://www.liberouter.org/
6Source: https://www.liberouter.org/repo/SOURCES/%{name}-%{version}-%{release}.tar.gz
7Group: Liberouter
8License: BSD
9Vendor: CESNET, z.s.p.o.
10Packager: @USERNAME@ <@USERMAIL@>
11BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
12
13BuildRequires: @BUILDREQS@
14Requires: @REQS@
15
16%description
Tomas Cejkab4cd6dc2013-07-05 11:08:57 +020017Back-end for web user interface of Netopeer client.
Tomas Cejka96f4e612012-12-10 00:03:32 +010018
19%prep
20%setup
21
22%build
Tomas Cejka23d4f342013-07-05 10:01:57 +020023%configure @LIBNETCONF_WITH@;
Tomas Cejka96f4e612012-12-10 00:03:32 +010024make
25
26%install
27make DESTDIR=$RPM_BUILD_ROOT RUN="RPM" install
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 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