mirror of
https://codeberg.org/privacy1st/exec-notify
synced 2024-12-22 23:16:04 +01:00
feat: add PKGBUILD
This commit is contained in:
parent
782edb146c
commit
f1c34c2f07
13
Makefile
Normal file
13
Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
PKGNAME := exec-notify
|
||||
|
||||
.PHONY: all
|
||||
all: install
|
||||
|
||||
.PHONY: install
|
||||
install: ## Install with pacman (on Arch Linux)
|
||||
sudo pacman -S --needed base-devel
|
||||
cd packaging && makepkg -fCcsri
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
sudo pacman -Rns python-$(PKGNAME)-git
|
51
packaging/PKGBUILD
Normal file
51
packaging/PKGBUILD
Normal file
@ -0,0 +1,51 @@
|
||||
# Maintainer: Daniel Langbein < daniel [ at ] systemli [ dot ] org >
|
||||
|
||||
# This PKGBUILD is based on the instructions from the Arch Linux wiki:
|
||||
# https://wiki.archlinux.org/title/Python_package_guidelines
|
||||
|
||||
_name=exec-notify
|
||||
pkgname="python-$_name-git"
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgdesc='execute command and notify about failure via email'
|
||||
arch=(any)
|
||||
url="https://codeberg.org/privacy1st/$_name"
|
||||
license=('custom:BSD-3-Clause-Clear-License')
|
||||
depends=(python)
|
||||
makedepends=(git python-build python-installer python-wheel)
|
||||
|
||||
source=("git+https://codeberg.org/privacy1st/$_name.git")
|
||||
b2sums=(SKIP)
|
||||
|
||||
# If there are no tags then use number of revisions since beginning of the history:
|
||||
# https://wiki.archlinux.org/title/VCS_package_guidelines
|
||||
pkgver() {
|
||||
cd "$_name"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
git -C "$srcdir/$_name" clean -dfx
|
||||
}
|
||||
|
||||
build() {
|
||||
# cd "$_name-$pkgver"
|
||||
cd "$_name"
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
package() {
|
||||
# cd "$_name-$pkgver"
|
||||
cd "$_name"
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
}
|
||||
|
||||
check(){
|
||||
cd "$srcdir/$_name"
|
||||
|
||||
# For nosetests
|
||||
# nosetests
|
||||
|
||||
# For pytest
|
||||
# pytest
|
||||
}
|
Loading…
Reference in New Issue
Block a user