LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cisco_backup.spec of Package cisco_backup (Project home:lrupp)

#
# spec file for package cisco_backup
#
# Copyright (c) 2016 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:           cisco_backup
Version:        0.1
Release:        0
License:        BSD-3-Clause
Summary:        Cisco backup scripts
Url:            https://www.suse.com
Group:          System/Monitoring
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  atftp 
Requires:       python-Gelatin
Requires:       python-SimpleParse
Requires:       expect
Requires:       python-lxml
Requires:       python-xml
Requires:       python-libxml2
Requires:       bash
PreReq:         %fillup_prereq
Requires:       logrotate
Requires:       cron
Requires:       mailx
Requires:       tftp(server) 
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif

%description
This repository contains the scripts we use to run a backup of 
all our Cisco switches.

This includes (for example) a push into a version control system 
like SVN or GIT - and everything that is needed to generate a 
working RPM package out of that all.


%prep
%setup -q

%build

%install
cp -r * %{buildroot}/
rm %{buildroot}/README*
for dir in %{_fillupdir} /var/log/switchbackup /srv/tftpboot/switchbackup /srv/tftpboot/switchbackup_xml /srv/tftpboot/switchbackup_svn ; do
	mkdir -p %{buildroot}/$dir
done
mv %{buildroot}/%{_sysconfdir}/sysconfig/%{name} %buildroot/%{_fillupdir}/sysconfig.%{name}


%post
%{fillup_only %name}


%files
%defattr(-,root,root)
%doc README*
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/cisco_backup
%dir /var/log/switchbackup
%dir /srv/tftpboot/switchbackup
%dir /srv/tftpboot/switchbackup_xml  
%if 0%{?suse_version} >= 01500
%dir %{_fillupdir}
%endif
%{_fillupdir}/sysconfig.%{name}

%changelog