diff options
author | Anton Hvornum | 2023-03-29 14:59:20 +0200 |
---|---|---|
committer | Anton Hvornum | 2023-03-29 14:59:20 +0200 |
commit | a7215b4f6dac8fde57bc308b9e8c3cec7a3de735 (patch) | |
tree | b330db6edc837f8da09c817cd9d5981775109c66 | |
parent | 0af4f77933a23b38904ab0c48339f6c8b3e51b97 (diff) | |
download | aur-a7215b4f6dac8fde57bc308b9e8c3cec7a3de735.tar.gz |
Updated build and versioning to relfect upstream master PKGBUILD
-rw-r--r-- | PKGBUILD | 25 |
1 files changed, 20 insertions, 5 deletions
@@ -3,14 +3,14 @@ _name=archinstall pkgname=archinstall-git -pkgver=2.4.0.dev0 +pkgver=2.5.4.r1.g9f102a6 pkgrel=1 pkgdesc="Just another guided/automated Arch Linux installer with a twist" arch=('any') url="https://github.com/archlinux/$_name" license=('GPL3') depends=('python') -makedepends=('python-setuptools' 'python-sphinx') +makedepends=('git' 'python-setuptools' 'python-sphinx' 'python-build' 'python-installer' 'python-wheel') provides=('python-archinstall') conflicts=('python-archinstall') replaces=('python-archinstall') @@ -18,16 +18,31 @@ source=("git+https://github.com/archlinux/$_name.git") sha256sums=('SKIP') +pkgver() { + cd "$_name" + git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd $_name + + # Remove symlinks from the package source + # and move the actual files in before packaging. + rm -fv $_name/{examples,profiles} + mv -v examples profiles $_name/ +} + build() { cd "$_name" - python setup.py build - make man -C docs + python -m build --wheel --no-isolation + PYTHONDONTWRITEBYTECODE=1 make man -C docs } package() { cd "$_name" - python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build + # We have previously added "--optimize=1", "--skip-build" and "--prefix=/usr" here. + python -m installer --destdir="$pkgdir" dist/*.whl install -vDm 644 docs/_build/man/archinstall.1 -t "${pkgdir}/usr/share/man/man1/" } |