LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File mysql-backupscript.spec of Package mysql-backupscript (Project home:lrupp)

#
# spec file for package mysql-backupscript
#
# Copyright (c) 2009-2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015-2016 SUSE LINUX 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:           mysql-backupscript
Summary:        Simple mysql database backup
Version:        1.9.4
Release:        1
License:        BSD-3-Clause
Group:          System/Monitoring
Url:            https://github.com/openSUSE/mysql-backupscript
Source1:        suse.de-mysql-backup
Source2:        mysql-backup.sysconfig
Source3:        mysql-backup.logrotate
Source4:        README.SUSE
Source5:        LICENSE
PreReq:         %fillup_prereq
Requires:       logrotate
Requires:       mysql-client
Requires:       net-tools
Requires:       cron
Requires:       mailx
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-build
%if ! %{defined _fillupdir}
  %define _fillupdir /var/adm/fillup-templates
%endif

%description
This package contains a simple mysql database backup script
running daily.

To restore, simply 'cd' into the backup directory of your 
choise (configured in /etc/sysconfig/mysql-backupscript), 
bunzip2 the database file you want to restore and run:
  mysql < $dbfile
That's it. The script also copies your /etc/my.cnf away, so
you have something at hand if you played too much with the 
settings there ;-)

More information can be found in 
 /usr/share/doc/packages/%{name}/README.SUSE

Author: 
-------
    Lars Vogdt

%prep
#

%build
#

%install
mkdir -p %buildroot/%{_sysconfdir}/cron.daily
install -m755 %{SOURCE1} %buildroot/%{_sysconfdir}/cron.daily/suse.de-mysql-backup
sed -i "s|__READMEFILE__|%{_defaultdocdir}/%{name}/README.SuSE|g" \
		%buildroot/%{_sysconfdir}/cron.daily/suse.de-mysql-backup
install -Dm644 %{SOURCE2} %buildroot/%{_fillupdir}/sysconfig.mysql-backupscript
install -Dm644 %{SOURCE3} %buildroot/%{_sysconfdir}/logrotate.d/%name
install -Dm644 %{SOURCE4} %buildroot/%{_defaultdocdir}/%{name}/README.SUSE
install -Dm644 %{SOURCE5} %buildroot/%{_defaultdocdir}/%{name}/LICENSE

%clean
rm -rf %buildroot

%post
%{fillup_only %name}

%files
%defattr(-, root, root)
%doc %{_defaultdocdir}/%{name}
%config %{_sysconfdir}/cron.daily/suse.de-mysql-backup
%config(noreplace) %{_sysconfdir}/logrotate.d/%name
%if %{?suse_version} < 1230
%dir %{_fillupdir}
%endif
%{_fillupdir}/sysconfig.mysql-backupscript

%changelog