blob: 88bc5cfc6f49c7292b1ee846391769dd2682b061 [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
17Web user interface for Netopeer client using Symfony2 framework.
18
19%prep
20%setup
21
22%build
Tomas Cejkaba21b382013-04-13 02:37:32 +020023%configure --with-distro=@DISTRO@ @LIBNETCONF_WITH@ --with-notifications;
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