diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-07-16 20:30:03 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-07-16 20:30:03 +0200 |
commit | 05d0aafd6d7cd8f27fcf7f32ff5877e761145f1e (patch) | |
tree | 47cf927294021e82c066fe4ab203f9cad7f864a5 | |
parent | 6ade883494654fb0c79ddd856c925457a9fdc1be (diff) | |
download | aurbuilder-05d0aafd6d7cd8f27fcf7f32ff5877e761145f1e.tar.gz |
OwO
-rw-r--r-- | PKGBUILD | 34 | ||||
-rw-r--r-- | Readme.md | 13 | ||||
-rwxr-xr-x | build.sh | 6 | ||||
-rwxr-xr-x | container/bin/buildpackage.sh | 1 | ||||
-rwxr-xr-x | testrun.sh | 3 |
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/* + +} + @@ -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 `` @@ -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 @@ -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 |