summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuflone2015-06-13 17:59:16 +0200
committerMuflone2015-06-13 17:59:16 +0200
commit1b7f43695e6cd9cc60b3b575d015c325af4a63f8 (patch)
tree922013258964b5abf8296b2ba6b02b147baf0fb7
downloadaur-1b7f43695e6cd9cc60b3b575d015c325af4a63f8.tar.gz
Initial import
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD62
-rw-r--r--cpu-g-bzr.install11
-rw-r--r--cpu-g_desktop.patch13
-rw-r--r--xorg_version.patch11
5 files changed, 123 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..001174a4607
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = cpu-g-bzr
+ pkgdesc = An application that shows useful information about your CPU, Motherboard and some general information about your system.
+ pkgver = r13
+ pkgrel = 1
+ epoch = 1
+ url = http://cpug.sourceforge.net/
+ install = cpu-g-bzr.install
+ arch = any
+ license = GPL3
+ makedepends = bzr
+ depends = python
+ depends = pygtk
+ depends = pciutils
+ depends = hicolor-icon-theme
+ optdepends = mesa-demos: get information about the graphic driver and OpenGL support
+ provides = cpu-g
+ conflicts = cpu-g
+ source = bzr+lp:/cpug
+ source = cpu-g_desktop.patch
+ source = xorg_version.patch
+ sha256sums = SKIP
+ sha256sums = dbe89f2fd631880dc2fd6239fc035fe16b91543a5a80acc57c2ec407d8e00a34
+ sha256sums = 6a3af8148005bb255591681fc8a32568c07eee705012116f8a80a356130fcc42
+
+pkgname = cpu-g-bzr
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..642964ff738
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Muflone http://www.muflone.com/contacts/english/
+
+pkgname=cpu-g-bzr
+_pkgname=cpug
+pkgver=r13
+pkgrel=1
+epoch=1
+pkgdesc="An application that shows useful information about your CPU, Motherboard and some general information about your system."
+url="http://cpug.sourceforge.net/"
+license=('GPL3')
+arch=('any')
+depends=('python' 'pygtk' 'pciutils' 'hicolor-icon-theme')
+optdepends=('mesa-demos: get information about the graphic driver and OpenGL support')
+makedepends=('bzr')
+provides=('cpu-g')
+conflicts=('cpu-g')
+source=('bzr+lp:/cpug'
+ 'cpu-g_desktop.patch'
+ 'xorg_version.patch')
+sha256sums=('SKIP'
+ 'dbe89f2fd631880dc2fd6239fc035fe16b91543a5a80acc57c2ec407d8e00a34'
+ '6a3af8148005bb255591681fc8a32568c07eee705012116f8a80a356130fcc42')
+install="${pkgname}.install"
+
+pkgver() {
+ cd "${_pkgname}"
+ echo "r$(bzr revno)"
+}
+
+prepare() {
+ cd "${_pkgname}"
+ patch -p0 -i "${srcdir}/cpu-g_desktop.patch"
+ patch -p0 -i "${srcdir}/xorg_version.patch"
+}
+
+package() {
+ cd "${_pkgname}"
+ python2 setup.py install --root="${pkgdir}" --prefix=/usr
+
+ # Create further directories (setup.py is not complete enough)
+ install -d "${pkgdir}/usr/share/man/man1"
+
+ # Copying files
+ cp -r "gfx" "${pkgdir}/usr/share/${_pkgname}"
+
+ # Copying icons
+ for _size in 48 128
+ do
+ install -m 755 -d "${pkgdir}/usr/share/icons/hicolor/${_size}x${_size}/apps"
+ install -m 644 "icon-${_size}.png" "${pkgdir}/usr/share/icons/hicolor/${_size}x${_size}/apps/cpu-g.png"
+ done
+ # Remove pixmaps folder
+ rm -rf "${pkgdir}/usr/share/pixmaps"
+
+ # Compress and install the man page
+ gzip -cf9 "doc/cpu-g.1" > "doc/cpu-g.1.gz"
+ install -Dm644 "doc/cpu-g.1.gz" "${pkgdir}/usr/share/man/man1/"
+ [ -e "doc/cpu-g.1.gz" ] && rm "doc/cpu-g.1.gz"
+
+ # Rename the main script
+ mv "${pkgdir}/usr/bin/cpu-g.py" "${pkgdir}/usr/bin/cpu-g"
+}
diff --git a/cpu-g-bzr.install b/cpu-g-bzr.install
new file mode 100644
index 00000000000..d59dca6e808
--- /dev/null
+++ b/cpu-g-bzr.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/cpu-g_desktop.patch b/cpu-g_desktop.patch
new file mode 100644
index 00000000000..615d92f9db2
--- /dev/null
+++ b/cpu-g_desktop.patch
@@ -0,0 +1,13 @@
+--- cpu-g.desktop 2015-03-15 19:21:01.819119000 +0100
++++ cpu-g.desktop.orig 2015-03-15 19:22:34.689120205 +0100
+@@ -3,8 +3,8 @@
+ Encoding=UTF-8
+ Name=CPU-G
+ Comment=CPU-G collects and displays information about your CPU, RAM, Motherboard
+-Exec=python /usr/bin/cpu-g.py
+-Icon=/usr/share/pixmaps/cpu-g_128.png
++Exec=cpu-g
++Icon=cpu-g
+ Terminal=false
+ Type=Application
+ StartupNotify=true
diff --git a/xorg_version.patch b/xorg_version.patch
new file mode 100644
index 00000000000..84c5640eadb
--- /dev/null
+++ b/xorg_version.patch
@@ -0,0 +1,11 @@
+--- cpu-g.py.orig 2015-03-15 19:34:44.627931000 +0100
++++ cpu-g.py 2015-03-15 19:35:31.935819377 +0100
+@@ -350,7 +350,7 @@
+ return 'N/A'
+
+ def xver(self):
+- command = subprocess.Popen(['Xorg', '-version'],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
++ command = subprocess.Popen(['/usr/lib/xorg-server/Xorg', '-version'],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+ stdout, stderr = command.communicate()
+ return re.findall("X\.Org X Server (.*)", stderr)[0]
+