You are not logged in.

#1 2009-01-02 22:17:53

Nicolae
Member
Registered: 2008-12-08
Posts: 9

Do these libhdhomerun/hdhomerun_config_gui PKGBUILDs look ok?

I've written a few quick PKGBUILDs for libhdhomerun and hdhomerun_config_gui, which are used to control the HDHomeRun device, a networked ATSC/DVB-T tuner. Mostly just useful for troubleshooting and uploading new firmware; I dunno if I'll submit them to the AUR or not but since they're the first PKGBUILDs I've written I'd like someone a bit more knowledgeable to look over them, since I think they're kind of hackish due to shortcomings in the upstream packages

libhdhomerun:

# Contributor: Garrett Ward <glward1 at gmail dot com>
pkgname=libhdhomerun
pkgver=20081231
pkgrel=1
pkgdesc="Library for interfacing with HDHomeRun device"
arch=('i686' 'x86_64')
url="http://www.silicondust.com/downloads"
license=('LGPL')
source=(http://download.silicondust.com/hdhomerun/libhdhomerun_$pkgver.tgz)
md5sums=('475ee4bd5e0f8ca8dd4259040f6a2f61')

build() {
  cd "$srcdir/$pkgname"

  make || return 1
  install -D -m 755 $srcdir/$pkgname/libhdhomerun.so $pkgdir/usr/lib/libhdhomerun.so
  install -D -m 755 $srcdir/$pkgname/hdhomerun_config $pkgdir/usr/bin/hdhomerun_config
}

hdhomerun_config_gui:

# Contributor: Garrett Ward <glward1 at gmail dot com>
pkgname=hdhomerun_config_gui
pkgver=20081231
pkgrel=1
pkgdesc="GTK2 GUI for configuring the HDHomeRun device"
arch=('i686' 'x86_64')
url="http://www.silicondust.com/downloads"
license=('GPL3')
depends=('gtk2')
conflicts=('libhdhomerun')
source=("http://download.silicondust.com/hdhomerun/hdhomerun_config_gui_$pkgver.tgz" "http://download.silicondust.com/hdhomerun/libhdhomerun_$pkgver.tgz")
md5sums=('5b1ffad1a1c12db1cd27ee3f63898fa9'
         '475ee4bd5e0f8ca8dd4259040f6a2f61')

build() {
  cd "$srcdir/$pkgname"
  
  ./configure --prefix=/usr
  make || return 1
  install -D -m 755 $srcdir/libhdhomerun/libhdhomerun.so $pkgdir/usr/lib/libhdhomerun.so
  install -D -m 755 $srcdir/hdhomerun_config_gui/src/hdhomerun_config_gui $pkgdir/usr/bin/hdhomerun_config_gui
}

libhdhomerun just includes the library and the old CLI utility, which I was going to just package seperately from the gtk2 gui and add on, but the gtk2 gui doesn't build without building libhdhomerun again; it's hardcoded to look for a ../libhdhomerun directory with the source there and doesn't run if it can't find and (re)build it.  libhdhomerun further lacks an install script altogether, and the one for hdhomerun_config_gui doesn't play nice with fakeroot (installs libhdhomerun.so as a file called lib in /usr and not /usr/lib/libhdhomerun) and further is hardcoded to look in / and will only install to $pkgdir if I configure it with that prefix (--prefix=$pkgdir/usr), which I'm sure will break something.

Anyway, if someone could look over them and tell me how badly I cocked them up, I'd be grateful. Thanks tongue

Offline

#2 2009-01-04 20:05:43

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: Do these libhdhomerun/hdhomerun_config_gui PKGBUILDs look ok?

well, if these package builds are going to be independent of one another, then the second one needs to also grab the source for libhdhomerun.  (you've got two md5sums, but only one source.  that's an error.)

as for the misbehavior of the gtk_gui configuration and build process, is there a TARGETS variable that lets you choose which elements you want to compile?  or --build-with or --enable/--disable switch to turn off rebuilding the library?  alternately, if the build process really does require the library to be rebuilt, but you want the package to only deal with the gui, omit the first 'install' line in the second pkgbuild.

finally, why the weirdness for the build process?  is it written into the ./configure scripts?  the makefiles?  can you patch them?  if so, you can include the patch as one of the sources in the PKGBUILD.

my $0.02.


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#3 2009-01-04 21:04:51

Nicolae
Member
Registered: 2008-12-08
Posts: 9

Re: Do these libhdhomerun/hdhomerun_config_gui PKGBUILDs look ok?

The second PKGBUILD pulls both sources; the second is on the same line 'cause I forgot to insert a newline so it's way off to the side

no configure opts that I can see, but I was thinking of just discarding the install for the library; that seems kind of hackish, though

and I'm not sure where the weirdness is, I haven't investigated it too much. posted about it on the official forums, I'll see what responses I get.

thanks for the advice!

Offline

Board footer

Powered by FluxBB