add package apt-repo-updater

This commit is contained in:
leafee98 2023-08-04 17:34:34 +08:00
parent cadaeb7485
commit 362c5bf523
2 changed files with 39 additions and 0 deletions

29
apt-repo-updater/DEBBUILD Normal file
View file

@ -0,0 +1,29 @@
#/usr/bin/env bash
pkgname="apt-repo-updater-git"
pkgver=0.0.1.0.g8a9cb1e
pkgrel=1
arch="all"
pkgcommit=""
section="utils" # https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
priority="optional" # https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
pkgdesc="monitor a dir and execute reprepro to include new .deb files"
url="https://git.leafee98.com/leafee98/apt-repo-updater"
maintainer="Leafee98 <me@leafee98.com>"
source=(
"apt-repo-updater::git+https://git.leafee98.com/leafee98/apt-repo-updater.git"
"apt-repo-updater.service::materials/apt-repo-updater.service"
)
function pkgver {
(
cd apt-repo-updater
git describe --tags --long | sed 's/^v//;s/-/./g'
)
}
function package {
install -Dm755 "${srcdir}/apt-repo-updater/apt-repo-updater" "${pkgdir}/usr/bin/apt-repo-updater"
install -Dm644 "${srcdir}/apt-repo-updater.service" "${pkgdir}/usr/lib/systemd/system/apt-repo-updater.service"
}

View file

@ -0,0 +1,10 @@
[Unit]
Description=monitor a dir and execute reprepro to include new .deb files
[Service]
# dont just start this service, use your own overwrited service
ExecStart=/usr/bin/apt-repo-updater --work-dir /srv/apt-repo-updater
Restart=on-failure
[Install]
WantedBy=multi-user.target