hardinfo: load modules in multilib environment

This commit is contained in:
Đoàn Trần Công Danh 2020-12-23 20:35:39 +07:00
parent f24b3387d3
commit 915aec1a27

View file

@ -1,7 +1,7 @@
# Template file for 'hardinfo'
pkgname=hardinfo
version=0.5.1
revision=9
revision=10
build_style=gnu-configure
hostmakedepends="pkg-config which"
makedepends="gtk+-devel libsoup-devel desktop-file-utils"
@ -13,18 +13,16 @@ homepage="http://sourceforge.net/projects/hardinfo.berlios/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}.berlios/${pkgname}-${version}.tar.bz2"
checksum=a0df6c0d7c92a7d20710b8eb551197398a965aaae053782b89a32a160b731b7a
lib32disabled=yes
nocross=yes
# nocross=yes
pre_configure() {
sed -i 's|/usr/lib64|/usr/lib|' configure
sed -i 's|lib64|lib|' binreloc.c
sed -i 's|{ DB_PREFIX "debian_version", "deb" },|{ DB_PREFIX "hardinfo.distro", "Void" },{ DB_PREFIX "debian_version", "deb" },|' computer.h
post_patch() {
vsed -i "s|^LIBDIR=.*|LIBDIR=/usr/lib${XBPS_TARGET_WORDSIZE}|" configure
vsed -i "s/\"lib\"/\"lib${XBPS_TARGET_WORDSIZE}\"/" binreloc.c
vsed -i '/distro_db/a { "/etc/hardinfo.distro", "Void" },' \
computer.h
}
do_build() {
make libdir="${XBPS_CROSS_BASE}/usr/lib" ${makejobs}
}
do_install() {
make libdir="${XBPS_CROSS_BASE}/usr/lib" DESTDIR=${DESTDIR} install
post_install() {
vmkdir etc
echo "Void Linux" > ${DESTDIR}/etc/hardinfo.distro
}