aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD34
-rw-r--r--Readme.md13
-rwxr-xr-xbuild.sh6
-rwxr-xr-xcontainer/bin/buildpackage.sh1
-rwxr-xr-xtestrun.sh3
5 files changed, 52 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..e5f4d71
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Your Name <youremail@domain.com>
+pkgname=aurbuilder
+pkgver=0.0
+pkgrel=1
+pkgdesc="AUR Package builder"
+arch=( any )
+url="https://gitea.lauch.link/jonas/aurbuilder"
+license=('CUSTOM')
+groups=()
+depends=( podman bash )
+makedepends=()
+optdepends=()
+source=(git+$url.git)
+sha256sums=( SKIP ) #autofill using updpkgsums
+install=$pkgname.install
+
+pkgver() {
+ date +%Y%m%d
+}
+
+build() {
+ cd "$pkgname"
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ install -Dt $pkgdir/usr/share/aurbuilder container/{Dockerfile,sudoers}
+ install -Dt $pkgdir/usr/share/aurbuilder/bin container/bin/*
+ install -Dt $pkgdir/usr/lib/aurbuilder scripts/*
+ install -Dt $pkgdir/usr/lib/systemd/system unitfiles/*
+ install -Dt $pkgdir/etc/aurbuilder configs/*
+
+}
+
diff --git a/Readme.md b/Readme.md
index 3dea85b..1b8c027 100644
--- a/Readme.md
+++ b/Readme.md
@@ -2,9 +2,20 @@
Docker base AUR Package builder for local arch repo
+
+
## Locations
-* Output, db and webroot `/srv/arch/`
+| localtion | description |
+| --- | --- |
+| `/srv/pkg` | Package output directory |
+| `/etc/aurbuilder` | Configuration files |
+| `/var/lib/aurbuilder` | Homedir of user (for podman storage) |
+| `/usr/share/aurbuilder` | Container buildfiles |
+| `/usr/lib/aurbuilder` | Executables |
+| `/usr/lib/systemd/system` | Systemd Unitfiles |
+
+* Output, db and webroot `/srv/pkg/`
* Dockerfile and scripts for the Container ``
* Scripts ``
diff --git a/build.sh b/build.sh
index 36f41b3..3009efc 100755
--- a/build.sh
+++ b/build.sh
@@ -2,6 +2,8 @@
DOCKER=podman
+podman image prune
+
$DOCKER pull archlinux:base-devel
-$DOCKER build --no-cache -t archpkg docker/
-#$DOCKER build -t archpkg docker/
+$DOCKER build --no-cache -t aurbuilder docker/
+#$DOCKER build -t aurbuilder docker/
diff --git a/container/bin/buildpackage.sh b/container/bin/buildpackage.sh
index a1dd8c3..56b38a7 100755
--- a/container/bin/buildpackage.sh
+++ b/container/bin/buildpackage.sh
@@ -14,6 +14,7 @@ while read -r NAME BASE VER _; do
# Only build when needed
if [ ! "$FORCE_REBUILD" = "yes" ] && compgen -G "/pkgout/${OUTNAME}*"; then
echo "$NAME $VER ($ARCH) is already built. Skipping."
+ # TODO: install the package! it is a dependency!
continue
fi
diff --git a/testrun.sh b/testrun.sh
index 65fc722..2329cf5 100755
--- a/testrun.sh
+++ b/testrun.sh
@@ -9,10 +9,9 @@ OUTPUT="$(pwd)/testrun/pkgout"
#./build.sh
-#--userns=nomap
$DOCKER run --userns=host --name archpkg-test --env PACKAGE_NAME=minipro \
--env FORCE_REBUILD=yes --env CHOWN="$(id -u "$CHOWN_TO"):$(id -g "$CHOWN_TO")" \
-v "$OUTPUT:/pkgout:z" \
- archpkg
+ aurbuilder
$DOCKER rm archpkg-test