x11-misc/autorandr: initial import

Signed-off-by: Florian Schmaus <flo@geekplace.eu>
This commit is contained in:
Florian Schmaus
2021-06-15 14:59:17 +02:00
parent 74ee50ef3c
commit 760b52dbf5
4 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST autorandr-1.11.tar.gz 48791 BLAKE2B 57203b15eebdecab943c706745701e8569eb0a66dab69ae4429abfa863da736a5ed8b5333f6d948bcf8cae30f48c68eb1b35f2e84080526c1507ab78dba02efb SHA512 93de0461653aa5145956a8aafdc9fb257491495ca335e4213e7b6f1f313ebfd2332c38615ac648204494026439d77861a7eefd97e80cd49a5fe3d9b75db54ec1

View File

@@ -0,0 +1,57 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit bash-completion-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"
fi
DESCRIPTION="Automatically select a display configuration based on connected devices"
HOMEPAGE="https://github.com/phillipberndt/autorandr"
LICENSE="GPL-3+"
SLOT="0"
IUSE="bash-completion systemd udev"
DEPEND="
virtual/pkgconfig
${RDEPEND}
"
RDEPEND="
bash-completion? ( app-shells/bash )
systemd? ( sys-apps/systemd )
udev? ( virtual/udev )
"
src_install() {
targets="autorandr autostart_config"
if use bash-completion; then
targets="$targets bash_completion"
fi
if use systemd; then
targets="$targets systemd"
fi
if use udev; then
targets="$targets udev"
fi
emake DESTDIR="${D}" \
install \
BASH_COMPLETIONS_DIR="$(get_bashcompdir)" \
SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" \
UDEV_RULES_DIR="$(get_udevdir)"/rules.d \
TARGETS="$targets"
}
pkg_postinst() {
if use udev; then
udev_reload
fi
}

View File

@@ -0,0 +1,57 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit bash-completion-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"
fi
DESCRIPTION="Automatically select a display configuration based on connected devices"
HOMEPAGE="https://github.com/phillipberndt/autorandr"
LICENSE="GPL-3+"
SLOT="0"
IUSE="bash-completion systemd udev"
DEPEND="
virtual/pkgconfig
${RDEPEND}
"
RDEPEND="
bash-completion? ( app-shells/bash )
systemd? ( sys-apps/systemd )
udev? ( virtual/udev )
"
src_install() {
targets="autorandr autostart_config"
if use bash-completion; then
targets="$targets bash_completion"
fi
if use systemd; then
targets="$targets systemd"
fi
if use udev; then
targets="$targets udev"
fi
emake DESTDIR="${D}" \
install \
BASH_COMPLETIONS_DIR="$(get_bashcompdir)" \
SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" \
UDEV_RULES_DIR="$(get_udevdir)"/rules.d \
TARGETS="$targets"
}
pkg_postinst() {
if use udev; then
udev_reload
fi
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>flo@geekplace.eu</email>
<name>Florian Schmaus</name>
</maintainer>
<use>
<flag name="systemd">Install autorand systemd files</flag>
<flag name="udev">Use udev for monitor detection</flag>
</use>
</pkgmetadata>