summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Arizmendi <silmano@gmail.com>2013-01-29 18:41:52 +0100
committerPedro Arizmendi <silmano@gmail.com>2013-01-29 18:41:52 +0100
commit6de0bbc1c23bcb86e6d7636c696acab493683552 (patch)
treec201bfd2dfde21a6d68cd0bc772cda200c0cfacb /net-wireless
parentUpdated install methods. Updated metadata. (diff)
downloadsilmano-6de0bbc1c23bcb86e6d7636c696acab493683552.tar.gz
silmano-6de0bbc1c23bcb86e6d7636c696acab493683552.tar.bz2
silmano-6de0bbc1c23bcb86e6d7636c696acab493683552.zip
Lots of changes, see below:
- Added man pages to /files. - Added init.d script for Gentoo. - Added patch for human readable kbps. - Removed use from metadata. - Updated ebuild for the changes above.
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/eyefiserver/Manifest8
-rw-r--r--net-wireless/eyefiserver/eyefiserver-2.3_rc2.ebuild19
-rw-r--r--net-wireless/eyefiserver/files/eyefiserver.142
-rw-r--r--net-wireless/eyefiserver/files/eyefiserver.conf.5141
-rw-r--r--net-wireless/eyefiserver/files/eyefiserverd34
-rw-r--r--net-wireless/eyefiserver/files/human_readable.patch52
-rw-r--r--net-wireless/eyefiserver/metadata.xml4
7 files changed, 282 insertions, 18 deletions
diff --git a/net-wireless/eyefiserver/Manifest b/net-wireless/eyefiserver/Manifest
index 6b89026..1f8794b 100644
--- a/net-wireless/eyefiserver/Manifest
+++ b/net-wireless/eyefiserver/Manifest
@@ -1,3 +1,7 @@
+AUX eyefiserver.1 1090 SHA256 6b2a8e3ad1233cffd615a6c9dec4482e0da6d2e2999ba139b789b2f54113f72a SHA512 fba07e64c56f63eeb35a1843c255cefcb472cd4e2c2a6d03a016cb184f0957f22308e18879a5e888e04420fb0f4f0ba9679a2092a2c690980f2e2d6c13ebe564 WHIRLPOOL 530c2f5381d09c6cb5458e7153b008ab7be6497fea7801cfe66ec031548734208c68f8beeb5c40577aa6212eaab0bba157b92fe00ec713e756fce7e2b3b6016e
+AUX eyefiserver.conf.5 3993 SHA256 063d84d053a9656468cf06a760d99c6491aee2716c6f0de96bdeab76d83654ed SHA512 ef6828512177f841c0af6a7ed636bd730c02a80dd45ad40dd16a19074ec571397b2a1721d9955173798ed1886783ede771f687d329200bbe4adcf4d2c58b4c18 WHIRLPOOL a47fbf3ead74363f8755dc9d98d12607210ad05d3bc8dbd6c7e2db4731a137fd37118600f14783982c1543f6d7ce96220371d82ccbaa97f78dc4abc62bd28ab3
+AUX eyefiserverd 549 SHA256 78f1aad205f1407b1f30a207bd33ac7d87c7d5a37966b361726fa70bb4a18fc0 SHA512 8b098625260101b7c5dc3afb9d460685aa8ef8c5935e7250eb774f396217c7695c156556152cd5642908f43e1576d1ccab5aefc0b539690b9177ffb0d4b7738e WHIRLPOOL 16faaa7676c0763aecb7de2268b4e4a9a9c8a1f7c515bcdfc1fe718869c413a3c41344b63e2af9da2b96ca82ea8c38963f0fef7bd72edf9161c29c8b62326e80
+AUX human_readable.patch 2074 SHA256 572e90ada20b28fe92c3dee6b9c781c9576ac1549b82ce3310f98f8c11a465cd SHA512 455ca31005fef0e0ef6571f7cfdd53af93ba72057b1117b53eebe101b23d77e7c14d6d62a1606d4488e3f05beb8766e55a3aff12dbf4f0600a1e57497e9f3ca5 WHIRLPOOL 9e3680be1ff4914474f741e9e08339199197d6c4beba97dc22025fb803ceba860991e4cd9f487a03c7ca5f232d2ac748fce6ec3504ea945b03751838d9d519c8
DIST 2.3_rc2.tar.gz 18825 SHA256 7932b162ec2c10d7df95c77456316f6412055ceaff733a49698fe25d7f03b04f SHA512 92fb919227f892a409606119aedb5e44e7c17e1af249b5a349009622febaf5271822f87a935373305fa72431ed6ffbcbe34ea6201a722a80f5678e8ae348e979 WHIRLPOOL ac82753ccbc2aefaec1b39d6ccb48ca27f9c29c0d14a09d39cd52b5e61f238bcbba25480e62224cf784fcb187b958ffc86e0c01394dac4a068a51ba6e4728034
-EBUILD eyefiserver-2.3_rc2.ebuild 1230 SHA256 791fcddfe73959585f7ec5f4f2ac1a352ee6194b9a50671859d5f058054fef2a SHA512 015fb0e5e47a9e2e27a10e93f03a95012a246052ce745f5d0a4d079c00c2a06a7c077b59bf2cbb08b34d6095f1870a35d52328d190ed51fbeb258c9ecd449835 WHIRLPOOL 87c8e412f9a9ddf767613a931e1cf54ee50b75b0a8d92b5bf5802435b5cfcf3e631c4409c09584b1f84551902e74f3771a0403152d80f3907d4afae0a765c35f
-MISC metadata.xml 622 SHA256 4ecb2a062dca24a809c737534c930d2148490556d7c9957099d90c2fd3d84700 SHA512 9721dfd444bcb1fe06357c361f37757c28f05bf6147a174d12f2dbe3ab8ffe045b7576aad5dcf37cb3601d9a03ba7de72a429f17813c0541cd96c249dbed0c9d WHIRLPOOL 23e6bf40c751f7a33b37aae33d61793d2a572ce5124d3243d4221ae109d8864fef0b3a79c4b43221e250154fca741fe80ef680352a6486a4321c1b41a87caaca
+EBUILD eyefiserver-2.3_rc2.ebuild 957 SHA256 dc6ae9aeabff0f5794b4763af035d17751ead4eba159fa5b995c810264bdaad1 SHA512 75484a0a5e4e88e0836c9c13703a674a791a791ddbd961e1c87f2e2acbc06d13659a7e50f82dd326084b8858b20b8672702c6c8860a2eed64cab286178ba9873 WHIRLPOOL aab92970ca0fa6b187ca96d61f19b371ba7299b90f594398d6ecaa498a5cb3085f38e9ee6fae19f71dcdf01735cf40f5437904f0d2b06ca03166810560ce8c04
+MISC metadata.xml 516 SHA256 d6375082e46102cf60621d1189fecf459ed24f054254173e7a469399051e7f5b SHA512 f4192b462ab4f9ea968a7a9918c8cb0d27611b904cf2e39465f0f662428aee4cd7417a576f1ec3199e24ff233cff5ff13c8b8c24ce0cb90e71268480da75f5cc WHIRLPOOL 81ff17ece55424cb98071c2841aa6a9f5125080180d0247eef6fd471361db3424edc20b13a285767843a41d95fc46a18656b827b666abb745a9af380f92c9626
diff --git a/net-wireless/eyefiserver/eyefiserver-2.3_rc2.ebuild b/net-wireless/eyefiserver/eyefiserver-2.3_rc2.ebuild
index cef0eb1..132cf8f 100644
--- a/net-wireless/eyefiserver/eyefiserver-2.3_rc2.ebuild
+++ b/net-wireless/eyefiserver/eyefiserver-2.3_rc2.ebuild
@@ -4,6 +4,8 @@
EAPI="2"
+inherit eutils
+
DESCRIPTION="An open source Eye-Fi Server written in Python."
HOMEPAGE="http://returnbooleantrue.blogspot.com/"
SRC_URI="https://github.com/nirgal/EyeFiServer/archive/${PVR}.tar.gz"
@@ -11,10 +13,8 @@ SRC_URI="https://github.com/nirgal/EyeFiServer/archive/${PVR}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="doc"
-DEPEND="dev-lang/python
- doc? ( app-text/txt2man )"
+DEPEND="dev-lang/python"
src_unpack() {
unpack ${A}
@@ -22,23 +22,18 @@ src_unpack() {
src_prepare() {
cd "${WORKDIR}/EyeFiServer-${PVR}"
- if use doc ; then
- txt2man -t eyefiserver -r eyefiserver -s 1 -v "Executable programs or shell commands" -I file doc/eyefiserver.txt > doc/eyefiserver.1
- txt2man -t eyefiserver.conf -r eyefiserver -s 5 -v "File formats and conventions" doc/eyefiserver.conf.txt > doc/eyefiserver.conf.5
- fi
+ epatch "${FILESDIR}/human_readable.patch"
}
src_install() {
cd "${WORKDIR}/EyeFiServer-${PVR}"
insinto /etc
doins etc/eyefiserver.conf || die
- doinitd etc/init.d/eyefiserver || die
+ doinitd "${FILESDIR}/eyefiserverd" || die
exeinto /usr/bin
doexe src/eyefiserver || die
- if use doc ; then
- doman doc/eyefiserver.1 || die
- doman doc/eyefiserver.conf.5 || die
- fi
+ doman "${FILESDIR}/eyefiserver.1" || die
+ doman "${FILESDIR}/eyefiserver.conf.5" || die
}
pkg_postinst() {
diff --git a/net-wireless/eyefiserver/files/eyefiserver.1 b/net-wireless/eyefiserver/files/eyefiserver.1
new file mode 100644
index 0000000..5d9d2e5
--- /dev/null
+++ b/net-wireless/eyefiserver/files/eyefiserver.1
@@ -0,0 +1,42 @@
+.\" Text automatically generated by txt2man
+.TH eyefiserver 1 "29 January 2013" "eyefiserver" "Executable programs or shell commands"
+.SH NAME
+\fBeyefiserver \fP- Daemon for receiving files from Eye-Fi SD devices
+\fB
+.SH SYNOPSIS
+.nf
+.fam C
+\fBeyefiserver\fP [\fIoptions\fP]
+
+.fam T
+.fi
+.fam T
+.fi
+.SH DESCRIPTION
+This starts an HTTP server on port 59278 that will receive files.
+.SH OPTIONS
+.TP
+.B
+\fB--help\fP
+Display a short usage help.
+.TP
+.B
+\fB--confile\fP \fIfile\fP
+Additional location for configuration files. Options are first read in /etc/eyefiserver.conf, then in ~/eyefiserver.conf. Any \fIfile\fP name specified here will overwrite the values already parsed. That option might be used multiple times.
+.TP
+.B
+\fB--log\fP \fIfile\fP
+Log to \fIfile\fP.
+.SH FILES
+.IP \(bu 3
+/etc/eyefiserver.conf
+.IP \(bu 3
+~/eyefiserver.conf
+.IP \(bu 3
+/var/log/eyefiserver.log
+.SH AUTHORS
+\fBeyefiserver\fP was written by Jeffrey Tchang.
+.PP
+This manual page was written by Jean-Michel Nirgal Vourgère for the Debian project (but may be used by others).
+.SH SEE ALSO
+\fBeyefiserver.conf\fP(5)
diff --git a/net-wireless/eyefiserver/files/eyefiserver.conf.5 b/net-wireless/eyefiserver/files/eyefiserver.conf.5
new file mode 100644
index 0000000..a178754
--- /dev/null
+++ b/net-wireless/eyefiserver/files/eyefiserver.conf.5
@@ -0,0 +1,141 @@
+.\" Text automatically generated by txt2man
+.TH eyefiserver.conf 5 "29 January 2013" "eyefiserver" "File formats and conventions"
+.SH NAME
+\fBeyefiserver.conf \fP- Settings file for eyefiserver
+\fB
+.SH DESCRIPTION
+/etc/eyefiserver.conf is organised in sections whose name are enclosed in brackets.
+.PP
+The global section is named [EyeFiServer]. The names of the other optional sections are the MAC address of the Eye-Fi card. The macaddress must be in lower case and without dashes. For example, if your card has a MAC address 00-18-56-50-EF-F9, the section should be named [00185650eff9].
+.PP
+All keys described bellow are searched first in the section specific to the Eye-Fi card, then, if not found, it is search in the global [EyeFiServer] section. This means you can set up a global default value, then override it for a few specific cards.
+.PP
+You don't need card specific section at all if you have only one Eye-Fi card.
+.PP
+There is only one compulsory key, the upload_key. See bellow.
+.SH KEYS
+
+.TP
+.B
+loglevel
+This defines the verbosity of the server. Valid values are DEBUG, INFO, WARNING, ERROR and FATAL.
+.RS
+.PP
+Default value is DEBUG.
+.PP
+This is the one exception to section behaviour as this key is only allowed in the [EyeFiServer] global section.
+.RE
+.TP
+.B
+upload_key
+To use this script you need to have your Eye-Fi upload key.
+.RS
+.PP
+You can find it after configuring the card, which you can currently on do only on windows or mac.
+.PP
+Windows: see C:\\Documents and Settings\\<User>\\Application Data\\Eye-Fi\\Settings.xml
+.PP
+Mac: ~/Applications Data/Eye-Fi/Settings.xml
+.RE
+.TP
+.B
+upload_dir
+This is the location where the files from the Eye-Fi card will be put.
+.RS
+.PP
+Starting ~ will be replaced by user home directory.
+.PP
+%X will be replaced by a datetime fragment according to python time.strftime format: For exemple, on January 1st 2013, running as www-data, upload_dir=~/eyefi/%Y/%Y%m%d will put files in /var/www/eyefi/2013/20130101/. See http://docs.python.org/library/time.html#time.strftime.
+.PP
+Default value is ~/eyefi.
+.RE
+.TP
+.B
+complete_execute
+Name of a command to be run after each file download.
+.RS
+.PP
+Example on Windows:
+.PP
+complete_execute=C:\\Windows\\system32\\mspaint.exe
+.PP
+Example on Linux:
+.PP
+complete_execute=/usr/bin/display
+.RE
+.TP
+.B
+progress_execute
+This parameter executes the specified command every few seconds while file is being received.
+.RS
+.PP
+Parameters of the called program:
+.PP
+$1: the full file path of the temporary TAR file. Thumbnail can be extracted from the partial file.
+.PP
+$2: final tar size in bytes
+.PP
+$3: speed in bps
+.RE
+.TP
+.B
+use_date_from_file
+This can be On or Off.
+.RS
+.PP
+upload_dir key might contain variable parts such as %Y%m%d, that are replaced by the datetime values.
+.PP
+If use_date_from_file is On, the reference date will be the one the picture was taken rather than the transfer date.
+.RE
+.TP
+.B
+integrity_verification
+This can be On or Off.
+.RS
+.PP
+When turned Off, it disables file integrity checks. This used to be necessary when downloading large files, because the algorithm was so slow that timeout occurred. This should no longer be the case.
+.PP
+Default value is On.
+.SH EXAMPLES
+.SS MINIMAL EXAMPLE
+
+[EyeFiServer]
+.PP
+upload_key=774e46f14990456a9ab7b4d22f1da138
+.SS MULTICARD EXAMPLE
+
+[EyeFiServer]
+.PP
+loglevel=INFO
+.PP
+[00185650efe9]
+.PP
+upload_key=774e46f14990456a9ab7b4d22f1da138
+.PP
+upload_dir=/var/www/eyefi/%Y/card1/%Y%m%d
+.PP
+[00185650efea]
+.PP
+upload_key=11a3e229084349bc25d97e29393ced1d
+.PP
+upload_dir=/var/www/eyefi/%Y/card2/%Y%m%d
+.SS PROGRESS METER
+#!/bin/bash
+.PP
+# That file is an example for progress_execute target
+.PP
+# It requires X server access, run eyefiserver as a regular user
+.PP
+FILENAME=$1
+.PP
+TARGETSIZE=$2
+.PP
+SPEED=$3
+.PP
+notify-send \fB-u\fP low "Receiving $FILENAME" "Speed: $SPEED bps"
+.SH AUTHORS
+eyefiserver was written by Jeffrey Tchang.
+.PP
+This manual page was written by Jean-Michel Nirgal Vourgère.
+.SH SEE ALSO
+\fBeyefiserver\fP(1)
diff --git a/net-wireless/eyefiserver/files/eyefiserverd b/net-wireless/eyefiserver/files/eyefiserverd
new file mode 100644
index 0000000..1c3cd0c
--- /dev/null
+++ b/net-wireless/eyefiserver/files/eyefiserverd
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+NAME=eyefiserver
+BINARY=/usr/bin/${NAME}
+PIDFILE=/var/run/${NAME}.pid
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ ebegin "Starting Eye-Fi Server"
+ start-stop-daemon \
+ --start \
+ --make-pidfile \
+ --pidfile $PIDFILE \
+ --background \
+ --name $NAME \
+ --exec $BINARY
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Eye-Fi Server"
+ start-stop-daemon \
+ --stop \
+ --signal 15 \
+ --pidfile $PIDFILE
+ eend $?
+}
diff --git a/net-wireless/eyefiserver/files/human_readable.patch b/net-wireless/eyefiserver/files/human_readable.patch
new file mode 100644
index 0000000..707e54d
--- /dev/null
+++ b/net-wireless/eyefiserver/files/human_readable.patch
@@ -0,0 +1,52 @@
+# Display transfer message as INFO and not as DEBUG.
+# Display kbps as human readable speed.
+
+--- src/eyefiserver.orig 2012-10-17 15:44:55.000000000 +0200
++++ src/eyefiserver 2013-01-29 16:46:50.315732000 +0100
+@@ -81,6 +81,19 @@
+ eyeFiLogger = logging.Logger("eyeFiLogger", logging.DEBUG)
+
+
++def human_bps(bps):
++ """
++ human-readable bytes per second, e.g. 13 KB/s, 4.1 MB/s, 102 bytes/s, etc.
++ """
++ bps = float(bps)
++ if bps < 1024:
++ return "%d Byte%s/s" % (bps, bps != 1 and "s" or "")
++ if bps < 1024 * 1024:
++ return "%.1f KB/s" % (bps / 1024)
++ if bps < 1024 * 1024 * 1024:
++ return "%.1f MB/s" % (bps / (1024 * 1024))
++ return "%.1f GB/s" % (bps / (1024 * 1024 * 1024))
++
+
+ class IntegrityDigestFile(file):
+ """
+@@ -610,13 +623,14 @@
+ + elapsed_time.seconds \
+ + elapsed_time.microseconds / 1000000.
+
+- speed = (received_length-speedtest_startsize)/elapsed_seconds*8
+- eyeFiLogger.debug("%s: Read %s / %s bytes (%02.02f%%) %d kbps",
++ speed = (received_length - speedtest_startsize) / elapsed_seconds * 8
++ human_speed = human_bps(speed)
++ eyeFiLogger.info("%s: Read %s / %s bytes (%02.02f%%) %s",
+ soapdata['filename'],
+ received_length,
+ content_length,
+ received_length * 100. / content_length,
+- speed/1000
++ human_speed
+ )
+
+ speedtest_starttime = datetime.utcnow()
+@@ -629,7 +643,7 @@
+ execute_cmd = [execute_cmd,
+ tarpath,
+ str(tarfinalsize),
+- str(speed)]
++ human_speed]
+ eyeFiLogger.debug('Executing command "%s"',
+ ' '.join(execute_cmd))
+ subprocess.Popen(execute_cmd)
diff --git a/net-wireless/eyefiserver/metadata.xml b/net-wireless/eyefiserver/metadata.xml
index c38c920..c2caefe 100644
--- a/net-wireless/eyefiserver/metadata.xml
+++ b/net-wireless/eyefiserver/metadata.xml
@@ -12,9 +12,5 @@
from internet, granting the function to save the photos
on a local LAN.
</longdescription>
- <use>
- <flag name="doc">Generates man pages for the server and
- the configuration file.</flag>
- </use>
</pkgmetadata>