1 # Maintainer: David Scholl <djscholl at gmail dot com>
5 pkgdesc="Electronic logbook w/ attached file support, doesn't use a database."
7 url="http://midas.psi.ch/elog/"
10 optdepends=('imagemagick: inline thumbnail support'
11 'ghostscript: inline thumbnail support')
13 backup=('etc/elog/elogd.cfg')
14 source=(https://midas.psi.ch/elog/download/tar/elog-2.9.0-2.tar.gz elogd)
15 md5sums=('55cde7b713428cccbfee3b424c817c39'
16 '746fc2d7ea204473ef95136b99fc7bb0')
18 cd $srcdir/$pkgname-2.9.0
19 # make things more Arch-friendly
20 sed -i '/^ELOGDIR/s/$(PREFIX)\/elog/\/etc\/elog/' Makefile || return 1
21 sed -i '/^BINOWNER/s/bin/root/' Makefile || return 1
22 sed -i '/^BINGROUP/s/bin/root/' Makefile || return 1
24 make PREFIX=/usr || return 1
25 make PREFIX=/usr ROOT=$pkgdir MANDIR=$pkgdir/usr/share/man install || return 1
26 # substitute an Arch-friendly init script in place of the default
27 cp $srcdir/elogd $pkgdir/etc/rc.d/
28 rm -Rf $pkgdir/etc/rc.d/init.d
29 # move data to standard Arch locations
30 install -d $pkgdir/usr/share/elog
31 mv $pkgdir/etc/elog/resources $pkgdir/usr/share/elog
32 mv $pkgdir/etc/elog/scripts $pkgdir/usr/share/elog
33 mv $pkgdir/etc/elog/themes $pkgdir/usr/share/elog
34 mkdir -p $pkgdir/var/lib/elog
35 mv $pkgdir/etc/elog/logbooks $pkgdir/var/lib/elog
36 # tell elogd about the new locations
37 sed -i '/\[global\]/s/$/\nLogbook dir = \/var\/lib\/elog\/logbooks/' \
38 $pkgdir/etc/elog/elogd.cfg || return 1
39 sed -i '/\[global\]/s/$/\nResource dir = \/usr\/share\/elog/' \
40 $pkgdir/etc/elog/elogd.cfg || return 1