diff --git a/LICENSE b/app-misc/battery_status_led/LICENSE similarity index 100% rename from LICENSE rename to app-misc/battery_status_led/LICENSE diff --git a/README.md b/app-misc/battery_status_led/README.md similarity index 100% rename from README.md rename to app-misc/battery_status_led/README.md diff --git a/app-misc/battery_status_led/battery_status_led-0.1.ebuild b/app-misc/battery_status_led/battery_status_led-0.1.ebuild new file mode 100644 index 0000000..86baf74 --- /dev/null +++ b/app-misc/battery_status_led/battery_status_led-0.1.ebuild @@ -0,0 +1,42 @@ +# Copyright 2018 Denes Matetelki +# Distributed under the terms of the GNU General Public License v3 + +EAPI=6 + +#inherit git-r3 systemd linux-info +inherit git-r3 systemd + + +DESCRIPTION="Battery (low/critical) status indication by making a (the capslock) LED blink" +HOMEPAGE="https://github.com/dmatetelki/battery_status_led" +SRC_URI="" +EGIT_REPO_URI="https://github.com/dmatetelki/battery_status_led" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +#CONFIG_CHECK="CONFIG_X86_PLATFORM_DEVICES" + +#pkg_setup { +# linux-info_pkg_setup +#} + +DOCS="README.md" + +src_install() { + dodoc + dobin battery_status_led.sh + systemd_dounit battery_status_led.service +} + +pkg_postinst() { + elog "Make sure you have your laptop's ACPI module compiled into your kernel:" + elog "Device Drivers > X86 Platform Specific Device Drivers" + elog "For example: Asus laptop extras, ThinkPad ACPI Laptop Extras, etc." + elog "You can specify which LED device to use by editing the service file." +} diff --git a/battery_status_led.service b/app-misc/battery_status_led/battery_status_led.service similarity index 62% rename from battery_status_led.service rename to app-misc/battery_status_led/battery_status_led.service index c5fe861..553ad60 100644 --- a/battery_status_led.service +++ b/app-misc/battery_status_led/battery_status_led.service @@ -2,6 +2,6 @@ Description=Battery monitoring on CapsLock LED [Service] +Environment="BATTERY_STATUS_LED_DEV=/sys/class/leds/input4\:\:capslock" ExecStart="/usr/bin/battery_status_led.sh" Type=idle - diff --git a/battery_status_led.sh b/app-misc/battery_status_led/battery_status_led.sh similarity index 100% rename from battery_status_led.sh rename to app-misc/battery_status_led/battery_status_led.sh