diff options
author | gardenapple | 2020-08-02 23:16:51 +0300 |
---|---|---|
committer | gardenapple | 2020-08-02 23:16:51 +0300 |
commit | f5e7b17f451d09c07f1b0a1b691df1bd3f55a8c0 (patch) | |
tree | 36c122466ed80fa6c8432b735ef4fd874a22bcd3 | |
parent | 839526035ece8f93b06dcc001680df56e702d0d8 (diff) | |
download | aur-f5e7b17f451d09c07f1b0a1b691df1bd3f55a8c0.tar.gz |
Create -gtk3-git package (re-wrote basically everything)
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | fahcontrol-icon-path-linux.patch | 20 |
4 files changed, 72 insertions, 24 deletions
@@ -1,15 +1,20 @@ -pkgbase = fahcontrol - pkgdesc = Graphical monitor and control utility for the Folding@home client - pkgver = 7.6.13 - pkgrel = 2 +pkgbase = fahcontrol-gtk3-git + pkgdesc = Graphical monitor and control utility for the Folding@home client (python3/GTK3 fork) + pkgver = r156.7ae5c23 + pkgrel = 1 url = https://foldingathome.org arch = any license = GPL3 - depends = python2 - depends = pygtk + makedepends = python-setuptools + makedepends = git + depends = python + depends = python-gobject + depends = gtk3 optdepends = fahviewer: 3D simulation viewer - source = https://download.foldingathome.org/releases/public/release/fahcontrol/centos-6.7-64bit/v7.6/fahcontrol-7.6.13-1.noarch.rpm - md5sums = 997c49f1aff860bad37dd273e46bd655 + source = fahcontrol-gtk3-git::git+https://github.com/cdberkstresser/fah-control.git + source = fahcontrol-icon-path-linux.patch + sha256sums = SKIP + sha256sums = 369f69b76a0692f1b2963a8e970aca019ba4f45fa18806800e600991d2fb48bb -pkgname = fahcontrol +pkgname = fahcontrol-gtk3-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..7d063ca5a9c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src/ +pkg/ +fahcontrol-gtk3-git/ +*.pkg.tar.* @@ -1,26 +1,45 @@ -# Maintainer: katt <magunasu.b97@gmail.com> -# Contributor: paul2lv <paul2lv@gmail.com> +# Maintainer: gardenapple <gardenapple@posteo.net> +# Contributor: katt <magunasu.b97@gmail.com> -pkgname=fahcontrol -pkgver=7.6.13 -pkgrel=2 -pkgdesc='Graphical monitor and control utility for the Folding@home client' +pkgname=fahcontrol-gtk3-git +pkgver=r156.7ae5c23 +pkgrel=1 +pkgdesc='Graphical monitor and control utility for the Folding@home client (python3/GTK3 fork)' url='https://foldingathome.org' arch=('any') license=('GPL3') -depends=('python2' 'pygtk') +depends=('python' 'python-gobject' 'gtk3') +makedepends=('python-setuptools' 'git') optdepends=('fahviewer: 3D simulation viewer') -source=("https://download.foldingathome.org/releases/public/release/${pkgname}/centos-6.7-64bit/v${pkgver%.*}/${pkgname}-${pkgver}-1.noarch.rpm") -md5sums=('997c49f1aff860bad37dd273e46bd655') +provides=('fahcontrol') +conflicts=('fahcontrol') +source=("${pkgname}::git+https://github.com/cdberkstresser/fah-control.git" + "fahcontrol-icon-path-linux.patch") +sha256sums=('SKIP' + '1ca22992df83904d8a3a1049138a3022409ab877d73be0eaedf77c40e55d4c39') + +pkgver() { + cd "$pkgname" + + # Number of revisions since beginning of the history: + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} prepare() { - sed -i 's_/usr/bin/python_/usr/bin/python2_' usr/bin/FAHControl + # This patch is a hack, not cross-platform at all + # (I know nothing about Python or GTK so this is the best I can do for now) + patch "${pkgname}/fah/FAHControl.py" fahcontrol-icon-path-linux.patch || true +} + +build() { + cd "${pkgname}" + python setup.py build } package() { - install -dm755 "${pkgdir}"/usr/lib/python2.7/site-packages/fah - cp -R usr/lib/python2.7/site-packages/fah "${pkgdir}"/usr/lib/python2.7/site-packages - install -Dm755 usr/bin/FAHControl -t "${pkgdir}"/usr/bin - install -Dm644 usr/share/pixmaps/FAHControl.png -t "${pkgdir}"/usr/share/pixmaps - install -Dm644 usr/share/applications/FAHControl.desktop -t "${pkgdir}"/usr/share/applications + cd "${pkgname}" + + python setup.py install --root="$pkgdir" --optimize=1 --skip-build + + install -Dm644 FAHControl.desktop -t "${pkgdir}"/usr/share/applications } diff --git a/fahcontrol-icon-path-linux.patch b/fahcontrol-icon-path-linux.patch new file mode 100644 index 000000000000..ea6fd257281e --- /dev/null +++ b/fahcontrol-icon-path-linux.patch @@ -0,0 +1,20 @@ +--- fahcontrol-gtk3-git/fah/FAHControl.py 2020-08-02 22:42:01.389885129 +0300 ++++ fahcontrol-gtk3-git/fah/FAHControl.py.old 2020-08-02 22:10:12.183013169 +0300 +@@ -204,7 +204,7 @@ + self.mono_font = Pango.FontDescription('Monospace') + + # Default icon +- self.window.set_default_icon_from_file(os.path.dirname(os.path.abspath(__file__)) + '/../images/FAHControl.ico') ++ self.window.set_default_icon_from_file('/usr/share/pixmaps/FAHControl.ico') + + # Filter glade + if len(glade) < 1024: +@@ -296,7 +296,7 @@ + + # About Dialog + icon = builder.get_object('about_icon',) +- icon.set_from_file(os.path.dirname(os.path.abspath(__file__)) + '/../images/FAHControl.ico') ++ icon.set_from_file('/usr/share/pixmaps/FAHControl.ico') + + about_version = builder.get_object('about_version') + about_version.set_markup('<b>Version: %s</b>' % version) |