summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b73277089b2ac632112bbff90a7ee81b97c63d74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: willemw <willemw12@gmail.com>

pkgname=xmltv-druid
pkgver=0.4.0
pkgrel=3
pkgdesc="XMLTV configurator (for gShowTV)"
arch=('x86_64')
url="http://gshowtv.sourceforge.net/xmltv-druid.html"
license=('GPL')
# 'gtk2-perl' depends on 'libgnome'
depends=('gtk2-perl' 'glade-perl' 'gnome-perl' 'gnome-terminal' 'xmltv')
source=(https://downloads.sourceforge.net/project/gshowtv/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz)
md5sums=('625391aa24138a395b64273020bc1396')

prepare() {
  cd $pkgname-$pkgver

  # Fix: Add '=back' before '=head1 AUTHOR'
  sed -i 's|\(^=head1 AUTHOR\)|=back\n\n\1|' xmltv-druid

  # Fix: Add program search paths
  #next unless (-x "/usr/bin/$g" || -x "/usr/local/bin/$g");
  #-->
  #next unless (-x "/usr/bin/$g" || -x "/usr/local/bin/$g" || "/usr/bin/vendor_perl/$g"  || -x $ENV{"HOME"} . "/bin/$g");
  sed -i 's|\(next unless (-x "/usr/bin/$g" \|\| -x "/usr/local/bin/$g"\)|\1 \|\| "/usr/bin/vendor_perl/$g"  \|\| -x $ENV{"HOME"} . "/bin/$g"|' xmltv-druid

  # Fix: Add program search paths
  #foreach my $gi (sort </usr/bin/tv_grab_* /usr/local/bin/tv_grab_*>) {
  #-->
  #foreach my $gi (sort </usr/bin/tv_grab_* /usr/local/bin/tv_grab_* /usr/bin/vendor_perl/tv_grab_* $ENV{"HOME"}/bin/tv_grab_*>) {
  sed -i 's|\(foreach my $gi (sort </usr/bin/tv_grab_\* /usr/local/bin/tv_grab_\*\)|\1 /usr/bin/vendor_perl/tv_grab_\* $ENV{"HOME"}/bin/tv_grab_\*|' xmltv-druid

  # Fix:
  #system("gnome-terminal --hide-menubar -title='TV Grabber configuration' -e \"$grabber --configure\"");
  #-->
  #system("gnome-terminal --hide-menubar --title='TV Grabber configuration' -e \"$grabber --configure\"");
  sed -i 's|\(gnome-terminal.* \)-title|\1--title|' xmltv-druid
}

package() {
  cd $pkgname-$pkgver
  install -Dm644 README "$pkgdir/usr/share/$pkgname/README"
  make install PREFIX="$pkgdir/usr/"
}