You are not logged in.

#1 2024-03-23 19:24:16

h0p3
Member
Registered: 2024-03-23
Posts: 2

PKGBUILD review: python-nautapy-git

Hey, this is my first time submitting here, this is an API for close captive portals for Nauta, on Cuba, Thanks.

# Maintainer: hope <https://aur.archlinux.org/account/hope>
# Contributor: hope

_pkgname=nautapy
pkgname=python-nautapy-git
pkgver=0.2.0
pkgrel=1
pkgdesc="Python API for the captive portal Nauta"
arch=('any')
url='https://github.com/atscub/nautapy'
license=('MIT')
depends=(python)
makedepends=(python-setuptools python-requests-mock)
checkdepends=(python)
source=("${_pkgname}-${pkgver}::git+https://github.com/atscub/nautapy")
sha256sums=('SKIP')

build() {
  cd ${_pkgname}-${pkgver}
  python setup.py build
}

check() {
  cd "${_pkgname}-${pkgver}"
  python setup.py test
}

package() {
  cd "${_pkgname}-${pkgver}"
  python setup.py install --optimize=1 --root="${pkgdir}/"
  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

Offline

#2 2024-03-24 18:37:14

Nebulosa
Member
Registered: 2009-08-24
Posts: 46

Re: PKGBUILD review: python-nautapy-git

My edits:

# Maintainer: hope <https://aur.archlinux.org/account/hope>
# Contributor: hope

pkgname=python-nautapy-git
pkgver=0.2.0.r20.g5618c41
pkgrel=1
pkgdesc="Python API for the captive portal Nauta"
arch=(any)
url="https://github.com/atscub/nautapy"
license=(MIT)
depends=(python)
makedepends=(git python-setuptools python-requests-mock)
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
source=(${pkgname%-git}::git+$url)
sha256sums=('SKIP')

pkgver() {
    git -C ${pkgname%-git} describe --long --abbrev=7 --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd ${pkgname%-git}
    python setup.py build
}

package() {
    cd ${pkgname%-git}
    python setup.py install --optimize=1 --root="$pkgdir"
    install -Dm644 LICENSE -t $pkgdir/usr/share/licenses/${pkgname-git}/
}

I'm not sure if this list of dependencies is full.

Last edited by Nebulosa (2024-03-24 18:37:59)

Offline

#3 2024-03-24 18:47:22

h0p3
Member
Registered: 2024-03-23
Posts: 2

Re: PKGBUILD review: python-nautapy-git

Nebulosa wrote:

My edits:

# Maintainer: hope <https://aur.archlinux.org/account/hope>
# Contributor: hope

pkgname=python-nautapy-git
pkgver=0.2.0.r20.g5618c41
pkgrel=1
pkgdesc="Python API for the captive portal Nauta"
arch=(any)
url="https://github.com/atscub/nautapy"
license=(MIT)
depends=(python)
makedepends=(git python-setuptools python-requests-mock)
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
source=(${pkgname%-git}::git+$url)
sha256sums=('SKIP')

pkgver() {
    git -C ${pkgname%-git} describe --long --abbrev=7 --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd ${pkgname%-git}
    python setup.py build
}

package() {
    cd ${pkgname%-git}
    python setup.py install --optimize=1 --root="$pkgdir"
    install -Dm644 LICENSE -t $pkgdir/usr/share/licenses/${pkgname-git}/
}

I'm not sure if this list of dependencies is full.

Yeah, you're right, I messed up, your edit is good tho, thanks, I'm going to update the dependencies:

# Maintainer: hope <https://aur.archlinux.org/account/hope>
# Contributor: hope

pkgname=python-nautapy-git
pkgver=0.2.0.r20.g5618c41
pkgrel=1
pkgdesc="Python API for the captive portal Nauta"
arch=(any)
url="https://github.com/atscub/nautapy"
license=(MIT)
depends=(python python-beautifulsoup4 python-certifi python-chardet python-idna python-requests python-soupsieve python-urllib3)
makedepends=(git python-setuptools)
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
source=(${pkgname%-git}::git+$url)
sha256sums=('SKIP')

pkgver() {
    git -C ${pkgname%-git} describe --long --abbrev=7 --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd ${pkgname%-git}
    python setup.py build
}

package() {
    cd ${pkgname%-git}
    python setup.py install --optimize=1 --root="$pkgdir"
    install -Dm644 LICENSE -t $pkgdir/usr/share/licenses/${pkgname-git}/
}

Offline

Board footer

Powered by FluxBB