add PKGBUILD, upd DEB builder
This commit is contained in:
10
packaging/archlinux/Dockerfile
Normal file
10
packaging/archlinux/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM archlinux:latest
|
||||
WORKDIR /mnt
|
||||
RUN chown 1000:1000 /mnt; \
|
||||
pacman -Sy --noconfirm \
|
||||
fakeroot \
|
||||
binutils \
|
||||
python \
|
||||
python-pip; \
|
||||
echo "alias ll='ls -alFh'" >> /etc/bash.bashrc
|
||||
USER 1000:1000
|
22
packaging/archlinux/Makefile
Normal file
22
packaging/archlinux/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
DOCKER_CMD ?= docker
|
||||
DOCKER_IMG = computebuilder:archlinux
|
||||
BUILDDIR = build
|
||||
|
||||
all: docker-build build
|
||||
|
||||
clean:
|
||||
test -d $(BUILDDIR) && rm -rf $(BUILDDIR) || true
|
||||
|
||||
docker-build:
|
||||
$(DOCKER_CMD) build -f Dockerfile -t $(DOCKER_IMG) .
|
||||
|
||||
build: clean
|
||||
mkdir -p $(BUILDDIR)
|
||||
VERSION=$$(awk '/^version/{print $$3}' ../../pyproject.toml | sed s'/-/\./'); \
|
||||
sed "s/pkgver=.*/pkgver=$$VERSION/" PKGBUILD > $(BUILDDIR)/PKGBUILD
|
||||
cp -v ../../dist/compute-*[.tar.gz] $(BUILDDIR)/
|
||||
cp ../../extra/completion.bash $(BUILDDIR)/
|
||||
$(DOCKER_CMD) run --rm -i -v $$PWD/$(BUILDDIR):/mnt --ulimit "nofile=1024:1048576" \
|
||||
$(DOCKER_IMG) makepkg --nodeps --clean
|
||||
# Remove unwanted files from build dir
|
||||
rm $(BUILDDIR)/compute*.tar.gz $(BUILDDIR)/PKGBUILD
|
16
packaging/archlinux/PKGBUILD
Normal file
16
packaging/archlinux/PKGBUILD
Normal file
@ -0,0 +1,16 @@
|
||||
pkgname=compute
|
||||
pkgver='0.1.0-dev4'
|
||||
pkgrel=1
|
||||
pkgdesc='Compute instances management library'
|
||||
arch=(any)
|
||||
url=https://get.lulzette.ru/hstack/compute
|
||||
license=('GPL-3-or-later')
|
||||
makedepends=(python python-pip)
|
||||
depends=(python libvirt libvirt-python qemu-base qemu-system-x86 qemu-img dnsmasq iptables-nft)
|
||||
provides=(compute)
|
||||
conflicts=()
|
||||
|
||||
package() {
|
||||
pip install --no-cache-dir --no-deps --root $pkgdir ../$pkgname-*.tar.gz
|
||||
install -Dm644 ../completion.bash $pkgdir/usr/share/bash-completion/completions/compute
|
||||
}
|
Reference in New Issue
Block a user