diff --git a/apt-repo-updater/DEBBUILD b/apt-repo-updater/DEBBUILD new file mode 100644 index 0000000..6bd3cec --- /dev/null +++ b/apt-repo-updater/DEBBUILD @@ -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 " + +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" +} diff --git a/apt-repo-updater/materials/apt-repo-updater.service b/apt-repo-updater/materials/apt-repo-updater.service new file mode 100644 index 0000000..e29d6a6 --- /dev/null +++ b/apt-repo-updater/materials/apt-repo-updater.service @@ -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