summaryrefslogtreecommitdiffstats
path: root/main/hylafax/APKBUILD
blob: d81166a900441a52c452f03ccc8af63e8ac2a9f6 (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
74
75
76
77
78
79
80
81
82
83
84
85
# Contributor: Cameron Banta <cbanta@gmail.com>
# Maintainer: Cameron Banta <cbanta@gmail.com>
pkgname=hylafax
pkgver=6.0.6
pkgrel=1
pkgdesc="Sends and receives faxes"
url="http://www.hylafax.org/"
arch="all"
license="MIT"
#depends on gcc for libgcc_s.so, it's scripts are hardcoded to bash
depends="ghostscript bash tiff-tools"
makedepends="zlib-dev tiff-dev"
install="hylafax.post-install"
subpackages="$pkgname-doc"
source="ftp://ftp.hylafax.org/source/$pkgname-$pkgver.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
        cd "$_builddir"
}

build() {
	cd "$_builddir"
	# the configure script does not handle ccache or distcc
	export CC=gcc
	export CXX=g++
	./configure \
		--nointeractive \
		--disable-pam \
		--with-DIR_BIN=/usr/bin \
		--with-DIR_SBIN=/usr/sbin \
		--with-DIR_LIB=/usr/lib \
		--with-DIR_LIBEXEC=/usr/sbin \
		--with-DIR_LIBDATA=/var/spool/"$pkgname"/lib \
		--with-DIR_LOCKS=/var/lock \
		--with-DIR_MAN=/usr/share/man \
		--with-DIR_SPOOL=/var/spool/"$pkgname" \
		--with-DIR_HTML=/usr/share/doc/"$pkgname"/html \
		--with-PATH_IMPRIP="" \
		--with-SYSVINIT=no \
		--with-REGEX=yes \
		--with-LIBTIFF="-ltiff -lz" \
		--with-DSO=auto \
		--with-PATH_EGETTY=/bin/false \
		--with-PATH_VGETTY=/bin/false \
		|| return 1
	make || return 1
}

package(){
	cd "$_builddir"
	# this makefile has issues installing, it doesn't use the standard
	#   install - but the following seems to work
	mkdir -p "${pkgdir}"/usr/bin "${pkgdir}"/usr/sbin
	mkdir -p "${pkgdir}"/usr/lib/"$pkgname" "${pkgdir}"/usr/share/man
	mkdir -p "${pkgdir}"/var/spool/"$pkgname"
	mkdir -p "${pkgdir}"/var/spool/"$pkgname"/lib
	touch "${pkgdir}"/var/spool/"$pkgname"/lib/pagesizes
	chown uucp:uucp "${pkgdir}"/var/spool/"$pkgname"
	chmod 0600 "${pkgdir}"/var/spool/"$pkgname"

	make \
		BIN="${pkgdir}/usr/bin" \
		SBIN="${pkgdir}/usr/sbin" \
		LIBDIR="${pkgdir}/usr/lib" \
		LIB="${pkgdir}/usr/lib" \
		LIBEXEC="${pkgdir}/usr/sbin" \
		LIBDATA="${pkgdir}/var/spool/$pkgname"/lib \
		MAN="${pkgdir}/usr/share/man" \
		SPOOL="${pkgdir}/var/spool/$pkgname" \
		HTMLDIR="${pkgdir}/usr/share/doc/$pkgname/html" \
		install || return 1

	install -m644 -D "$srcdir/$pkgname-$pkgver/COPYRIGHT" \
		"$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
	install -m644 -D "$srcdir/$pkgname-$pkgver/README" \
		"$pkgdir"/usr/share/doc/$pkgname/README

	# init.d script is created by faxsetup
	#   - which the user runs after install
}

md5sums="d063d45049c8fcbabefe09d662313067  hylafax-6.0.6.tar.gz"
sha256sums="28926915b23ce7f5b4896de8ac5f58389c2c6e6bb73b4eee5bbd5129603bf7c0  hylafax-6.0.6.tar.gz"
sha512sums="be7e0533a24391c87deac6af35e01c81a79c99977c7f7a931e336d7c737b388d2a7c147faab3bf5eda196b1fa1c8671bee53c05dab2338f2f519010532f7d773  hylafax-6.0.6.tar.gz"