diff options
author | Raúl Porcel <armin76@gentoo.org> | 2011-04-02 19:28:54 +0000 |
---|---|---|
committer | Raúl Porcel <armin76@gentoo.org> | 2011-04-02 19:28:54 +0000 |
commit | c721b5a9a8e7f364b179450bcffd453cce7a66c5 (patch) | |
tree | ecf3362194c3e6df9dc1eb3e43de7f69c0fa48f2 /sys-apps/qcontrol | |
parent | Delete older ebuilds. (diff) | |
download | historical-c721b5a9a8e7f364b179450bcffd453cce7a66c5.tar.gz historical-c721b5a9a8e7f364b179450bcffd453cce7a66c5.tar.bz2 historical-c721b5a9a8e7f364b179450bcffd453cce7a66c5.zip |
Use debian patchset, rework ebuild a bit, bug #336245
Package-Manager: portage-2.1.9.42/cvs/Linux i686
RepoMan-Options: --force
Diffstat (limited to 'sys-apps/qcontrol')
-rw-r--r-- | sys-apps/qcontrol/ChangeLog | 11 | ||||
-rw-r--r-- | sys-apps/qcontrol/Manifest | 14 | ||||
-rw-r--r-- | sys-apps/qcontrol/files/0.4.2-Makefile.patch | 23 | ||||
-rw-r--r-- | sys-apps/qcontrol/files/init.d | 10 | ||||
-rw-r--r-- | sys-apps/qcontrol/files/qcontrol.1 | 121 | ||||
-rw-r--r-- | sys-apps/qcontrol/files/ts209.lua | 41 | ||||
-rw-r--r-- | sys-apps/qcontrol/files/ts409.lua | 39 | ||||
-rw-r--r-- | sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild (renamed from sys-apps/qcontrol/qcontrol-0.4.2.ebuild) | 32 |
8 files changed, 60 insertions, 231 deletions
diff --git a/sys-apps/qcontrol/ChangeLog b/sys-apps/qcontrol/ChangeLog index cb81a90c7a83..348c279256a7 100644 --- a/sys-apps/qcontrol/ChangeLog +++ b/sys-apps/qcontrol/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/qcontrol -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/qcontrol/ChangeLog,v 1.3 2009/06/11 17:46:33 armin76 Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/qcontrol/ChangeLog,v 1.4 2011/04/02 19:28:53 armin76 Exp $ + +*qcontrol-0.4.2-r1 (02 Apr 2011) + + 02 Apr 2011; Raúl Porcel <armin76@gentoo.org> files/0.4.2-Makefile.patch, + files/init.d, -files/qcontrol.1, -files/ts209.lua, -files/ts409.lua, + -qcontrol-0.4.2.ebuild, +qcontrol-0.4.2-r1.ebuild: + Use debian patchset, rework ebuild a bit, bug #336245 11 Jun 2009; Raúl Porcel <armin76@gentoo.org> files/0.4.2-Makefile.patch: Add -ldl to LDFLAGS diff --git a/sys-apps/qcontrol/Manifest b/sys-apps/qcontrol/Manifest index 9226e1d5af20..e37d072ca3a3 100644 --- a/sys-apps/qcontrol/Manifest +++ b/sys-apps/qcontrol/Manifest @@ -1,10 +1,8 @@ -AUX 0.4.2-Makefile.patch 309 RMD160 41a840e2406e98980c46e2ba78d725876e6e9d0e SHA1 63c16253a18fffd904ecde93870597bf3602535f SHA256 365fcc9d84883490f75b21fd8af8786fcf377d209317a3bf8e8b40911a8bc7d2 +AUX 0.4.2-Makefile.patch 706 RMD160 cad63ede5f11e7f3d946293bd5fa3acee0472afa SHA1 a372704c9a582189fe87bf4933ea37b7146ea9d8 SHA256 af1ad2aa6db4198c23d2b5a4643e97bf5526801af57d4f29bd45a1cdb18532a7 AUX conf.d 133 RMD160 8b391de428e230605b3ff78f2e8d5bd7d377ffa9 SHA1 30251d7a8c5a3f95371706e9eef25bf37248c991 SHA256 b25115ebda4ed6ccb5292efdc686d00e3bcacdb4dbb991d498d00c1c87fa548b -AUX init.d 2132 RMD160 e2168275d3d02eecb91d935fdaa78d55bb25980d SHA1 035cffae1ace1704ab194fb31d852195d22fa8ea SHA256 9665b0367f5bcf922b7a95adfffe7598a2aac56fc93f44fc55d1ff02733a04af -AUX qcontrol.1 3813 RMD160 b2b3d49e10fc33293c6da3e18cb475bd1b235981 SHA1 771ce11cb6189ce5484ce12ec99a3e1d5bfc3813 SHA256 b21164f39efdb8a8e8d796d1928400919c8abe183993f23b47a8ed319c6e5049 -AUX ts209.lua 773 RMD160 44b81345fb27cd8b3ae797ddafacc7eac45d774e SHA1 6c52dc25d545c15974420b6e30e70cd01b536f13 SHA256 fa32d5621c3c9af51652ddaa64e4243a48c5c63c307971e4e05adbaa2a52afa9 -AUX ts409.lua 764 RMD160 991cb328da102dcbfcddf251ffc769073cdeecba SHA1 0e4c7c3530d34494d6231ce162346d7137e7e707 SHA256 b0bc7a3b6f5b11df6c687d37ac2f04a4bf2230fbb79be656067f9622ecf0edd3 -DIST qcontrol-0.4.2.tar.gz 18344 RMD160 511de9ca71df47c8004c345483f2114911b73637 SHA1 942027d7f26da368fa1f34b0bd4fecffa808b211 SHA256 efe7311cdd460a51475d22f737540e7bb3c4303e5eba97b782d765c8f1e67055 -EBUILD qcontrol-0.4.2.ebuild 1261 RMD160 a7099d06f413018f4c55374fbb967edefbdc7235 SHA1 05ecf42717dfdbfc35135cae2140a428a7a3656c SHA256 7b7e1401228accd5e9c3508a71d75317e30312249e0940c80022d6992dbb222c -MISC ChangeLog 665 RMD160 8bc413d7f4a51cf24d867bd84d5f018e4d308607 SHA1 420866d9c75f378e01a586742d78bc3d68336f95 SHA256 7328e62a2723c76033fd215fb5522c1bfb4916c1e6457d3e0b8408d84c7e2b8d +AUX init.d 2210 RMD160 2f3afe6a298d80d137245976aa2b5f9f24e063ad SHA1 3423f2b3a7b690ca6b7e77b0a47322e175be7552 SHA256 47a227a374660ce6be47db7da6b79e490fce4fafab5e44910ba073cf439650d6 +DIST qcontrol_0.4.2-6.diff.gz 11426 RMD160 a5fbfffb13b123a5bceff57ad5065910ab287b5a SHA1 c8a4828fd987b66ba09758b2b72a5db2c7571b6d SHA256 11d45cebfe217a8bc0a0dbfc641fc098510c4b521cc83b993bd1fd493b834625 +DIST qcontrol_0.4.2.orig.tar.gz 18344 RMD160 511de9ca71df47c8004c345483f2114911b73637 SHA1 942027d7f26da368fa1f34b0bd4fecffa808b211 SHA256 efe7311cdd460a51475d22f737540e7bb3c4303e5eba97b782d765c8f1e67055 +EBUILD qcontrol-0.4.2-r1.ebuild 1582 RMD160 46e44dacf890a6a4ebb9a1eab98aa90143d0f2d4 SHA1 f440a02eaabeb9c1ef4a8fa5be2d8a3a41b29064 SHA256 d0aea08b1a04bbb73660c9dbcf0ad2f93db407113e6aff86b934e9f8d1418663 +MISC ChangeLog 957 RMD160 8b18a5edaedad8949880f7660ef254d5837db61f SHA1 085c2ec2940b2b714b38104017e1e54d70090951 SHA256 75e1fc93f461d10b7f38fb1e50f83b8f0ad92b6ac15a48c8927b34b576b85856 MISC metadata.xml 241 RMD160 e4c7b2e1e0a43d7a990991ed3a2ebebc617e7c72 SHA1 cb548812f1588d57a4f59c2807296f8db98e10cd SHA256 0a8438203235633fc1106234a6cb878dbf1b71a58131247b114b36a92dea8076 diff --git a/sys-apps/qcontrol/files/0.4.2-Makefile.patch b/sys-apps/qcontrol/files/0.4.2-Makefile.patch index 1b6846c80679..ad3701c549eb 100644 --- a/sys-apps/qcontrol/files/0.4.2-Makefile.patch +++ b/sys-apps/qcontrol/files/0.4.2-Makefile.patch @@ -1,9 +1,22 @@ ---- Makefile.orig 2008-11-23 12:44:33.000000000 +0000 -+++ Makefile 2008-11-23 12:45:35.000000000 +0000 +--- Makefile.orig 2011-04-02 20:44:05.021252507 +0200 ++++ Makefile 2011-04-02 20:45:21.751248966 +0200 @@ -1,5 +1,4 @@ -CFLAGS=-Os -Wall -I /usr/include/lua5.1 -LDFLAGS=-llua5.1 -lpthread -+LDFLAGS=-llua -lpthread -ldl - SOURCES=qcontrol.c ts209.c ts409.c evdev.c ++LDFLAGS=-llua -lpthread + LDFLAGS_UDEB=-lpthread -lm -ldl + SOURCES=qcontrol.c ts209.c ts219.c ts409.c ts41x.c evdev.c OBJECTS=$(SOURCES:.c=.o) - EXECUTABLE=qcontrol +@@ -8,10 +7,10 @@ + all: $(SOURCES) $(EXECUTABLE) qcontrol.udeb + + $(EXECUTABLE): $(OBJECTS) +- $(CC) $(LDFLAGS) $(OBJECTS) -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@ + + qcontrol.udeb: $(OBJECTS) +- $(CC) $(LDFLAGS_UDEB) $(OBJECTS) /usr/lib/liblua5.1.a -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS_UDEB) $(OBJECTS) /usr/lib/liblua.a -o $@ + + .cpp.o: + $(CC) $(CFLAGS) $< -o $@ diff --git a/sys-apps/qcontrol/files/init.d b/sys-apps/qcontrol/files/init.d index ba8153873a80..ce2a6493d03f 100644 --- a/sys-apps/qcontrol/files/init.d +++ b/sys-apps/qcontrol/files/init.d @@ -1,5 +1,5 @@ #!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Header: $ @@ -20,14 +20,14 @@ start() { device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \ head -n1 | sed "s/^[^:]*: //") case $device in - "QNAP TS-109/TS-209") + "QNAP TS-109/TS-209" | "QNAP TS-119/TS-219") qcontrol statusled greenon || true qcontrol powerled on || true if [ "$SOUND_BUZZER" != no ]; then qcontrol buzzer short || true fi ;; - "QNAP TS-409") + "QNAP TS-409" | "QNAP TS-41x") qcontrol statusled greenon || true if [ "$SOUND_BUZZER" != no ]; then qcontrol buzzer short || true @@ -52,14 +52,14 @@ stop() { device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \ head -n1 | sed "s/^[^:]*: //") case $device in - "QNAP TS-109/TS-209") + "QNAP TS-109/TS-209" | "QNAP TS-119/TS-219") qcontrol statusled rednon || true qcontrol powerled 1hz || true if [ "$SOUND_BUZZER" != no ]; then qcontrol buzzer short || true fi ;; - "QNAP TS-409") + "QNAP TS-409" | "QNAP TS-41x") qcontrol statusled redon || true if [ "$SOUND_BUZZER" != no ]; then qcontrol buzzer short || true diff --git a/sys-apps/qcontrol/files/qcontrol.1 b/sys-apps/qcontrol/files/qcontrol.1 deleted file mode 100644 index 81538348efcd..000000000000 --- a/sys-apps/qcontrol/files/qcontrol.1 +++ /dev/null @@ -1,121 +0,0 @@ -.TH QCONTROL 1 "2008-08-10" "Debian Project" "" - -.SH NAME -qcontrol \- Hardware control for QNAP TS-109, TS-209 and TS-409 - -.SH SYNOPSIS -\fBqcontrol\fB -d -.PP -\fBqcontrol\fB \fIcommand\fP \fIvalue\fP - -.SH DESCRIPTION -The utility can be used to control leds or fan speed, or sound the buzzer. -As a daemon it can monitor the device for example for button presses or -temperature values and trigger actions defined in the LUA configuration -file, for example to power off the system or to modify the fan speed. -.PP -Note: the current version does not have a real daemon mode. Caution is -therefore advised when using qcontrol as a real daemon to monitor and -control a device. -.PP -Currently supported devices are the QNAP TS-109, QNAP TS-209 and QNAP -TS-409, but support for additional devices may be added in future releases. - -.SH BASIC USAGE -First a control process needs to be started that opens a socket through -which the actual commands can be passed. The control proces is be started -using the \fB\-d\fP option: - # qcontrol \-d -.PP -Or, to start the control process in a pseudo daemon mode: - # qcontrol \-d >/dev/null & disown -.PP -After that, the actual commands to control devices can be entered (if the -first syntax to start the control process was used, this should be done -from a separate console): - # qcontrol <command> <value> -.PP -Because the socket file is created in /var/run, all commands must be run -as root. - -.SH OPTIONS -This program follows the usual GNU command line syntax, with long options -starting with two dashes (`-'). -An overview of supported options is included below. - -.IP "\fB\-d\fP, \fB\-\-daemon\fP" -Daemon mode; starts the control process. - -.IP "\fB\-?\fP, \fB\-\-help\fP" -Print command help and info. - -.IP "\fB\-V\fP, \fB\-\-version\fP" -Print program version. - -.SH SUPPORTED CLIENT COMMANDS -Below an overview of the supported commands that can be sent using the -program in client mode, and the allowed values for each. - -Commands (these and others) can also be programmed in response to events -using the LUA configuration file. - -For the leds, values including `1hz' and `2hz' will result in the led -flashing on/off in the default or specified color, with the `hz' value -determining the speed of the flashes. In the case of `greenred', the led -will alternate between green and red instead of on and off. - -.IP "\fBpowerled\fP" -Controls the power led (not available on TS-409). - -Values: off | on | 1hz | 2hz - -.IP "\fBstatusled\fP" -Controls the status led. - -Values: - off | greenon | redon | - green1hz | red1hz | greenred1hz | - green2hz | red2hz | greenred2hz - -.IP "\fBusbled\fP" -Controls the usb led. - -Values: off | on | 8hz - -.IP "\fBbuzzer\fP" -Sounds the buzzer. - -Values: short | long - -.IP "\fBfanspeed\fP" -Controls the speed of the fan (if present). - -Values: stop | silence | low | medium | high | full - -.SH KNOWN ISSUES -After running the control process and killing it, the socket file will still -exist. This will cause the following error when the control process is started -again: `Error binding to socket: Address already in use'. -.PP -The solution is to remove the socket file and then try again: - # rm /var/run/qcontrol.sock -.PP -The program is not yet very robust against errors in the configuration file. - -.SH FILES -.IP \fB/etc/qcontrol.conf\fP -LUA configuration file for qcontrol -.IP \fB/etc/default/qcontrol\fP -Configuration file for qcontrol init script -.IP \fB/var/run/qcontrol.sock\fP -Socket file for communication between daemon precess and client - -.SH SEE ALSO -.IP \fB/usr/share/doc/qcontrol/examples\fP -Example LUA configuration file containing more advanced commands - -.SH AUTHOR -qcontrol was written by Byron Bradley <byron.bbradley@gmail.com>. -.PP -This manual page was written by Frans Pop <fjp@debian.org> -for the Debian project (but may be used by others). diff --git a/sys-apps/qcontrol/files/ts209.lua b/sys-apps/qcontrol/files/ts209.lua deleted file mode 100644 index 87df1f325b21..000000000000 --- a/sys-apps/qcontrol/files/ts209.lua +++ /dev/null @@ -1,41 +0,0 @@ ---[[ - Debian configuration file for qcontrol (LUA syntax) - Supports both QNAP TS-109 and TS-209. ---]] - -register("ts209") - --- Requires CONFIG_KEYBOARD_GPIO enabled in the kernel and --- the kernel module gpio_keys to be loaded. -register("evdev", "/dev/input/by-path/platform-gpio-keys-event-", - 408, "restart_button", - 133, "media_button") - -function power_button( time ) - os.execute("poweroff") -end - -function restart_button( time ) - os.execute("reboot") -end - -function media_button( time ) - piccmd("usbled", "8hz") -end - ---[[ - Fan and temperature control are left disabled until qcontrol - gets a proper daemon mode. - Empty functions are needed to avoid errors. ---]] -function fan_error( ) -end - -function fan_normal( ) -end - -function temp_low( ) -end - -function temp_high( ) -end diff --git a/sys-apps/qcontrol/files/ts409.lua b/sys-apps/qcontrol/files/ts409.lua deleted file mode 100644 index 7720f32673a6..000000000000 --- a/sys-apps/qcontrol/files/ts409.lua +++ /dev/null @@ -1,39 +0,0 @@ ---[[ - Debian configuration file for qcontrol (LUA syntax) - Supports QNAP TS-409. ---]] - -register("ts409") - --- Requires CONFIG_KEYBOARD_GPIO enabled in the kernel and --- the kernel module gpio_keys to be loaded. -register("evdev", "/dev/input/by-path/platform-gpio-keys-event-", - 408, "restart_button", - 133, "media_button") - -function power_button( time ) - os.execute("poweroff") -end - -function restart_button( time ) - os.execute("reboot") -end - -function media_button( time ) - piccmd("usbled", "8hz") -end - ---[[ - Fan and temperature control are left disabled until qcontrol - gets a proper daemon mode. - Empty functions are needed to avoid errors. ---]] -function fan_error( ) -end - -function fan_normal( ) -end - -function temp( temp ) - print("ts409 temperature:", temp) -end diff --git a/sys-apps/qcontrol/qcontrol-0.4.2.ebuild b/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild index 138de65fc67b..663ec6c59200 100644 --- a/sys-apps/qcontrol/qcontrol-0.4.2.ebuild +++ b/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild @@ -1,12 +1,13 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/qcontrol/qcontrol-0.4.2.ebuild,v 1.2 2009/02/03 11:24:36 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/qcontrol/qcontrol-0.4.2-r1.ebuild,v 1.1 2011/04/02 19:28:53 armin76 Exp $ inherit eutils toolchain-funcs DESCRIPTION="Allows to send commands to some microcontrollers, for example to change leds or sound a buzzer" HOMEPAGE="http://qnap.nas-central.org/index.php/PIC_Control_Software" -SRC_URI="http://byronbradley.co.uk/piccontrol/${P}.tar.gz" +SRC_URI="mirror://debian/pool/main/q/qcontrol/${P/-/_}.orig.tar.gz + mirror://debian/pool/main/q/qcontrol/${P/-/_}-6.diff.gz" LICENSE="GPL-3" SLOT="0" @@ -18,33 +19,44 @@ RDEPEND="${DEPEND}" src_unpack () { unpack ${A} + cd "${WORKDIR}" + + epatch *.diff + cd "${S}" + epatch debian/patches/*.patch epatch "${FILESDIR}"/${PV}-Makefile.patch } src_compile() { - emake CC="$(tc-getCC)" || die "emake failed" + emake CC="$(tc-getCC)" qcontrol || die "emake failed" } src_install() { dosbin qcontrol - doman "${FILESDIR}"/qcontrol.1 + doman "${S}"/debian/qcontrol.1 insinto /etc/qcontrol - doins "${FILESDIR}"/*.lua + doins "${S}"/debian/configs/*.lua + newconfd "${FILESDIR}"/conf.d qcontrol + newinitd "${FILESDIR}"/init.d qcontrol +} + +pkg_postinst() { device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \ head -n1 | sed "s/^[^:]*: //") case $device in "QNAP TS-109/TS-209") dosym /etc/qcontrol/ts209.lua /etc/qcontrol.conf ;; + "QNAP TS-119/TS-219") + dosym /etc/qcontrol/ts219.lua /etc/qcontrol.conf ;; "QNAP TS-409") dosym /etc/qcontrol/ts409.lua /etc/qcontrol.conf ;; + "QNAP TS-41x") + dosym /etc/qcontrol/ts41x.lua /etc/qcontrol.conf ;; *) - die "Your device is unsupported" ;; + ewarn "Your device is unsupported" ;; esac - - newconfd "${FILESDIR}"/conf.d qcontrol - newinitd "${FILESDIR}"/init.d qcontrol } |