uacpid 1.0.1 → 1.0.3.0
raw patch · 9 files changed
+66/−21 lines, 9 files
Files
- README +28/−12
- bin/uacpid-dev +1/−1
- bin/uacpid-dev-setup +28/−0
- doc/hcar-uacpid.tex +2/−2
- resources/man/uacpid.1 +1/−1
- resources/uacpid/events/anything +1/−0
- src/Uacpid/Events.hs +1/−1
- src/main.hs +2/−2
- uacpid.cabal +2/−2
README view
@@ -1,22 +1,38 @@+----- Getting started developing: -In order for the conf file code to work correctly in a development setting, what you should do is:+This daemon is designed to make files for itself in ~/.uacpid/ the+first time it's run. To assist with development, there is a script+which will build a development installation and execution environment+in /tmp/uacpid-dev/ for you. - $ runhaskell Setup.hs configure --prefix=foo -Where foo is some scratch development installation dir, doesn't really matter where.+To initialize for development: -You must then runhaskell Setup.hs install to copy files there. After which, running will be able to locate default conf which will then allow it to bootstrap the "real" configuration.+ $ bin/uacpid-dev-setup -Running the daemon in a development setting:+Once that's completed, it can be run like this: -Start this daemon with the helper script in bin/uacpid-dev-This will use a custom HOME environment that points to dev/home/-And will keep it from looking at your real $HOME/.uacpid/+ $ bin/uacpid-dev -Start in developement like this:- $ bin/uacpid-dev & -Stop in developement like this, use the full path so only the development execution is killed. Or get the pid and use kill:- $ killall dist/build/uacpid/uacpid+-----+A word about the version numbering scheme:++ 4-part: major.minor.status.build+ 3-part: major.status.build++ status:+ 0 alpha+ 1 beta+ 2 release candidate+ 3 release++ examples:+ 1.3.0.2 v1.3 alpha build 2+ 1.2.1.0 v1.2 beta build 0+ 4.2.24 v4 release candidate build 24+ 2.10.3.5 v2.10 release build 5 (say they were bug fixes)+ 1.5.2.20090818 Can even use a date for build+ v1.5 release candidate 2009-08-18 build
bin/uacpid-dev view
@@ -1,3 +1,3 @@ #! /bin/bash -HOME=dev/home dist/build/uacpid/uacpid $*+HOME=/tmp/uacpid-dev dist/build/uacpid/uacpid $*
+ bin/uacpid-dev-setup view
@@ -0,0 +1,28 @@+#! /bin/bash++prefix=/tmp/uacpid-dev++rm -rf $prefix++mkdir $prefix++./Setup.hs configure --prefix=$prefix+./Setup.hs build+./Setup.hs install++echo+echo "Development environment built and installed"++HOME=$prefix ./dist/build/uacpid/uacpid &+sleep 1+kill $!++echo+echo "uacpid daemon run and stopped once to complete installation"+echo+echo "Development environment has been created and initialized at $prefix"+echo "You may now edit $prefix/.uacpid/uacpid.conf as necessary"+echo "and work with event scripts in $prefix/.uacpid/events/"+echo+echo "To run the daemon against this development env:"+echo "./bin/uacpid-dev"
doc/hcar-uacpid.tex view
@@ -10,9 +10,9 @@ \status{experimental, actively developed} \makeheader -uacpid is a daemon designed to be run in userspace that will monitor the local system's acpid socket for hardware events. These events can then be acted upon by handlers with access to the user's environment.+uacpid is a daemon designed to be run in userspace that will monitor the local system's acpid socket for hardware events. These events can then be acted upon by handlers with access to the user's environment. Configuration of uacpid closely mimics that of acpid. -uacpid is available in binary form for Arch Linux through the AUR and can be acquired using darcs or other methods. See the project page below for more.+uacpid is available in binary form for Arch Linux through the AUR and can be acquired using darcs or other methods. \FurtherReading \begin{compactitem}
resources/man/uacpid.1 view
@@ -1,7 +1,7 @@ .\" Process this file with .\" groff -man -Tascii uacpid.1 .\"-.TH UACPID 1 "2010-Apr-06" Linux "User Manuals"+.TH UACPID 1 "2011-Mar-18" Linux "User Manuals" .SH NAME uacpid \- Userspace Advanced Configuration and Power Interface event daemon .SH SYNOPSIS
resources/uacpid/events/anything view
@@ -9,5 +9,6 @@ # action is a shell command that will be executed if the above event # regexp pattern is a match # This example using logger will log to local syslog-ng+# You can see these messages in /var/log/messages.log # (just as an example) action=logger "uacpid event handler: anything"
src/Uacpid/Events.hs view
@@ -92,4 +92,4 @@ let responders = filter (\e -> isJust $ matchRegex (mkRegex (evEventRe e)) acpiHandler) es - mapM_ (runCommand . evAction) responders+ mapM_ (waitForProcess <=< runCommand . evAction) responders
src/main.hs view
@@ -107,7 +107,7 @@ executeHandlers line handlers -- Wait a bit, try again- threadDelay 250000+ threadDelay 2000000 listenAcpi handlers mvRunStatus hdl @@ -175,7 +175,7 @@ , "" , "Please see man uacpid for detailed info" , ""- , "Version 1.0.1 Dino Morelli <dino@ui3.info>"+ , "Version 1.0.3.0 Dino Morelli <dino@ui3.info>" ] exitWith ExitSuccess
uacpid.cabal view
@@ -1,5 +1,5 @@ name: uacpid-version: 1.0.1+version: 1.0.3.0 cabal-version: >= 1.2 build-type: Simple license: BSD3@@ -17,7 +17,7 @@ upon by handlers with access to the user's environment. category: System-tested-with: GHC>=6.12.1+tested-with: GHC>=6.12.3 data-dir: resources data-files: uacpid/uacpid.conf, uacpid/events/anything