Commit 997a4695 authored by Seblu's avatar Seblu

Add a PKGBUILD

Ship a reference PKGBUILD and related files to quickly setup an archive.
parent c08fd674
# Maintainer: Sébastien Luttringer
pkgname=archivetools-git
pkgver="$(git log --pretty=format:''|wc -l)"
pkgrel=1
pkgdesc='Archlinux Archive Tools (Git version)'
arch=('any')
url='https://github.com/seblu/archivetools'
license=('GPL2')
depends=('rsync' 'openssh' 'hardlink' 'xz' 'util-linux')
backup=('etc/archive.conf')
install=archivetools.install
package() {
cd "$startdir"
install -Dm644 archive.conf "$pkgdir/etc/archive.conf"
install -Dm755 archive.sh "$pkgdir/usr/bin/archive"
# systemd stuff
install -Dm644 archive.sysusers "$pkgdir/usr/lib/sysusers.d/archive.conf"
install -Dm644 archive.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/archive.conf"
install -Dm644 archive.service "$pkgdir/usr/lib/systemd/system/archive.service"
install -Dm644 archive.timer "$pkgdir/usr/lib/systemd/system/archive.timer"
}
# vim:set ts=2 sw=2 et:
[Unit]
Description=Archive Update
[Service]
Type=oneshot
User=archive
Group=archive
ExecStart=/usr/bin/archive
u archive - -
[Unit]
Description=Daily Archive update
[Timer]
OnCalendar=12:42:00
AccuracySec=1m
Persistent=true
[Install]
WantedBy=timers.target
d /srv/archive 0755 archive archive
#/bin/bash
# arg 1: the new package version
post_install() {
systemd-sysusers archive.conf
systemd-tmpfiles --create archive.conf
:
}
# vim:set ts=2 sw=2 ft=sh et:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment