summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThilo Bangert <bangert@gentoo.org>2009-02-05 21:24:36 +0000
committerThilo Bangert <bangert@gentoo.org>2009-02-05 21:24:36 +0000
commit3e61192e999aaf68d6fb296751e31f351d161aa3 (patch)
tree24ad2f96acf5b690af6fd1d29ae5963a29c45eae /app-admin
parentVersion bump. (diff)
downloadgentoo-2-3e61192e999aaf68d6fb296751e31f351d161aa3.tar.gz
gentoo-2-3e61192e999aaf68d6fb296751e31f351d161aa3.tar.bz2
gentoo-2-3e61192e999aaf68d6fb296751e31f351d161aa3.zip
initial release - smolt - The Fedora hardware profiler - based on contributed ebuild by Peter GAAL (bug #248396) - thanks
(Portage version: 2.2_rc20/cvs/Linux 2.6.28-gentoo i686)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/smolt/ChangeLog13
-rw-r--r--app-admin/smolt/files/smolt-1.2-Makefile-fix-install.patch38
-rw-r--r--app-admin/smolt/files/smolt-1.2-config.py-gentoo-config.patch110
-rw-r--r--app-admin/smolt/files/smolt-init.d28
-rw-r--r--app-admin/smolt/metadata.xml11
-rw-r--r--app-admin/smolt/smolt-1.2.ebuild82
6 files changed, 282 insertions, 0 deletions
diff --git a/app-admin/smolt/ChangeLog b/app-admin/smolt/ChangeLog
new file mode 100644
index 000000000000..98069a9394bf
--- /dev/null
+++ b/app-admin/smolt/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for app-admin/smolt
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/smolt/ChangeLog,v 1.1 2009/02/05 21:24:36 bangert Exp $
+
+*smolt-1.2 (05 Feb 2009)
+
+ 05 Feb 2009; Thilo Bangert <bangert@gentoo.org>
+ +files/smolt-1.2-Makefile-fix-install.patch,
+ +files/smolt-1.2-config.py-gentoo-config.patch, +files/smolt-init.d,
+ +metadata.xml, +smolt-1.2.ebuild:
+ initial release - smolt - The Fedora hardware profiler - based on
+ contributed ebuild by Peter GAAL (bug #248396) - thanks
+
diff --git a/app-admin/smolt/files/smolt-1.2-Makefile-fix-install.patch b/app-admin/smolt/files/smolt-1.2-Makefile-fix-install.patch
new file mode 100644
index 000000000000..399731ed6e71
--- /dev/null
+++ b/app-admin/smolt/files/smolt-1.2-Makefile-fix-install.patch
@@ -0,0 +1,38 @@
+diff -Naur client.orig/Makefile client/Makefile
+--- client.orig/Makefile 2008-11-30 20:31:57.000000000 +0100
++++ client/Makefile 2009-02-04 22:39:14.000000000 +0100
+@@ -42,7 +42,6 @@
+ install -d -m 0755 icons/ $(DATADIR)/$(NAME)/client/icons/
+ cp -adv $(CLIENT_FILES) $(DATADIR)/$(NAME)/client/
+
+-
+ mkdir -p $(DATADIR)/icons/hicolor/16x16/apps/
+ mkdir -p $(DATADIR)/icons/hicolor/22x22/apps/
+ mkdir -p $(DATADIR)/icons/hicolor/24x24/apps/
+@@ -53,12 +52,12 @@
+ cp ./icons/smolt-icon-24.png $(DATADIR)/icons/hicolor/24x24/apps/smolt.png
+ cp ./icons/smolt-icon-32.png $(DATADIR)/icons/hicolor/32x32/apps/smolt.png
+
+- mkdir -p $(DATADIR)/$(NAME)/doc
+- install -p -m 0644 ../doc/PrivacyPolicy $(DATADIR)/$(NAME)/doc
++ #mkdir -p $(DATADIR)/$(NAME)/doc
++ #install -p -m 0644 ../doc/PrivacyPolicy $(DATADIR)/$(NAME)/doc
+
+- gzip -9 man/smoltSendProfile.1 > $(DATADIR)/man/man1/smoltSendProfile.1.gz
+- gzip -9 man/smoltDeleteProfile.1 > $(DATADIR)/man/man1/smoltDeleteProfile.1.gz
+- gzip -9 man/smoltGui.1 > $(DATADIR)/man/man1/smoltGui.1.gz
++ #gzip -9 man/smoltSendProfile.1 > $(DATADIR)/man/man1/smoltSendProfile.1.gz
++ #gzip -9 man/smoltDeleteProfile.1 > $(DATADIR)/man/man1/smoltDeleteProfile.1.gz
++ #gzip -9 man/smoltGui.1 > $(DATADIR)/man/man1/smoltGui.1.gz
+
+ ln -sf $(DATADIR)/$(NAME)/client/sendProfile.py $(BINDIR)/smoltSendProfile
+ ln -sf $(DATADIR)/$(NAME)/client/deleteProfile.py $(BINDIR)/smoltDeleteProfile
+@@ -67,7 +66,7 @@
+ chmod +x $(DATADIR)/$(NAME)/client/*Profile.py
+ chmod +x $(DATADIR)/$(NAME)/client/smoltGui.py
+
+- desktop-file-install --vendor='fedora' --dir=$(DATADIR)/applications ./smolt.desktop
++ #desktop-file-install --vendor='fedora' --dir=$(DATADIR)/applications ./smolt.desktop
+
+ move-mo: $(DIRED_MO_FILES)
+
diff --git a/app-admin/smolt/files/smolt-1.2-config.py-gentoo-config.patch b/app-admin/smolt/files/smolt-1.2-config.py-gentoo-config.patch
new file mode 100644
index 000000000000..e811ab281119
--- /dev/null
+++ b/app-admin/smolt/files/smolt-1.2-config.py-gentoo-config.patch
@@ -0,0 +1,110 @@
+diff -Naur client.orig/config.py client/config.py
+--- client.orig/config.py 2008-11-30 20:31:57.000000000 +0100
++++ client/config.py 2009-02-05 22:16:56.000000000 +0100
+@@ -6,15 +6,9 @@
+ SMOON_URL = "http://www.smolts.org/"
+ SECURE = 0
+
+-
+ #Only a fool would edit what lays beyond here
+ #Are you that fool?
+
+-HW_UUID = "/etc/sysconfig/hw-uuid"
+-PUB_UUID = "/etc/sysconfig/pub-uuid"
+-#ADMIN_TOKEN = "/etc/sysconfig/smolt-token"
+-
+-
+ #These are the defaults taken from the source code.
+ #fs_types = get_config_attr("FS_TYPES", ["ext2", "ext3", "xfs", "reiserfs"])
+ #fs_mounts = get_config_attr("FS_MOUNTS", ["/", "/home", "/etc", "/var", "/boot"])
+@@ -23,86 +17,10 @@
+
+ FS_T_FILTER=False
+ FS_M_FILTER=True
++#TODO gentoo'ify the next line
+ FS_MOUNTS=commands.getoutput('rpm -ql filesystem').split('\n')
+
+-
+-#This will attempt to find the distro.
+-#Uncomment any of the OS lines below to hardcode.
+ OS = os_detect.get_os_info()
+-
+-#For Redhat
+-#try:
+-# OS = file('/etc/redhat-release').read().strip()
+-#except IOError:
+-# OS = "Shadowman!"
+-
+-##For SuSE
+-#try:
+-# OS = file('/etc/SuSE-release').read().split('\n')[0].strip()
+-#except IOError:
+-# OS = "It's a Lizard man!, It changes Colours!"
+-#
+-#
+-#For Debian
+-#try:
+- #this is a bit of a kludge, as /etc/debian-release is
+- #somewhat incomplete in what it gives you
+- #I also figure this should work better in
+- #ubuntu
+-# OS = file('/etc/issue.net').read().strip()
+-#except IOError:
+-# OS = "The swirl, it's Spinning!"
+-
+-
+-##For Frugalware
+-#try:
+-# OS = file('/etc/frugalware-release').read().strip()
+-#except IOError:
+-# OS = "Too cheap to have a version!"
+-#
+-##For Mythvantage
+-#try:
+-# OS = file('/etc/mythvantage-release').read().strip()
+-#except IOError:
+-# OS = "The OS doesn't really exist but in the minds of Holywood"
+-#
+-##For Slackware
+-#try:
+-# OS = file('/etc/slackware-version').read().strip()
+-#except IOError:
+-# OS = "Quit slacking you kids!"
+-#
+-##For Archlinux
+-#try:
+-# if os.path.exists('/etc/arch-release'):
+-# archfile = file('/etc/issue')
+-# archfile.readline()
+-# archrelease = archfile.readline()
+-# archrelease = archrelease.split('\\r')
+-# OS = archrelease[0]
+-# else:
+-# OS = "It's an impossibly tall Arch!"
+-#except IOError:
+-# OS = "It's an impossibly tall Arch!"
+-#
+-##For Crux
+-#try:
+-# if os.path.exists('/etc/issue'):
+-# cruxfile = open('/etc/issue')
+-# cruxrelease = cruxfile.read().strip()
+-# if cruxrelease.find("CRUX") >= 0:
+-# return "CRUX"
+-# else:
+-# return "Chuck Norris"
+-#except IOError:
+-# return "Chuck Norris"
+-#For Gentoo
+-#try:
+-# OS = file('/etc/gentoo-release').read().strip()
+-#except IOError:
+-# OS = "It's the fastest penguin!"
+-
+-
+-#For non RH Distros
+-#HW_UUID = "/etc/smolt/hw-uuid"
+-
++HW_UUID = "/etc/smolt/hw-uuid"
++PUB_UUID = "/etc/smolt/pub-uuid"
++ADMIN_TOKEN = "/etc/smolt/smolt-token"
diff --git a/app-admin/smolt/files/smolt-init.d b/app-admin/smolt/files/smolt-init.d
new file mode 100644
index 000000000000..7cd9406ce0ac
--- /dev/null
+++ b/app-admin/smolt/files/smolt-init.d
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# This shell script enables automated check-ins with Smolt
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/smolt/files/smolt-init.d,v 1.1 2009/02/05 21:24:36 bangert Exp $
+
+lockfile=/var/lock/subsys/smolt
+uuidfile=/etc/smolt/hw-uuid
+
+depend() {
+ use hald
+}
+
+start() {
+ ebegin "Enabling monthly Smolt check-in"
+ if ! [ -f "$uuidfile" ]; then
+ einfo " Generating UUID"
+ cat /proc/sys/kernel/random/uuid > "$uuidfile"
+ fi
+ touch "$lockfile"
+ eend $? "Failed to enable automated check-in"
+}
+
+stop() {
+ ebegin "Disabling monthly Smolt update"
+ rm "$lockfile" 2> /dev/null
+ eend $? "Failed to disable automated check-in"
+}
diff --git a/app-admin/smolt/metadata.xml b/app-admin/smolt/metadata.xml
new file mode 100644
index 000000000000..ad5cc7d1f12e
--- /dev/null
+++ b/app-admin/smolt/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>bangert@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+Smolt is a basic hardware profiler. Its intended to be a profiler to get automated information from users.
+</longdescription>
+</pkgmetadata>
diff --git a/app-admin/smolt/smolt-1.2.ebuild b/app-admin/smolt/smolt-1.2.ebuild
new file mode 100644
index 000000000000..b832c08c967d
--- /dev/null
+++ b/app-admin/smolt/smolt-1.2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/smolt/smolt-1.2.ebuild,v 1.1 2009/02/05 21:24:36 bangert Exp $
+
+inherit python eutils
+
+DESCRIPTION="The Fedora hardware profiler"
+HOMEPAGE="https://fedorahosted.org/smolt/"
+SRC_URI="https://fedorahosted.org/releases/s/m/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="gtk"
+
+DEPEND="virtual/python
+ sys-devel/gettext
+ gtk? ( >=dev-python/pygtk-2.10.3 )"
+
+RDEPEND="${DEPEND}
+ sys-apps/hal
+ >=dev-python/rhpl-0.213
+ >=dev-python/urlgrabber-3.0.0
+ >=dev-python/simplejson-1.7.1"
+
+S="${S}/client"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-config.py-gentoo-config.patch"
+ epatch "${FILESDIR}/${P}-Makefile-fix-install.patch"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "Install failed"
+
+ insinto /usr/share/smolt/client/
+ doins os_detect.py
+
+ dosym /etc/smolt/config.py /usr/share/smolt/client/config.py
+ domenu smolt.desktop
+
+ if ! use gtk; then
+ rm "${D}"/usr/bin/smoltGui
+ rm "${D}"/usr/share/smolt/client/smoltGui.py
+ rm "${D}"/usr/share/smolt/client/gui.py
+ fi
+
+ doman man/smolt{SendProfile,DeleteProfile}.1
+ use gtk && doman man/smoltGui.1
+
+ dodoc ../README ../TODO ../doc/PrivacyPolicy
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+}
+
+pkg_postinst() {
+ python_mod_optimize "${ROOT}"/usr/share/${PN}
+
+ if ! [ -f "${ROOT}"/etc/smolt/hw-uuid ]; then
+ elog "Creating this machines UUID in ${ROOT}/etc/smolt/hw-uuid"
+ cat /proc/sys/kernel/random/uuid > "${ROOT}"/etc/smolt/hw-uuid
+ UUID=$(cat "${ROOT}"/etc/smolt/hw-uuid)
+ elog "Your UUID is: ${UUID}"
+ fi
+ echo
+ elog "Call smoltSendProfile as root in order to initialize your profile."
+ echo
+ elog "You can withdraw it from the server if you wish to with"
+ elog " smoltDeleteProfile any time later on."
+ echo
+
+ if use gtk && has_version "<virtual/python-2.5"; then
+ elog "If you want to view your profile on the web from within smoltGui,"
+ elog "you should have a link mozilla-firefox -> firefox in your path."
+ echo
+ fi
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+}