Add debian packaging files

This commit is contained in:
wpetit 2020-10-13 15:37:16 +02:00
parent 06a58fed89
commit 28c1f6528c
7 changed files with 61 additions and 0 deletions

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

14
debian/control vendored Normal file
View File

@ -0,0 +1,14 @@
Source: postgres-backup
Section: unknown
Priority: optional
Maintainer: Cadoles <contact@cadoles.com>
Build-Depends: debhelper (>= 8.0.0), dh-systemd (>= 1.5)
Standards-Version: 3.9.4
Homepage: http://forge.cadoles.com/Cadoles/postgres-backup
Vcs-Git: http://forge.cadoles.com/Cadoles/postgres-backup.git
Vcs-Browser: http://forge.cadoles.com/Cadoles/postgres-backup
Package: postgres-backup
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: PostgreSQL backup scripts

3
debian/postgres-backup.links vendored Normal file
View File

@ -0,0 +1,3 @@
/etc/postgres-backup/ /usr/share/postgres-backup/pg_backup.conf
/usr/bin/ /usr/share/postgres-backup/pg_backup.sh
/usr/bin/ /usr/share/postgres-backup/pg_backup_rotated.sh

9
debian/postgres-backup.service vendored Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Run PostgreSQL backup
[Service]
Type=oneshot
ExecStart=/usr/bin/pg_backup_rotated.sh
[Install]
WantedBy=default.target

9
debian/postgres-backup.timer vendored Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Timer for periodic execution of postgres-backup service.
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target

24
debian/rules vendored Normal file
View File

@ -0,0 +1,24 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
%:
dh $@ --with systemd
override_dh_auto_install:
mkdir -p debian/postgres-backup/usr/share/postgres-backup
mkdir -p debian/postgres-backup/etc/postgres-backup
mkdir -p debian/postgres-backup/usr/bin
cp script/pg_backup.sh debian/postgres-backup/usr/share/postgres-backup/pg_backup.sh
cp script/pg_backup_rotated.sh debian/postgres-backup/usr/share/postgres-backup/pg_backup_rotated.sh
cp conf/pg_backup.conf debian/postgres-backup/usr/share/postgres-backup/pg_backup.conf
chmod +x debian/postgres-backup/usr/share/postgres-backup/pg_backup_rotated.sh
chmod +x debian/postgres-backup/usr/share/postgres-backup/pg_backup.sh
install -D -m 644 debian/postgres-backup.timer debian/postgres-backup/lib/systemd/system/postgres-backup.timer
install -d debian/postgres-backup

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)