summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dcdb50f4804d2cae876fb2a38aefff206abe5ab8 (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
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
pkgname=wp2latex  
pkgver=3.71
pkgrel=1
pkgdesc="Converts WordPerfect document formats to LaTeX"
url="http://www.penguin.cz/~fojtik/$pkgname/$pkgname.htm"
arch=('i686' 'x86_64')
license=('GPL')
source=(http://www.penguin.cz/~fojtik/$pkgname/$pkgname-${pkgver}.zip)
md5sums=('16da758b163113a86bfc63131f448b65')
depends=('libjpeg' 'gcc-libs')
makedepends=('unzip')
install=$pkgname.install
noextract=("$pkgname-${pkgver}.zip")
options=('!strip')

build() {
  # hack to avoid the dos line ends in all sourcefiles.
  cd ${srcdir}
  unzip -quo -aa $srcdir/$pkgname-${pkgver}.zip
  find $srcdir/$pkgname.${pkgver} -type d -exec chmod 770 {} \;
  # normal build
  cd ${srcdir}/$pkgname.${pkgver}
  autoconf
  CPPFLAGS+="-fpermissive" CXX=g++ ./configure --prefix=/usr --without-png
  make x2latex
}

package() {
  cd ${srcdir}/$pkgname.${pkgver}
  install -Dm755 ${srcdir}/$pkgname.${pkgver}/linux/$pkgname \
    $pkgdir/usr/bin/$pkgname 
  for _i in cs de
  do
    install -Dm644 \
    $srcdir/$pkgname.${pkgver}/doc/locale/${_i}/lc_messages/$pkgname.mo \
      $pkgdir/usr/share/locale/${_i}/LC_MESSAGES/$pkgname.mo
  done 
  install -Dm644 $srcdir/$pkgname.${pkgver}/doc/$pkgname.1 \
    $pkgdir/usr/share/man/man1/$pkgname.1 
  install -d $pkgdir/usr/share/$pkgname/doc
  cp -R $srcdir/$pkgname.${pkgver}/doc/program.man/* \
    $pkgdir/usr/share/$pkgname/doc
  install -d $pkgdir/usr/share/texmf/tex/latex/$pkgname
  cp $srcdir/$pkgname.${pkgver}/styles.tex/* \
    $pkgdir/usr/share/texmf/tex/latex/$pkgname
}