summaryrefslogtreecommitdiffstats
path: root/abs/core/xmltv/PKGBUILD
blob: 182041f0758ea87cac4e89d4a765afbd65d50ed9 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
pkgname=xmltv
pkgver=0.6.1
pkgrel=190421
_pkgver="xmltv"
pkgdesc="Set of utilities to download tv listings and format them in xml"
arch=('any')
url="http://xmltv.org/wiki/"
license=('GPL')
depends=('perl-archive-zip' 'perl-cgi' 'perl-datetime' 'perl-date-manip'
  'perl-file-homedir'  'perl-file-slurp' 'perl-file-which'
  'perl-datetime-format-iso8601' 'perl-datetime-format-sqlite'
  'perl-datetime-format-strptime' 'perl-datetime-locale' 'perl-dbd-sqlite'
  'perl-http-cache-transparent' 'perl-http-response-encoding' 
  'perl-html-tree' 'perl-io-stringy' 'perl-json'
  'perl-lingua-en-numbers-ordinate' 'perl-lingua-preferred'
  'perl-list-moreutils' 'perl-lwp-protocol-https'
  'perl-lwp-useragent-determined' 'perl-parse-recdescent' 'perl-soap-lite'
  'perl-term-progressbar' 'perl-term-readkey' 'perl-timedate'
  'perl-tk-tablematrix' 'perl-unicode-string' 'perl-unicode-utf8simple'
  'perl-www-mechanize' 'perl-xml-dom' 'perl-xml-libxml' 'perl-xml-libxslt'
  'perl-xml-simple' 'perl-xml-twig' 'perl-xml-writer' 'perl-xml-treepp')
source=("git+https://github.com/XMLTV/xmltv.git")

build() {
  cd "$_pkgver"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  yes | /usr/bin/perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor 
  make
}

check() {
  cd "$_pkgver"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1
  make test
}

package() {
  cd "$_pkgver"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  make install DESTDIR="$pkgdir"
	 
  # remove perllocal.pod and .packlist
  find ${pkgdir} -name perllocal.pod -delete
  find ${pkgdir} -name .packlist -delete
}

prepare() {
  # To build corectly with Perl 5.26
  # see https://sourceforge.net/p/xmltv/mailman/message/36001436/
  # and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865045
  sed "s/use POSIX 'tmpnam';//" -i $_pkgver/filter/tv_to_latex
  sed "s/use POSIX 'tmpnam';//" -i $_pkgver/filter/tv_to_text
  sed "s/\(lib\/set_share_dir.pl';\)/.\/\1/" -i $_pkgver/grab/it/tv_grab_it.PL
  sed "s/\(filter\/Grep.pm';\)/.\/\1/" -i $_pkgver/filter/tv_grep.PL
  sed "s/\(lib\/XMLTV.pm.in';\)/.\/\1/" -i $_pkgver/lib/XMLTV.pm.PL
  sed "s/\(lib\/Ask\/Term.pm';\)/.\/\1/" -i $_pkgver/Makefile.PL
}
md5sums=('SKIP')