diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-20 14:00:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-20 14:00:29 +0100 |
commit | 40a480a83a10d1718e26a6f4fc54d271c1f13a95 (patch) | |
tree | bfe08ce789f69c5862fd8e5d1bc17b22f9f21b86 /x11-misc/autorandr/autorandr-1.12.1-r2.ebuild | |
parent | 2eda3a3b8ebdb3fc8552feb6f49e466d3bc8e88c (diff) |
gentoo auto-resync : 20:10:2022 - 14:00:29
Diffstat (limited to 'x11-misc/autorandr/autorandr-1.12.1-r2.ebuild')
-rw-r--r-- | x11-misc/autorandr/autorandr-1.12.1-r2.ebuild | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/x11-misc/autorandr/autorandr-1.12.1-r2.ebuild b/x11-misc/autorandr/autorandr-1.12.1-r2.ebuild new file mode 100644 index 000000000000..77f954a8aaa0 --- /dev/null +++ b/x11-misc/autorandr/autorandr-1.12.1-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..11} ) + +inherit bash-completion-r1 distutils-r1 systemd udev + +if [[ "${PV}" = "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/phillipberndt/${PN}.git" +else + SRC_URI="https://github.com/phillipberndt/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Automatically select a display configuration based on connected devices" +HOMEPAGE="https://github.com/phillipberndt/autorandr" + +LICENSE="GPL-3" +SLOT="0" +IUSE="launcher systemd udev" + +RDEPEND=" + x11-apps/xrandr + launcher? ( x11-libs/libxcb ) + udev? ( virtual/udev ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + # https://github.com/phillipberndt/autorandr/pull/306 + "${FILESDIR}"/autorandr-Makefile-fix-install_udev-target-by-s-TARGETS-MAKECM.patch +) + +src_compile() { + distutils-r1_src_compile + + if use launcher; then + emake contrib/autorandr_launcher/autorandr-launcher + fi +} + +src_install() { + distutils-r1_src_install + + doman autorandr.1 + + local targets=( + autostart_config + bash_completion + $(usev launcher) + $(usev systemd) + $(usev udev) + ) + + emake DESTDIR="${D}" \ + BASH_COMPLETIONS_DIR="$(get_bashcompdir)" \ + SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" \ + UDEV_RULES_DIR="$(get_udevdir)"/rules.d \ + $(printf "install_%s " "${targets[@]}") +} + +pkg_postinst() { + if use udev; then + udev_reload + fi +} + +pkg_postrm() { + if use udev; then + udev_reload + fi +} |