void-packages/srcpkgs/hardinfo/template
Đoàn Trần Công Danh a96e535de0 hardinfo: fix cross again
2020-12-23 21:14:23 +07:00

38 lines
1.1 KiB
Bash

# Template file for 'hardinfo'
pkgname=hardinfo
version=0.5.1
revision=12
build_style=gnu-configure
hostmakedepends="pkg-config which"
makedepends="gtk+-devel libsoup-devel desktop-file-utils"
depends="desktop-file-utils"
short_desc="System information and benchmark tool"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://sourceforge.net/projects/hardinfo.berlios/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}.berlios/${pkgname}-${version}.tar.bz2"
checksum=a0df6c0d7c92a7d20710b8eb551197398a965aaae053782b89a32a160b731b7a
lib32disabled=yes
post_patch() {
local _arch
_arch="${XBPS_TARGET_MACHINE%-*}"
if [ "$_arch" == aarch64 ]; then
_arch=armv8
fi
vsed -i -e "s|^CC =.*|CC = $CC|" \
-e "s|^CCSLOW =.*|CCSLOW = $CC -O0|" \
-e "s|-o hardinfo|$LDFLAGS &|" \
Makefile.in
vsed -i -e "s|^LIBDIR=.*|LIBDIR=/usr/lib${XBPS_TARGET_WORDSIZE}|" \
-e "s|^PROC=.*|PROC=$_arch|" \
configure
vsed -i "s/\"lib\"/\"lib${XBPS_TARGET_WORDSIZE}\"/" binreloc.c
vsed -i '/distro_db/a { "/etc/hardinfo.distro", "Void" },' \
computer.h
}
post_install() {
vmkdir etc
echo "Void Linux" > ${DESTDIR}/etc/hardinfo.distro
}