blob: fd57b3ff2b4ab66aacdaaa6c52e90352559f55b5 [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 Cejka96f4e612012-12-10 00:03:32 +010033service httpd restart
34
35%postun
36#delete device module from configuration only when erasing, not on update.
37#https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Running_scriptlets_only_in_certain_situations
38service httpd restart
39rm -f /tmp/mod_netconf.sock
40
41%files
42%doc README
43%{_libdir}/httpd/modules/*.so
44%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
45