diff options
author | Muflone | 2019-08-31 18:05:51 +0200 |
---|---|---|
committer | Muflone | 2019-08-31 18:05:51 +0200 |
commit | 774b937f97001b796ea844e79c1a1efdeb9f8a5b (patch) | |
tree | 1cfa1780a258e6301eaa1a7bd860fa4a3ec006b7 | |
download | aur-774b937f97001b796ea844e79c1a1efdeb9f8a5b.tar.gz |
New package cpu-g-git 0.16.2.1ubuntu0.r44.25478f0-1
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | ubuntu_to_arch.patch | 54 |
3 files changed, 166 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..48c125b07697 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +pkgbase = cpu-g-git + pkgdesc = An application that shows useful information about your CPU, Motherboard and some general information about your system. + pkgver = 0.16.2.1ubuntu0.r44.25478f0 + pkgrel = 1 + url = https://github.com/atareao/cpu-g + arch = any + license = GPL3 + makedepends = git + depends = gtk3 + depends = gobject-introspection + depends = mesa-demos + depends = pciutils + depends = procps-ng + depends = wmctrl + depends = python-gobject + depends = python-matplotlib + depends = python-cairo + depends = python-psutil + depends = python-dbus + depends = gtk-update-icon-cache + provides = cpu-g + conflicts = cpu-g + conflicts = cpu-g-bzr + source = git+https://github.com/atareao/cpu-g.git + source = cpu-g_changelog::https://raw.githubusercontent.com/atareao/cpu-g/master/debian/changelog + source = ubuntu_to_arch.patch + sha256sums = SKIP + sha256sums = fd191111fe62f57f5b502ed66475000981c641940ca761718bbead3601824c0f + sha256sums = 45d106456f21b28a7d206aa78f00876b27d544e584098691da2c01944fe2b01e + +pkgname = cpu-g-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c1a45e19b384 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,80 @@ +# Maintainer: Muflone http://www.muflone.com/contacts/english/ + +pkgname=cpu-g-git +_pkgname=${pkgname%-*} +pkgver=0.16.2.1ubuntu0.r44.25478f0 +pkgrel=1 +pkgdesc="An application that shows useful information about your CPU, Motherboard and some general information about your system." +url="https://github.com/atareao/cpu-g" +license=('GPL3') +arch=('any') +depends=('gtk3' 'gobject-introspection' 'mesa-demos' 'pciutils' 'procps-ng' 'wmctrl' + 'python-gobject' 'python-matplotlib' 'python-cairo' 'python-psutil' 'python-dbus' + 'gtk-update-icon-cache') +makedepends=('git') +provides=('cpu-g') +conflicts=('cpu-g' 'cpu-g-bzr') +source=("git+https://github.com/atareao/${_pkgname}.git" + "${_pkgname}_changelog"::"https://raw.githubusercontent.com/atareao/${_pkgname}/master/debian/changelog" + 'ubuntu_to_arch.patch') +sha256sums=('SKIP' + 'fd191111fe62f57f5b502ed66475000981c641940ca761718bbead3601824c0f' + '45d106456f21b28a7d206aa78f00876b27d544e584098691da2c01944fe2b01e') + +pkgver() { + cd "${_pkgname}" + printf "%s.r%s.%s" "$(head -n 1 "${srcdir}/cpu-g_changelog" | cut -d'(' -f 2 | cut -d')' -f 1 | sed 's/-/./')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${_pkgname}" + patch -p1 -i "${srcdir}/ubuntu_to_arch.patch" +} + +build() { + cd "${_pkgname}" + # Compile translations + pushd "po" + for _file in *.po + do + msgfmt "${_file//.po}" -o "${_file//.po}.mo" + done +} + +package() { + cd "${_pkgname}" + + # Copying files + install -m 755 -d "${pkgdir}/usr/share/${_pkgname}" + install -m 755 -t "${pkgdir}/usr/share/${_pkgname}" "bin/${_pkgname}" + install -m 644 -t "${pkgdir}/usr/share/${_pkgname}" "debian/changelog" + + install -m 755 -d "${pkgdir}/usr/share/${_pkgname}/src" + install -m 644 -t "${pkgdir}/usr/share/${_pkgname}/src" src/*.py + + install -m 755 -d "${pkgdir}/usr/share/${_pkgname}/data/distros" + install -m 644 -t "${pkgdir}/usr/share/${_pkgname}/data/distros" data/distros/*.png + + install -m 755 -d "${pkgdir}/usr/share/${_pkgname}/data/graphic_card" + install -m 644 -t "${pkgdir}/usr/share/${_pkgname}/data/graphic_card" data/graphic_card/*.png + + install -m 755 -d "${pkgdir}/usr/share/${_pkgname}/data/icons" + install -m 644 -t "${pkgdir}/usr/share/${_pkgname}/data/icons" "data/icons/${_pkgname}.png" + + install -m 755 -d "${pkgdir}/usr/share/${_pkgname}/data/logos" + install -m 644 -t "${pkgdir}/usr/share/${_pkgname}/data/logos" data/logos/*.png + + install -m 755 -d "${pkgdir}/usr/share/applications" + install -m 755 -t "${pkgdir}/usr/share/applications" "data/${_pkgname}.desktop" + + # Copying icons + for _size in 14 64 192 + do + install -m 755 -d "${pkgdir}/usr/share/icons/hicolor/${_size}x${_size}/apps" + install -m 644 "data/icons/${_pkgname}_${_size}.png" "${pkgdir}/usr/share/icons/hicolor/${_size}x${_size}/apps/cpu-g.png" + done + + # Install executable + install -m 755 -d "${pkgdir}/usr/bin" + ln -s "/usr/share/${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" +} diff --git a/ubuntu_to_arch.patch b/ubuntu_to_arch.patch new file mode 100644 index 000000000000..4a3703566182 --- /dev/null +++ b/ubuntu_to_arch.patch @@ -0,0 +1,54 @@ +diff -Naur cpu-g.orig/bin/cpu-g cpu-g.new/bin/cpu-g +--- cpu-g.orig/bin/cpu-g 2019-08-31 17:47:20.324500394 +0200 ++++ cpu-g.new/bin/cpu-g 2019-08-31 17:47:43.654443166 +0200 +@@ -37,7 +37,7 @@ + sys.path.insert(1, '/opt/extras.ubuntu.com/cpu-g/share/cpu-g') + else: + sys.path.insert(1, +- os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../src'))) ++ os.path.normpath(os.path.join(os.path.realpath(__file__), '../src'))) + from cpug import CPUG + cpug = CPUG() + Gtk.main() +diff -Naur cpu-g.orig/data/cpu-g.desktop cpu-g.new/data/cpu-g.desktop +--- cpu-g.orig/data/cpu-g.desktop 2019-08-31 17:47:20.324500394 +0200 ++++ cpu-g.new/data/cpu-g.desktop 2019-08-31 17:47:43.654443166 +0200 +@@ -1,11 +1,9 @@ +-#!/usr/bin/env xdg-open +- + [Desktop Entry] + Encoding=UTF-8 + Name=CPU-G +-TryExec=/opt/extras.ubuntu.com/cpu-g/bin/cpu-g +-Exec=/opt/extras.ubuntu.com/cpu-g/bin/cpu-g +-Icon=/opt/extras.ubuntu.com/cpu-g/share/icons/cpu-g.png ++TryExec=cpu-g ++Exec=cpu-g ++Icon=cpu-g + StartupNotify=true + Terminal=false + Type=Application +diff -Naur cpu-g.orig/src/comun.py cpu-g.new/src/comun.py +--- cpu-g.orig/src/comun.py 2019-08-31 17:47:20.334500370 +0200 ++++ cpu-g.new/src/comun.py 2019-08-31 17:47:43.654443166 +0200 +@@ -52,8 +52,7 @@ + ROOTDIR = os.path.dirname(__file__) + LANGDIR = os.path.normpath(os.path.join(ROOTDIR, '../template1')) + APPDIR = ROOTDIR +- DEBIANDIR = os.path.normpath(os.path.join(ROOTDIR, '../debian')) +- CHANGELOG = os.path.join(DEBIANDIR, 'changelog') ++ CHANGELOG = os.path.normpath(os.path.join(APPDIR, '../changelog')) + ICON = os.path.normpath(os.path.join(ROOTDIR, '../data/icons/cpu-g.png')) + LOGOSDIR = os.path.normpath(os.path.join(ROOTDIR, '../data/logos')) + DISTROSDIR = os.path.normpath(os.path.join(ROOTDIR, '../data/distros')) +diff -Naur cpu-g.orig/src/cpug.py cpu-g.new/src/cpug.py +--- cpu-g.orig/src/cpug.py 2019-08-31 17:47:20.334500370 +0200 ++++ cpu-g.new/src/cpug.py 2019-08-31 17:48:01.134400236 +0200 +@@ -1177,7 +1177,6 @@ + self.distribution.set_text(inv.distro()) + distro_logo = inv.get_distro_logo() + if distro_logo is not None: +- print(distro_logo) + self.distro_logo.set_from_file(distro_logo) + # + self.graphic_controller.set_text(inv.open_gl('VGA')) |