Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lrupp
postgresql-backupscript
postgresql-backupscript.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File postgresql-backupscript.spec of Package postgresql-backupscript
# # spec file for package postgresql-backupscript # # Copyright (c) 2019 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 https://bugs.opensuse.org/ # %if ! %{defined _fillupdir} %define _fillupdir %{_localstatedir}/adm/fillup-templates %endif %if 0%{?suse_version} >= 1210 %bcond_without systemd %else %bcond_with systemd %endif Name: postgresql-backupscript Version: 2.0 Release: 0 Summary: Simple postgresql database backup License: BSD-4-Clause Group: System/Monitoring Url: https://www.opensuse.org/ Source1: postgresql-backupscript Source2: postgresql-backupscript.sysconfig Source3: postgresql-backup.logrotate Source4: README.SUSE Source5: LICENSE Source6: %{name}.timer Source7: %{name}.service Source8: repmgr_start_slave_after_dump.sh Source9: repmgr_stop_slave_before_dump.sh Source20: update-message Requires: logrotate Requires: mailx Requires: postgresql Requires(post): %fillup_prereq BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-build %if %{with systemd} BuildRequires: systemd-rpm-macros Requires(pre): systemd %{?systemd_requires} %else Requires: cron %endif %description This package contains a simple postgresql database backup script running daily. %prep install -m644 %{SOURCE5} . install -m644 %{SOURCE4} . mkdir examples install -m755 %{SOURCE8} examples/repmgr_start_slave_after_dump.sh install -m755 %{SOURCE8} examples/repmgr_stop_slave_before_dump.sh %build # %install install -Dm755 %{SOURCE1} %{buildroot}/%{_sbindir}/postgresql-backupscript %if %{with systemd} install -Dm644 %{SOURCE7} %{buildroot}%{_unitdir}/%{name}.service install -Dm644 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}.timer ln -s %{_sbindir}/%{name} %{buildroot}%{_sbindir}/rc%{name} %else mkdir -p %{buildroot}/%{_sysconfdir}/cron.daily ln -s %{_sbindir}/%{name} %{buildroot}%{_sysconfdir}/cron.daily/suse.de-mysql-backup %endif install -Dm644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.postgresql-backupscript install -Dm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -Dm644 %{SOURCE20} %{buildroot}%{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} %check output=$(%buildroot/%{_sbindir}/%{name} -h 2>&1) || : exit_code=$(echo $?) expected_exit_code=0 if [ "$exit_code" != "$expected_exit_code" ]; then echo "ERROR: exit code is not as expected: $exit_code" exit 1 fi %if %{with systemd} %pre %service_add_pre %{name}.service %{name}.timer %post %service_add_post %{name}.service %{name}.timer # enable the timer if the package is installed for the first time if [ ${1:-0} -eq 1 ]; then %{_bindir}/systemctl enable %{name}.timer %{_bindir}/systemctl start %{name}.timer fi %{fillup_only %name} %preun %service_del_preun %{name}.service %{name}.timer %postun %service_del_postun %{name}.service %{name}.timer %else %post %{fillup_only %{name}} %endif %files %defattr(-,root,root) %doc README* examples %if 0%{?suse_version} >= 1500 %license LICENSE %else %doc LICENSE %endif %if %{with systemd} %{_unitdir}/%{name}.service %{_unitdir}/%{name}.timer %{_sbindir}/rc%{name} %else %{_sysconfdir}/cron.daily/suse.de-mysql-backup %endif %{_sbindir}/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %if %{?suse_version} < 1230 && %{?suse_version} > 1140 %dir %{_fillupdir} %endif %{_fillupdir}/sysconfig.postgresql-backupscript %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor