Commit 2e4835de authored by aTc's avatar aTc

led-config 0.1

parent e419422f
The Debian Package led-config
----------------------------
Comments regarding the Package
-- Pyra Dev <pyra-dev@pyra-handheld.com> Thu, 22 Jan 2015 16:50:20 +0100
led-config for Debian
---------------------
<possible notes regarding this package - if none, delete this file>
-- Pyra Dev <pyra-dev@pyra-handheld.com> Thu, 22 Jan 2015 16:50:20 +0100
led-config for Debian
---------------------
<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>
-- Pyra Dev <pyra-dev@pyra-handheld.com> Thu, 22 Jan 2015 16:50:20 +0100
led-config (0.1) unstable; urgency=low
* Initial Release.
-- Pyra Dev <pyra-dev@pyra-handheld.com> Thu, 22 Jan 2015 16:50:20 +0100
Source: led-config
Section: unknown
Priority: optional
Maintainer: Pyra Dev <pyra-dev@pyra-handheld.com>
Build-Depends: debhelper (>= 9) , dh-systemd
Standards-Version: 3.9.5
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://anonscm.debian.org/collab-maint/led-config.git
#Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/led-config.git;a=summary
Package: led-config
Architecture: all
Depends: ${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: led-config
Source: <url://example.com>
Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: MIT
Files: debian/*
Copyright: 2015 Pyra Dev <pyra-dev@pyra-handheld.com>
License: MIT
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid to pick license terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
led-config /usr/sbin/
[Unit]
Description=LED config
ConditionPathExists=|/sys/class/leds
After=systemd-remount-fs.service
[Service]
RemainAfterExit=yes
ExecStart=/usr/sbin/led-config start
ExecStop=/usr/sbin/led-config stop
[Install]
WantedBy=basic.target
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# main packaging script based on dh7 syntax
%:
dh $@ --with systemd
# debmake generated override targets
# This is example for Cmake (See http://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
#! /bin/sh
if [ -e /sys/class/leds/ ] ; then
case "$1" in
start)
echo "Configuring leds:"
for led in /sys/class/leds/* ; do
trigger=$(grep -w "$(basename $led)" /etc/default/leds | awk '{print $2}')
if [ -n "$trigger" ] ; then
echo " $(basename $led): $trigger"
echo "$trigger" > "$led/trigger"
fi
done
;;
stop)
echo "Deconfiguring leds:"
for led in /sys/class/leds/* ; do
trigger=$(grep -w "$(basename $led)" /etc/default/leds | awk '{print $2}')
if [ -n "$trigger" ] ; then
echo " $(basename $led): no trigger"
echo "none" > "$led/trigger"
fi
done
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
else
echo "No LEDs detected"
fi
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment