distribution/packages/tools/pyudev/package.mk

31 lines
1.1 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 0riginally created by Escalade (https://github.com/escalade)
# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
2022-02-05 14:23:32 +00:00
PKG_NAME="pyudev"
PKG_VERSION="5e00141"
2022-02-05 14:23:32 +00:00
PKG_LICENSE="OSS"
PKG_SITE="https://github.com/pyudev/pyudev"
2023-02-24 13:53:43 +00:00
PKG_URL="https://github.com/pyudev/pyudev/archive/${PKG_VERSION}.tar.gz"
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_TARGET="toolchain Python3 distutilscross:host"
PKG_LONGDESC="pyudev is a LGPL licenced, pure Python 2/3 binding to libudev, the device and hardware management and information library of Linux."
pre_make_target() {
2023-02-24 13:53:43 +00:00
export PYTHONXCPREFIX="${SYSROOT_PREFIX}/usr"
export LDFLAGS="${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib"
export LDSHARED="${CC} -shared"
2022-02-05 14:23:32 +00:00
}
make_target() {
python3 setup.py build --cross-compile
}
makeinstall_target() {
2023-02-24 13:53:43 +00:00
python3 setup.py install --root=${INSTALL} --prefix=/usr
2022-02-05 14:23:32 +00:00
}
post_makeinstall_target() {
2023-02-24 13:53:43 +00:00
find ${INSTALL}/usr/lib/python*/site-packages/ -name "*.py" -exec rm -rf {} ";"
2022-02-05 14:23:32 +00:00
}