aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configs/config10
-rw-r--r--pkgbuild/PKGBUILD4
-rwxr-xr-xscripts/build_packages.sh4
-rwxr-xr-xscripts/update_repo.sh6
4 files changed, 23 insertions, 1 deletions
diff --git a/configs/config b/configs/config
new file mode 100644
index 0000000..6ebf0ba
--- /dev/null
+++ b/configs/config
@@ -0,0 +1,10 @@
+# vi: ft=sh
+
+# Force rebuild of every package, even if it already exists
+#FORCE_REBUILD=no
+
+# Packager identification
+#PACKAGER="John Doe <John.Doe@example.com>"
+
+# name of the repository. This name has to be used in pacman.conf
+#REPONAME="repo"
diff --git a/pkgbuild/PKGBUILD b/pkgbuild/PKGBUILD
index 93d4710..d82a5ef 100644
--- a/pkgbuild/PKGBUILD
+++ b/pkgbuild/PKGBUILD
@@ -13,6 +13,10 @@ optdepends=()
source=(git+$url.git)
sha256sums=( SKIP )
install=$pkgname.install
+backup=(
+ etc/aurbuilder/packages
+ etc/aurbuilder/config
+)
pkgver() {
date +%Y%m%d
diff --git a/scripts/build_packages.sh b/scripts/build_packages.sh
index 34bbb15..05c3f54 100755
--- a/scripts/build_packages.sh
+++ b/scripts/build_packages.sh
@@ -1,11 +1,14 @@
#!/bin/bash
+test -f /etc/aurbuilder/config && source /etc/aurbuilder/config
+
PODMAN=$(which podman)
CONFFILE=${CONFFILE:-/etc/aurbuilder/packages}
OUTPUT=${OUTPUT:-/srv/pkg/}
FORCE_REBUILD=${FORCE_REBUILD:-no}
CHOWN_TO=${CHOWN_TO:-$USER}
+PACKAGER=${PACKAGER:-"John Doe <John.Doe@example.com>"}
if ! ($PODMAN image list | grep aurbuilder > /dev/null); then
echo Container image \"aurbuilder\" was not found. Was it built?
@@ -28,6 +31,7 @@ while read -r LINE; do
--env PACKAGE_NAME="$LINE" \
--env FORCE_REBUILD="$FORCE_REBUILD" \
--env CHOWN="$(id -u "$CHOWN_TO"):$(id -g "$CHOWN_TO")" \
+ --env PACKAGER="$PACKAGER" \
-v "$OUTPUT:/pkgout:z" \
aurbuilder
diff --git a/scripts/update_repo.sh b/scripts/update_repo.sh
index 6e51754..2b0dbe2 100755
--- a/scripts/update_repo.sh
+++ b/scripts/update_repo.sh
@@ -1,5 +1,9 @@
#!/bin/bash
+test -f /etc/aurbuilder/config && source /etc/aurbuilder/config
+
OUTPUT=${OUTPUT:-/srv/pkg/}
-repo-add -p -R "$OUTPUT/repo.db.tar.gz" "$OUTPUT/"*.pkg.* || exit 1
+REPONAME=${REPONAME:-repo}
+
+repo-add -p -R "$OUTPUT/$REPONAME.db.tar.gz" "$OUTPUT/"*.pkg.* || exit 1
rm -f "$OUTDIR/"*.old