makedeb
Cog: A content generator for executing Python snippets in source files.
Viewing /PKGBUILD
.
Click here to go back to the Git tree for cogapp.
# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
_pkgname=cog
pkgname=cogapp
pkgver=3.3.0
pkgrel=0
pkgdesc='Cog: A content generator for executing Python snippets in source files.'
arch=('all')
url='https://nedbatchelder.com/code/cog'
license=('MIT')
depends=('python3')
makedepends=('python3-setuptools')
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/nedbat/${_pkgname}/archive/refs/tags/v${_pkgver}.tar.gz")
b2sums=('de48f9f7d8ce5f7cf4fcc0bebbb6d8d6734af7d2e29ee9c04ba42e88448af5108174293b7a2644f2934002bc249e2576e3ae32cae1276d97180af4b42ed5833d')
prepare(){
cd "${srcdir}/${_pkgname}-${pkgver}"
# Because there's already a Cog in Debian! :(
sed -i 's!cog = cogapp:main!cogapp = cogapp:main!' setup.py
}
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
python3 setup.py build
}
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
python3 setup.py install --root "${pkgdir}" --optimize=1 --skip-build --install-layout deb
install -Dm644 "LICENSE.txt" "$pkgdir/usr/share/doc/$pkgname/license"
install -Dm644 "README.rst" "$pkgdir/usr/share/doc/$pkgname/readme"
install -Dm644 "AUTHORS.txt" "$pkgdir/usr/share/doc/$pkgname/authors"
}