You are not logged in.

#1 2012-08-19 12:39:30

paul2lv
Member
From: Vegas
Registered: 2005-11-09
Posts: 116

[Solved][Request]fahcontrol

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

#2 2012-08-19 13:12:34

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,232
Website

Re: [Solved][Request]fahcontrol

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.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#3 2012-08-19 13:19:37

paul2lv
Member
From: Vegas
Registered: 2005-11-09
Posts: 116

Re: [Solved][Request]fahcontrol

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

#4 2012-08-19 13:29:47

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,232
Website

Re: [Solved][Request]fahcontrol

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.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#5 2012-08-19 13:37:51

paul2lv
Member
From: Vegas
Registered: 2005-11-09
Posts: 116

Re: [Solved][Request]fahcontrol

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

#6 2012-08-19 13:42:24

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,232
Website

Re: [Solved][Request]fahcontrol

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)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#7 2012-08-19 13:47:14

paul2lv
Member
From: Vegas
Registered: 2005-11-09
Posts: 116

Re: [Solved][Request]fahcontrol

Yeah, i'm trying to use another directory instead of "pyshared".

Offline

#8 2012-08-19 15:02:10

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [Solved][Request]fahcontrol

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)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#9 2012-08-19 15:55:41

paul2lv
Member
From: Vegas
Registered: 2005-11-09
Posts: 116

Re: [Solved][Request]fahcontrol

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

#10 2012-08-19 17:18:09

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,444

Re: [Solved][Request]fahcontrol

man patch


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#11 2012-08-19 18:02:07

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [Solved][Request]fahcontrol

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 sed

Last edited by cfr (2012-08-19 18:02:40)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#12 2012-08-19 18:07:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,444

Re: [Solved][Request]fahcontrol

I still like patch better smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#13 2012-08-19 18:10:29

paul2lv
Member
From: Vegas
Registered: 2005-11-09
Posts: 116

Re: [Solved][Request]fahcontrol

Got it figured out and the package builds.
Thanks for all the help.

Offline

#14 2012-08-19 18:14:28

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: [Solved][Request]fahcontrol

ewaller wrote:

I still like patch better smile

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)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

Board footer

Powered by FluxBB