blob: 23396fe7bf4ea44e15266b7476f3674ba1647a0a (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# $Id: PKGBUILD 186226 2013-05-22 09:28:57Z tpowa $
#Maintainer: Tobias Powalowski <tpowa@archlinux.org>
pkgname=capi4hylafax
pkgver=010300
pkgrel=9
pkgdesc="capi plugin for hylafax to enable isdn faxing"
arch=(i686 x86_64)
url="ftp://ftp.avm.de/tools"
license=('GPL')
depends=('glibc' 'isdn4k-utils' 'hylafax' 'gcc-libs' 'libtiff' 'dialog')
source=(ftp://ftp.avm.de/tools/capi4hylafax.linux/capi4hylafax-01.03.00.tar.gz
config.faxCAPI
c2faxrecv.service
capi4hylafax.conf
capi4hylafax-compile-gcc48-fix.patch)
install=capi4hylafax.install
backup=(var/spool/hylafax/etc/config.faxCAPI)
prepare() {
cd "$srcdir"/$pkgname-01.03.00
# fix compiling with gcc48
patch -Np1 -i $srcdir/capi4hylafax-compile-gcc48-fix.patch
# fix config file
sed -i -e 's#/etc/config.faxCAPI#/var/spool/hylafax/etc/config.faxCAPI#g' src/defaults.h.in
autoreconf --force --install
}
build() {
cd "$srcdir"/$pkgname-01.03.00
./configure
make
}
package() {
cd "$srcdir"/$pkgname-01.03.00
install -m755 -D src/faxsend/c2faxsend "$pkgdir"/usr/bin/c2faxsend
install -m755 -D src/faxrecv/c2faxrecv "$pkgdir"/usr/bin/c2faxrecv
install -m755 -D setupconffile "$pkgdir"/usr/bin/c2faxaddmodem
install -m644 -D "$srcdir"/config.faxCAPI "$pkgdir"/var/spool/hylafax/etc/config.faxCAPI
# adding FIFO
mkfifo "$pkgdir"/var/spool/hylafax/FIFO.faxCAPI
chown 10 "$pkgdir"/var/spool/hylafax/FIFO.faxCAPI
chgrp 14 "$pkgdir"/var/spool/hylafax/FIFO.faxCAPI
chmod 0600 "$pkgdir"/var/spool/hylafax/FIFO.faxCAPI
# fix /var/spool/hylafax permission
chown 10 "$pkgdir"/var/spool/hylafax
chgrp 14 "$pkgdir"/var/spool/hylafax
# adding udev rule
mkdir -p "$pkgdir"/usr/lib/udev/rules.d
cat << EOF >> "$pkgdir"/usr/lib/udev/rules.d/53-capi4hylafax.rules
# CAPI devices
SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20", GROUP="uucp"
SUBSYSTEM=="tty" KERNEL=="capi[0-9]*", NAME="capi/%n", GROUP="uucp"
EOF
# fix c2faxadd
sed -i -e 's#/etc/config.faxCAPI#/var/spool/hylafax/etc/config.faxCAPI#g' "$pkgdir"/usr/bin/c2faxaddmodem
echo "main_config_dialog" >> "$pkgdir"/usr/bin/c2faxaddmodem
# add systemd files
install -D -m644 $srcdir/c2faxrecv.service $pkgdir/usr/lib/systemd/system/c2faxrecv.service
install -D -m644 $srcdir/capi4hylafax.conf $pkgdir/usr/lib/modules-load.d/capi4hylafax.conf
}
md5sums=('d37dc652ac80d1525ef8693be55ee67f'
'653b60695d21c128f020a86274ca9192'
'e2c085a00189ded0a659642c689a1be2'
'7c41d4fa5c5ef7b1372813341fd0d02b')
md5sums=('d37dc652ac80d1525ef8693be55ee67f'
'653b60695d21c128f020a86274ca9192'
'e2c085a00189ded0a659642c689a1be2'
'7c41d4fa5c5ef7b1372813341fd0d02b'
'fa01597396c5493f90243a8d9e2841c0')
|