termux-packages/root-packages/hwinfo/build.sh

27 lines
1.0 KiB
Bash
Raw Normal View History

2019-06-25 22:14:55 +02:00
TERMUX_PKG_HOMEPAGE=https://github.com/openSUSE/hwinfo
TERMUX_PKG_DESCRIPTION="Hardware detection tool from openSUSE"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
2021-12-05 15:10:59 +01:00
TERMUX_PKG_VERSION=21.80
2019-06-25 22:14:55 +02:00
TERMUX_PKG_SRCURL=https://github.com/openSUSE/hwinfo/archive/$TERMUX_PKG_VERSION.tar.gz
2021-12-05 15:10:59 +01:00
TERMUX_PKG_SHA256=ea944271793df091af560ac6e82dcd1271aa83f22aeeada031789df1b5407ebe
2019-06-25 22:14:55 +02:00
TERMUX_PKG_DEPENDS="libandroid-shmem, libuuid, libx86emu"
TERMUX_PKG_BREAKS="hwinfo-dev"
TERMUX_PKG_REPLACES="hwinfo-dev"
2019-06-25 22:14:55 +02:00
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
sed -i -E '/^SUBDIRS\s*=/d' Makefile
echo -e '\n$(LIBHD):\n\t$(MAKE) -C src' >> Makefile
echo -e '\t$(CC) -shared $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \' >> Makefile
echo -e '\t\t-Wl,--whole-archive $(LIBHD) -Wl,--no-whole-archive \' >> Makefile
echo -e '\t\t-Wl,-soname=$(LIBHD_SONAME) -o $(LIBHD_SO) $(SO_LIBS)' >> Makefile
}
2019-06-25 22:14:55 +02:00
termux_step_configure() {
echo 'touch changelog' > git2log
LDFLAGS+=" -landroid-shmem"
export HWINFO_VERSION="$TERMUX_PKG_VERSION"
2022-01-31 03:34:33 +01:00
export DESTDIR="$TERMUX_PREFIX"
2019-06-25 22:14:55 +02:00
}