# # spec file for package ncf # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: ncf %define srcname %{name}-master # from cfengine.spec %define basedir /var/cfengine Summary: A powerful and structured CFEngine framework License: GPL-3.0 Group: Productivity/Networking/System Version: 0.0.1 Release: 0 Url: https://github.com/Normation/ncf Source: %{srcname}.tar.gz # use installed tree/tools dir, kkaempf@suse.de Patch: 0001-Use-the-installed-ncf-tools-dir.patch # wtf? SLE_11 does not honor rpmlintrc %if 0%{?suse_version} <= 1130 BuildRequires: -post-build-checks %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: cfengine-masterfiles Requires: python >= 2.6 BuildRequires: python >= 2.6 BuildArch: noarch # BuildRequires: fakeroot %description CFEngine 3 is a powerful configuration management tool that's speed, small footprint, multi-platform support, network resilience and agent-based approach attract many. However, many have a hard time with the language and tooling, and need an easier way. CFEngine has been described as flour, eggs, milk and butter: all the ingredients needed to make a cake, but no recipe. ncf is that missing recipe - and much more. ncf is a framework that runs in pure CFEngine language, to help structure your CFEngine policy and provide reusable, single purpose components distributed under the GPLv3 license. %prep %setup -q -n %{srcname} %patch -p1 %build %install install -d %{buildroot}%{_bindir} install -m 755 ncf %{buildroot}%{_bindir} install -d %{buildroot}%{_datadir}/ncf install -d %{buildroot}%{_datadir}/ncf/tools install -m 755 tools/ncf.py %{buildroot}%{_datadir}/ncf/tools install -m 755 tools/get_promises.py %{buildroot}%{_datadir}/ncf/tools install -m 755 tools/ncf_rudder.py %{buildroot}%{_datadir}/ncf/tools cp -a tree %{buildroot}%{_datadir}/ncf rm -rf %{buildroot}%{_datadir}/ncf/tools/.placeholder %post ncf init %{basedir}/masterfiles || echo "Old installation of NCF found, please run 'ncf init %{basedir}/masterfiles' manually" %postun for d in 10_ncf_internals 20_cfe_basics 30_generic_methods 40_it_ops_knowledge 50_techniques 60_services ncf.conf service_mapping.cf; do rm -rf %{basedir}/masterfiles/$d done %files %defattr(-,root,root) %doc README.md %doc LICENSE %dir %{_datadir}/ncf %{_datadir}/ncf %{_bindir}/ncf %changelog