libpwquality: use python3 build_helper

This commit is contained in:
classabbyamp 2022-08-25 15:20:13 -04:00 committed by classabbyamp
parent e8ce48744f
commit b6899a4763
1 changed files with 4 additions and 19 deletions

View File

@ -1,10 +1,11 @@
# Template file for 'libpwquality' # Template file for 'libpwquality'
pkgname=libpwquality pkgname=libpwquality
version=1.4.2 version=1.4.2
revision=5 revision=6
build_style=gnu-configure build_style=gnu-configure
build_helper=python3
configure_args="--disable-static --enable-pam --with-securedir=/usr/lib/security" configure_args="--disable-static --enable-pam --with-securedir=/usr/lib/security"
hostmakedepends="libtool automake gettext-devel python3-devel" hostmakedepends="libtool automake gettext-devel python3"
makedepends="cracklib-devel pam-devel python3-devel" makedepends="cracklib-devel pam-devel python3-devel"
depends="cracklib" depends="cracklib"
conf_files="/etc/security/pwquality.conf" conf_files="/etc/security/pwquality.conf"
@ -13,29 +14,13 @@ maintainer="bra1nwave <bra1nwave@protonmail.com>"
license="GPL-2.0-or-later" license="GPL-2.0-or-later"
homepage="https://github.com/libpwquality/libpwquality" homepage="https://github.com/libpwquality/libpwquality"
changelog="https://raw.githubusercontent.com/libpwquality/libpwquality/master/NEWS" changelog="https://raw.githubusercontent.com/libpwquality/libpwquality/master/NEWS"
distfiles="${homepage}/releases/download/libpwquality-${version}/libpwquality-${version}.tar.bz2" distfiles="https://github.com/libpwquality/libpwquality/releases/download/libpwquality-${version}/libpwquality-${version}.tar.bz2"
checksum=5263e09ee62269c092f790ac159112aed3e66826a795e3afec85fdeac4281c8e checksum=5263e09ee62269c092f790ac159112aed3e66826a795e3afec85fdeac4281c8e
CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
pre_configure() { pre_configure() {
vsed -i python/Makefile.am -e 's|CFLAGS=.*|LDSHARED="${CC} -pthread -shared" &|g'
autoreconf -fi autoreconf -fi
} }
pre_build() {
if [ "$CROSS_BUILD" ]; then
for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
f=${f##*/}
export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
done
export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
fi
}
pre_install() {
pre_build
}
libpwquality-devel_package() { libpwquality-devel_package() {
depends="cracklib-devel ${sourcepkg}>=${version}_${revision}" depends="cracklib-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files" short_desc+=" - development files"