freebsd-ports/deskutils/py-autokey/Makefile
Steve Wills 5861da0467 deskutils/py-autokey: fix missing dependencies, cleanup
PR:		234533
Submitted by:	Daniel Shafer <daniel@shafer.cc> (maintainer)
2018-12-31 20:19:50 +00:00

58 lines
1.8 KiB
Makefile

# $FreeBSD$
PORTNAME= autokey
DISTVERSION= 0.95.4
PORTREVISION= 1
CATEGORIES= deskutils python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= daniel@shafer.cc
COMMENT= Desktop automation utility for FreeBSD and X11
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dbus>0:devel/py-dbus@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyinotify>0:devel/py-pyinotify@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xlib>0:x11-toolkits/py-xlib@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dbus>0:devel/py-dbus@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyinotify>0:devel/py-pyinotify@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xlib>0:x11-toolkits/py-xlib@${PY_FLAVOR}
USES= python:3.6+ shebangfix
USE_PYTHON= distutils concurrent
NO_ARCH= yes
OPTIONS_MULTI= GUI
OPTIONS_MULTI_GUI= GTK3 QT5
OPTIONS_DEFAULT= GTK3
OPTIONS_SUB= yes
GTK3_RUN_DEPENDS= libappindicator>0:devel/libappindicator
GTK3_USES= gnome
GTK3_USE= GNOME=gtk30,gtksourceview3,pygobject3
QT5_USES= pyqt:5
QT5_USE= PYQT=dbus,qscintilla2,sip,svg,xml
post-patch:
@${REINPLACE_CMD} 's|share/man|man|g' ${WRKSRC}/setup.py
@${REINPLACE_CMD} "/install_requires=/s|'dbus-python', ||g" ${WRKSRC}/setup.py
# setup.py installs both gtk and qt files no matter what, need to clean that up.
post-install-GTK3-off:
@${RM} ${STAGEDIR}${PREFIX}/share/applications/autokey-gtk.desktop
@${RM} ${STAGEDIR}${PREFIX}/bin/autokey-gtk
@${RM} ${STAGEDIR}${PREFIX}/man/man1/autokey-gtk.1
@${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}${PORTNAME}/gtkui
post-install-QT5-off:
@${RM} ${STAGEDIR}${PREFIX}/share/applications/autokey-qt.desktop
@${RM} ${STAGEDIR}${PREFIX}/bin/autokey-qt
@${RM} ${STAGEDIR}${PREFIX}/man/man1/autokey-qt.1
@${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}${PORTNAME}/gtkui
.include <bsd.port.mk>