You are not logged in.
Can someone help me figure out how to make this PKGBUILD work?
Thanks
pkgname=fahcontrol
pkgver=7.1.52
pkgrel=1
pkgdesc='A Graphical User Interface (GUI)for Folding@Home'
url="http://folding.stanford.edu/English/HomePage"
arch=('i686 x86_64')
license=('GPL3')
depends=('gtk2' 'python2')
source=("http://fah-web.stanford.edu/file-releases/public/release/fahcontrol/debian-testing-64bit/v7.1/fahcontrol_7.1.52-1_all.deb")
md5sums=('f49eeef558d39c16154613f345b1ca92')
package() {
cd "$srcdir"
tar -xf data.tar.gz
install -d "$pkgdir/usr/lib/python2.7/site-packages/fahcontrol"
install -m 644 usr/share/pyshared/fah/ "$pkgdir/usr/lib/python2.7/site-packages/fahcontrol/"
install -m 644 usr/share/pixmaps/FAHControl.png "$pkgdir/usr/share/pixmaps/FAHControl.png"
install -m 644 usr/share/applications/FAHControl.desktop "$pkgdir/usr/share/applications/FAHControl.desktop"
}Last edited by paul2lv (2012-08-19 19:19:50)
Offline
It would help to know what goes wrong, where you got it, or if you made it yourself, what made you write it the way you did.
I just tried this, it doesn't even download anything. So that's the first problem.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I tried making this myself, but since it's based on a .deb, I think I'm a little lost.
Here is the error it gives me when I try to build.
==> Making package: fahcontrol 7.1.52-1 (Sun Aug 19 16:17:37 IDT 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
-> Found fahcontrol_7.1.52-1_all.deb
==> Validating source files with md5sums...
fahcontrol_7.1.52-1_all.deb ... Passed
==> Extracting Sources...
-> Extracting fahcontrol_7.1.52-1_all.deb with bsdtar
==> Entering fakeroot environment...
==> Starting package()...
install: omitting directory ‘usr/share/pyshared/fah/’
==> ERROR: A failure occurred in package().
Aborting...Offline
It still won't download for me. But I tried downloading manually ... but it's still a .deb file. Your PKGBUILD doesn't have anything to deal with that.
Allegedly `ar vx <filename.deb>` will do that. I just tried with the deb I downloaded - it worked and created data.tar.gz.
bsdtar which is called by makepkg will not (AFAIK - I can't get it to) unpack a .deb file.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I added in the 'ar vx' line to the PKGBUILD and it does extract the files, but it still fails with the same error.
==> Making package: fahcontrol 7.1.52-1 (Sun Aug 19 16:34:43 IDT 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
-> Found fahcontrol_7.1.52-1_all.deb
==> Validating source files with md5sums...
fahcontrol_7.1.52-1_all.deb ... Passed
==> Extracting Sources...
-> Extracting fahcontrol_7.1.52-1_all.deb with bsdtar
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting package()...
x - debian-binary
x - control.tar.gz
x - data.tar.gz
install: omitting directory ‘usr/share/pyshared/fah/’
==> ERROR: A failure occurred in package().
Aborting...Offline
That directory doesn't exist in my system and your PKGBUILD doesn't create it - that'd cause this error.
You do create that other directory that doesn't get used. Was this newly created directory supposed to be in place of pyshare?
edit: oops sorry I misread the relevant line of the PKGBUILD.
Last edited by Trilby (2012-08-19 16:01:41)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Yeah, i'm trying to use another directory instead of "pyshared".
Offline
dpkg is useful for dealing with .deb files. I just checked and I used dpkg-deb -x to extract files from a .deb when I couldn't find a regular tarball for airport-utils. (I'm not saying this is better than the ar method Trilby suggested - just what I used. I don't know where I found instructions for doing it this way, though.)
Why don't you try building it without changing the directory first? Then you can alter the package build later to do what you want. Although that might seem like wasted effort, simplifying what you've trying to do so you only have to worry about one thing at a time sometimes saves time in the end...
Last edited by cfr (2012-08-19 15:08:05)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I figured out the extraction part and got the files put in the right places, now I just need to make python play nice.
Any idea how to use sed to change the line "/usr/bin/python" to "/usr/bin/python2" in a file?
Offline
man patch
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
sed 's+/usr/bin/python$+/usr/bin/python2+' <filename>Check output is as expected. Then add -i to change the file itself.
Note: above assumes end of line after "python". I assume this is a line at the top. Otherwise:
sed 's+/usr/bin/python\([^2]\)+/usr/bin/python2\1+' <filename>man sed
info sedLast edited by cfr (2012-08-19 18:02:40)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I still like patch better ![]()
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Got it figured out and the package builds.
Thanks for all the help.
Offline
I still like patch better
I just know sed better. And that was the question...
[Basically, if it can be done with sed, I tend to use that. It isn't a very efficient approach in the long run but it is always easier on any given occasion...]
@paul2lv,
Glad you got it to build - don't forget to mark the thread [SOLVED].
Last edited by cfr (2012-08-19 18:14:40)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline