--- /dev/null
+--- netcf-0.2.4/configure.ac.orig 2014-05-14 12:01:08.000000000 +0200
++++ netcf-0.2.4/configure.ac 2014-05-24 07:27:55.530147003 +0200
+@@ -104,7 +104,7 @@
+ AC_MSG_CHECKING([for system init flavor])
+ AC_ARG_WITH([sysinit],
+ [AS_HELP_STRING([--with-sysinit@<:@=STYLE@:>@],
+- [Style of init script to install: initscripts, systemd,
++ [Style of init script to install: initscripts, systemd, both,
+ check, none @<:@default=check@:>@])],
+ [],[with_sysinit=check])
+
+@@ -113,6 +113,8 @@
+ ;;
+ initscripts)
+ ;;
++ both)
++ ;;
+ none)
+ ;;
+ check)
+@@ -135,8 +137,8 @@
+ with_sysinit=none
+ fi
+
+-AM_CONDITIONAL([NETCF_USE_INITSCRIPTS], test "$with_sysinit" = "initscripts")
+-AM_CONDITIONAL([NETCF_USE_SYSTEMD], test "$with_sysinit" = "systemd")
++AM_CONDITIONAL([NETCF_USE_INITSCRIPTS], test "$with_sysinit" = "initscripts" -o "$with_sysinit" = "both")
++AM_CONDITIONAL([NETCF_USE_SYSTEMD], test "$with_sysinit" = "systemd" -o "$with_sysinit" = "both")
+ AM_CONDITIONAL([NETCF_TRANSACTION_SUPPORT], test "$with_sysinit" != "none")
+ AC_MSG_RESULT($with_sysinit)
+ if test "$with_sysinit" != "none" && test "$with_driver" != "redhat"; then
+--- netcf-0.2.4/src/Makefile.am.orig 2014-05-09 13:37:17.000000000 +0200
++++ netcf-0.2.4/src/Makefile.am 2014-05-24 07:51:17.630117778 +0200
+@@ -119,10 +119,6 @@
+
+ if NETCF_DRIVER_REDHAT
+
+-install-data-local: install-sysinit
+-
+-uninstall-local: uninstall-sysinit
+-
+ # This is for the shell script that handles network config change
+ # transactions. It is used by both the initscripts and systemd
+ # flavors, as well as by libnetcf.so itself
+@@ -136,13 +132,19 @@
+
+ BUILT_SOURCES += netcf-transaction.sh
+
++INSTALL_TARGETS =
++UNINSTALL_TARGETS =
++
+ if NETCF_USE_INITSCRIPTS
+-install-sysinit: netcf-transaction.init
++INSTALL_TARGETS += install-sysinit-init
++UNINSTALL_TARGETS += uninstall-sysinit-init
++
++install-sysinit-init: netcf-transaction.init
+ $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
+ $(INSTALL_SCRIPT) netcf-transaction.init \
+ $(DESTDIR)$(sysconfdir)/rc.d/init.d/netcf-transaction
+
+-uninstall-sysinit:
++uninstall-sysinit-init:
+ rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/netcf-transaction \
+ $(DESTDIR)$(sysconfdir)/sysconfig/netcf-transaction
+
+@@ -157,17 +159,20 @@
+
+ BUILT_SOURCES += netcf-transaction.init
+
+-else ! NETCF_USE_INITSCRIPTS
++endif NETCF_USE_INITSCRIPTS
+
+ if NETCF_USE_SYSTEMD
++INSTALL_TARGETS += install-sysinit-systemd
++UNINSTALL_TARGETS += uninstall-sysinit-systemd
++
+ SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
+
+-install-sysinit: netcf-transaction.service
++install-sysinit-systemd: netcf-transaction.service
+ $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
+ $(INSTALL_DATA) netcf-transaction.service \
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/netcf-transaction.service
+
+-uninstall-sysinit:
++uninstall-sysinit-systemd:
+ rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/netcf-transaction.service
+ rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
+
+@@ -180,11 +185,12 @@
+
+ BUILT_SOURCES += netcf-transaction.service
+
+-else ! NETCF_USE_SYSTEMD
+-install-sysinit:
+-uninstall-sysinit:
+-endif ! NETCF_USE_SYSTEMD
+-endif ! NETCF_USE_INITSCRIPTS
++endif NETCF_USE_SYSTEMD
++
++install-data-local: $(INSTALL_TARGETS)
++
++uninstall-local: $(UNINSTALL_TARGETS)
++
+ endif NETCF_DRIVER_REDHAT
+
+ DISTCLEANFILES += $(BUILT_SOURCES)
Summary: netcf - a cross-platform network configuration library
Summary(pl.UTF-8): netcf - wieloplatformowa biblioteka do konfiguracji sieci
Name: netcf
-Version: 0.2.3
-Release: 3
+Version: 0.2.4
+Release: 1
License: GPL v2
Group: Administration/System
Source0: https://fedorahosted.org/released/netcf/%{name}-%{version}.tar.gz
-# Source0-md5: bee292470b06201b59af0fad473a1b65
+# Source0-md5: 91d3a8e26544406ad4b3a1ee376ef6d8
Patch0: %{name}-pld_interfaces.patch
+Patch1: %{name}-systemd.patch
URL: https://fedorahosted.org/netcf/
BuildRequires: autoconf >= 2.50
BuildRequires: automake >= 1:1.11
%prep
%setup -q
%patch0 -p1
+%patch1 -p1 -b .orig
%build
%{__libtoolize}
%{__automake}
%configure \
--disable-silent-rules \
- --with-driver=redhat
+ --with-driver=redhat \
+ --with-sysinit=both
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+ DESTDIR=$RPM_BUILD_ROOT \
+ SYSTEMD_UNIT_DIR=%{systemdunitdir}
%clean
rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ncftool
%attr(754,root,root) /etc/rc.d/init.d/netcf-transaction
+%attr(754,root,root) %{_libexecdir}/netcf-transaction.sh
+%{systemdunitdir}/netcf-transaction.service
%{_datadir}/netcf
%{_mandir}/man1/ncftool.1*
%files libs
%defattr(644,root,root,755)
+%doc AUTHORS NEWS README
%attr(755,root,root) %{_libdir}/libnetcf.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libnetcf.so.1