Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial ebuild for istatd

still need to check dependencies and possible use flags
  • Loading branch information...
commit cf4558e47a9af1c331bfc8d2b435bad352e71066 1 parent 2ed4019
@wired authored
View
5 net-analyzer/istatd/Manifest
@@ -0,0 +1,5 @@
+AUX istatd-gentoo-config.patch 4939 RMD160 90d632a6de254b60d80c714aa258c14f2b1d44c8 SHA1 547d99db783f364201f0398a286802d429172652 SHA256 e82851e7c06c0a89d7ec6fe8eed634468d4a1b57026749f7530a0e28d7f7a7d3
+AUX istatd.confd 57 RMD160 ccc099a9da48979184ea070cce311c54cb38dc43 SHA1 eadc4ce10216ae72167aaf78dc707aecf86bda41 SHA256 3223a4ad1b33bfc9eefc8b9542c200b0840423e1da26b29d660ae500440023a3
+AUX istatd.initd 494 RMD160 8ebe3547935578eac1e527a0451b98c2df588e83 SHA1 2ee6b9a98a043b8fdf959b9e410576fd4221cdf8 SHA256 cd6e538f9701519691f018add1e2558f8fb427bab37c980945a376d0d5b206a2
+DIST istatd-0.5.7.tar.gz 157067 RMD160 6b43228a0b73b9c9c6f1b97eba9e06a05732dd43 SHA1 3cb5d6c6f11edc792e474846a2cb7409829f07ee SHA256 52804d507f03c098b64bf45a6c58dd6c9d77961741024d7cc7e476997b9c8a35
+EBUILD istatd-0.5.7.ebuild 1254 RMD160 627da68c85dde98dea3c994b5852392d141fc260 SHA1 7e98c86eb715db36e70b7d26c611d36fdb0e937e SHA256 7abe9dee45def40359966e0e581d41bcbc49007850234b55f6c7fcc52df89a1d
View
126 net-analyzer/istatd/files/istatd-gentoo-config.patch
@@ -0,0 +1,126 @@
+diff -u -ur istatd-0.5.7-old//configure istatd-0.5.7/configure
+--- istatd-0.5.7-old//configure 2010-10-05 14:18:27.831000001 +0300
++++ istatd-0.5.7/configure 2010-10-05 14:19:17.602000000 +0300
+@@ -5852,7 +5852,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default location of configuration file" >&5
+ $as_echo_n "checking for default location of configuration file... " >&6; }
+ test x"$prefix" = x"NONE" && prefix="$ac_default_prefix"
+-configpath=`eval echo "$sysconfdir"/istat.conf`
++configpath=`eval echo "$sysconfdir"/istatd.conf`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $configpath" >&5
+ $as_echo "$configpath" >&6; }
+
+diff -u -ur istatd-0.5.7-old//configure.ac istatd-0.5.7/configure.ac
+--- istatd-0.5.7-old//configure.ac 2010-10-05 14:18:27.831000001 +0300
++++ istatd-0.5.7/configure.ac 2010-10-05 14:19:17.602000000 +0300
+@@ -221,7 +221,7 @@
+
+ AC_MSG_CHECKING([for default location of configuration file])
+ test x"$prefix" = x"NONE" && prefix="$ac_default_prefix"
+-configpath=`eval echo "$sysconfdir"/istat.conf`
++configpath=`eval echo "$sysconfdir"/istatd.conf`
+ AC_MSG_RESULT([$configpath])
+ AC_DEFINE_UNQUOTED([CONFIG_FILE_PATH],["${configpath}"],[default location of the configuration file])
+
+diff -u -ur istatd-0.5.7-old//daemon.cpp istatd-0.5.7/daemon.cpp
+--- istatd-0.5.7-old//daemon.cpp 2010-10-05 14:18:27.831000001 +0300
++++ istatd-0.5.7/daemon.cpp 2010-10-05 14:19:17.603000001 +0300
+@@ -128,7 +128,7 @@
+ }
+ else
+ {
+- cout << "WARNING: istatd set to run as root in istat.conf! "
++ cout << "WARNING: istatd set to run as root in istatd.conf! "
+ "Not recommended." << endl;
+ }
+ }
+diff -u -ur istatd-0.5.7-old//DEVELOPERS.txt istatd-0.5.7/DEVELOPERS.txt
+--- istatd-0.5.7-old//DEVELOPERS.txt 2010-10-05 14:18:27.831000001 +0300
++++ istatd-0.5.7/DEVELOPERS.txt 2010-10-05 14:19:17.604000001 +0300
+@@ -60,7 +60,7 @@
+
+ $ ./configure --prefix=/opt/istat
+
+- If you wish to have the configuration file, istat.conf, stored in /etc,
++ If you wish to have the configuration file, istatd.conf, stored in /etc,
+ then you can specify this location in the configure command:
+
+ $ ./configure --sysconfdir=/etc
+diff -u -ur istatd-0.5.7-old//resource/istat.conf istatd-0.5.7/resource/istat.conf
+--- istatd-0.5.7-old//resource/istat.conf 2010-10-05 14:18:27.831000001 +0300
++++ istatd-0.5.7/resource/istat.conf 2010-10-05 14:19:49.945000000 +0300
+@@ -1,15 +1,15 @@
+ #
+-# /etc/istat.conf: Configuration for iStat server
++# /etc/istatd.conf: Configuration for iStat server
+ #
+
+ # network_addr 127.0.0.1
+ # network_port 5109
+ server_code 12345
+-# server_user istat
+-# server_group istat
+-# server_socket /tmp/istatd.sock
+-# server_pid /var/run/istat/istatd.pid
+-# cache_dir /var/cache/istat
++server_user istatd
++server_group istatd
++server_socket /tmp/istatd.sock
++server_pid /var/run/istatd/istatd.pid
++cache_dir /var/cache/istatd
+
+ # Note: Only support for one network interface, limited by client.
+ monitor_net ( eth0 )
+diff -u -ur istatd-0.5.7-old//resource/istat.conf.5 istatd-0.5.7/resource/istat.conf.5
+--- istatd-0.5.7-old//resource/istat.conf.5 2010-10-05 14:18:27.831000001 +0300
++++ istatd-0.5.7/resource/istat.conf.5 2010-10-05 14:19:21.915000001 +0300
+@@ -1,8 +1,8 @@
+ .Dd 2009-05-17
+-.Dt istat.conf 5
++.Dt istatd.conf 5
+ .Os
+ .Sh NAME
+-.Nm istat.conf
++.Nm istatd.conf
+ .Nd configuration file for istatd
+
+ .Sh OPTIONS
+diff -u -ur istatd-0.5.7-old//resource/istatd.1 istatd-0.5.7/resource/istatd.1
+--- istatd-0.5.7-old//resource/istatd.1 2010-10-05 14:18:27.831000001 +0300
++++ istatd-0.5.7/resource/istatd.1 2010-10-05 14:19:21.915000001 +0300
+@@ -42,9 +42,9 @@
+ .El
+ .Pp
+ .Sh FILES
+-/etc/istat.conf
++/etc/istatd.conf
+ .Pp
+ Configuration for network settings, lock code, running user, devices to monitor and more.
+ .El
+ .Sh SEE ALSO
+-.Xr istat.conf 5
++.Xr istatd.conf 5
+diff -u -ur istatd-0.5.7-old//resource/Makefile.am istatd-0.5.7/resource/Makefile.am
+--- istatd-0.5.7-old//resource/Makefile.am 2010-10-05 14:18:27.831000001 +0300
++++ istatd-0.5.7/resource/Makefile.am 2010-10-05 14:19:21.915000001 +0300
+@@ -1,4 +1,4 @@
+
+-dist_man_MANS = istatd.1 istat.conf.5
++dist_man_MANS = istatd.1 istatd.conf.5
+
+-dist_sysconf_DATA = istat.conf
++dist_sysconf_DATA = istatd.conf
+diff -u -ur istatd-0.5.7-old//resource/Makefile.in istatd-0.5.7/resource/Makefile.in
+--- istatd-0.5.7-old//resource/Makefile.in 2010-10-05 14:18:27.831000001 +0300
++++ istatd-0.5.7/resource/Makefile.in 2010-10-05 14:19:21.916000001 +0300
+@@ -178,8 +178,8 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-dist_man_MANS = istatd.1 istat.conf.5
+-dist_sysconf_DATA = istat.conf
++dist_man_MANS = istatd.1 istatd.conf.5
++dist_sysconf_DATA = istatd.conf
+ all: all-am
+
+ .SUFFIXES:
View
2  net-analyzer/istatd/files/istatd.confd
@@ -0,0 +1,2 @@
+#istatd options (see /usr/bin/istat -h)
+ISTATD_OPTS="-d"
View
26 net-analyzer/istatd/files/istatd.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or
+# later
+# $Header: $
+
+DAEMON=/usr/bin/istatd
+PIDFILE=/var/run/istatd/istatd.pid
+
+depend() {
+ need net
+}
+
+start () {
+ ebegin "Starting istatd"
+ start-stop-daemon --start --quiet \
+ -c istatd:istatd --exec ${DAEMON} -- --pid=${PIDFILE} ${ISTATD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping istatd"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ eend $?
+}
+
View
54 net-analyzer/istatd/istatd-0.5.7.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit eutils autotools
+
+DESCRIPTION="Daemon that serves statistics to the iStat iPhone application"
+HOMEPAGE="http://bjango.com/help/istat/istatserverlinux/"
+SRC_URI="http://github.com/downloads/tiwilliam/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-libs/libxml2
+"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup istatd
+ enewuser istatd -1 -1 /dev/null istatd
+}
+
+src_prepare() {
+ # istat -> istatd for consistency
+ epatch "${FILESDIR}/${PN}-gentoo-config.patch"
+
+ eautoreconf
+
+ mv resource/istat.conf resource/istatd.conf || die "rename failed"
+ mv resource/istat.conf.5 resource/istatd.conf.5 || die "rename failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "installation failed"
+
+ newinitd "${FILESDIR}"/istatd.initd istatd || die "newinitd failed"
+ newconfd "${FILESDIR}"/istatd.confd istatd || die "newconfd failed"
+
+ keepdir /var/run/istatd
+ fowners istatd:istatd /var/run/istatd
+ keepdir /var/cache/istatd
+ fowners istatd:istatd /var/cache/istatd
+}
+
+pkg_postinst() {
+ elog
+ elog "Don't forget to edit /etc/istat.conf and change the server access code!"
+ elog
+}
Please sign in to comment.
Something went wrong with that request. Please try again.