You are not logged in.
Hi, I would like to add a PKGBUILD for: https://github.com/AlexandreDecan/sismic
I already made some PKGBUILD for myself, but this is my first contribution, and I would be happy to get feedbacks.
sismic is an Interactive Statechart Model Interpreter and Checker that also generate statechart from yaml to plantuml.
Here is the PKGBUILD generated by pip2pkgbuild and that I modified to add dependencies:
# Maintainer: FederAndInk <federandink at gmail dot com>
pkgbase='python-sismic'
pkgname=('python-sismic')
_module='sismic'
pkgver='1.6.3'
pkgrel=1
pkgdesc="Sismic Interactive Statechart Model Interpreter and Checker"
url="https://github.com/AlexandreDecan/sismic/"
depends=('python' 'python-schema' 'python-behave' 'python-ruamel-yaml')
optdepends=('plantuml: interpret and convert generated files to png')
makedepends=('python-setuptools')
license=('LGPL3')
arch=('any')
source=("https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz")
sha256sums=('5db79edf20e2a6e731b613c5c0bc7e6727ff1643811ccb5b55462f4ed7ab081b')
build() {
cd "${srcdir}/${_module}-${pkgver}"
python setup.py build
}
package() {
depends+=()
cd "${srcdir}/${_module}-${pkgver}"
python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}
Last edited by FederAndInk (2021-09-25 09:13:11)
Offline
pkgbase='python-sismic'
Only of use with a split PKGBUILD.
depends+=()
???
Offline
ok thanks
depends+=()
???
well, it was generated, I didn't see that, I removed it, I also added `--prefix=/usr`:
# Maintainer: FederAndInk <federandink at gmail dot com>
pkgname='python-sismic'
_module='sismic'
pkgver='1.6.3'
pkgrel=1
pkgdesc="Interactive Statechart Model Interpreter and Checker"
url="https://github.com/AlexandreDecan/sismic/"
depends=('python' 'python-schema' 'python-behave' 'python-ruamel-yaml')
optdepends=('plantuml: interpret and convert generated files to png')
makedepends=('python-setuptools')
license=('LGPL3')
arch=('any')
source=("https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz")
sha256sums=('5db79edf20e2a6e731b613c5c0bc7e6727ff1643811ccb5b55462f4ed7ab081b')
build() {
cd "${srcdir}/${_module}-${pkgver}"
python setup.py build
}
package() {
cd "${srcdir}/${_module}-${pkgver}"
python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
}
Also, should I install the LICENSE file? And generate and install the man page from docs with sphinx?
Offline
Also, should I install the LICENSE file? And generate and install the man page from docs with sphinx?
LGPL3 is a common license include in the licenses package.
Adding the man page seems like a good addition to me.
Did adding the --prefix=/usr option change the location of any files/directories?
Offline
FederAndInk wrote:Also, should I install the LICENSE file? And generate and install the man page from docs with sphinx?
LGPL3 is a common license include in the licenses package.
Ok, thanks, I just checked the wiki, sorry for the question, I should have checked before asking.
Adding the man page seems like a good addition to me.
ok, I added it
Did adding the --prefix=/usr option change the location of any files/directories?
well, it doesn't actually, I just saw that in a community python package: https://github.com/archlinux/svntogit-c … k/PKGBUILD
but there is nothing in the wiki about that (https://wiki.archlinux.org/title/Python … guidelines), so I suppose we can get rid of it
here is the updated PKGBUILD, also with checks:
# Maintainer: FederAndInk <federandink at gmail dot com>
pkgname='python-sismic'
_module='sismic'
pkgver='1.6.3'
pkgrel=1
pkgdesc="Interactive Statechart Model Interpreter and Checker"
url="https://github.com/AlexandreDecan/sismic/"
depends=('python' 'python-schema' 'python-behave' 'python-ruamel-yaml')
optdepends=('plantuml: interpret and convert generated files to png')
makedepends=('python-setuptools' 'python-sphinx-autodoc-typehints' 'python-sphinx')
checkdepends=('python-coverage' 'python-pytest' 'python-pytest-mock')
license=('LGPL3')
arch=('any')
source=("https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz")
sha256sums=('5db79edf20e2a6e731b613c5c0bc7e6727ff1643811ccb5b55462f4ed7ab081b')
build() {
cd "${srcdir}/${_module}-${pkgver}"
python setup.py build
cd docs
make man
}
check() {
cd "${srcdir}/${_module}-${pkgver}"
coverage run --source sismic -m pytest tests
cd docs
make doctest
cd examples/microwave/
python -m unittest
}
package() {
cd "${srcdir}/${_module}-${pkgver}"
python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 "docs/_build/man/sismic.1" "${pkgdir}/usr/share/man/man1/sismic.1"
}
Last edited by FederAndInk (2021-09-25 12:11:16)
Offline