void-packages/srcpkgs/python-cssutils/template

40 lines
1.0 KiB
Bash

# Template file for 'python-cssutils'
pkgname=python-cssutils
version=1.0.1
revision=1
noarch=yes
wrksrc="cssutils-${version}"
build_style=python-module
python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools"
depends="python"
pycompile_module="cssutils encutils"
short_desc="A CSS Cascading Style Sheets library for Python2"
maintainer="Farhad Shahbazi <grauwolf@geekosphere.org>"
license="LGPL-3"
homepage="http://pypi.python.org/pypi/cssutils"
distfiles="${PYPI_SITE}/c/cssutils/cssutils-${version}.tar.gz"
checksum=d8a18b2848ea1011750231f1dd64fe9053dbec1be0b37563c582561e7a529063
pre_build() {
find src/cssutils -type f -name '*.py' -exec sed -i '/^#!/d' {} +
}
post_install() {
for f in ${DESTDIR}/usr/bin/*; do
cp -f ${f}{,3.4}
replace_interpreter python ${f}
done
}
python3.4-cssutils_package() {
noarch=yes
depends="python3.4"
pycompile_version="3.4"
pycompile_module="cssutils encutils"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/bin/*3.4
vmove usr/lib/python3.4
}
}