summaryrefslogtreecommitdiffstats
path: root/main/bacula-client
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2010-06-08 14:45:04 +0000
committerLeonardo Arena <rnalrd@gmail.com>2010-06-08 14:45:04 +0000
commitad5a02324292519891ef495f66889a1878a1275a (patch)
tree4427baf357535c21c1567f3a8327191718b83808 /main/bacula-client
parente78cd26eef84709827ac616b1f06b1f2ff44f83b (diff)
downloadaports-ad5a02324292519891ef495f66889a1878a1275a.tar.bz2
aports-ad5a02324292519891ef495f66889a1878a1275a.tar.xz
main/bacula: moved from testing
Diffstat (limited to 'main/bacula-client')
-rw-r--r--main/bacula-client/APKBUILD70
-rw-r--r--main/bacula-client/bacula-client.post-install2
-rw-r--r--main/bacula-client/bacula-client.pre-install3
-rw-r--r--main/bacula-client/bacula-fd-conf4
-rw-r--r--main/bacula-client/bacula-fd-init22
-rw-r--r--main/bacula-client/configure.in.patch23
-rw-r--r--main/bacula-client/os.m4.patch12
7 files changed, 136 insertions, 0 deletions
diff --git a/main/bacula-client/APKBUILD b/main/bacula-client/APKBUILD
new file mode 100644
index 000000000..b3921077e
--- /dev/null
+++ b/main/bacula-client/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Leonardo Arena <rnalrd@gmail.com>
+# Maintainer: Leonardo Arena <rnalrd@gmail.com>
+pkgname="bacula-client"
+_realname="bacula"
+pkgver=5.0.0
+pkgrel=3
+pkgdesc="Client (File Daemon) of Bacula, a network based backup program"
+url="http://www.bacula.org"
+license="GPL2"
+depends=""
+makedepends="openssl-dev autoconf ncurses-dev"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/$_realname/$_realname/$pkgver/$_realname-$pkgver.tar.gz
+bacula-fd-init
+bacula-fd-conf
+configure.in.patch
+os.m4.patch"
+
+prepare () {
+ cd "$srcdir/$_realname-$pkgver"
+ patch -p1 < ../../configure.in.patch
+ patch -p1 < ../../os.m4.patch
+}
+
+build() {
+ cd "$srcdir/$_realname-$pkgver"
+ export LDFLAGS=
+ # Need to run configure at least once
+ # in order to do not go into an infinite loop
+ ./configure
+ make configure
+ make distclean
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/bacula \
+ --localstatedir=/var \
+ --mandir=/usr/share/man \
+ --docdir=/usr/share/doc \
+ --infodir=/usr/share/info \
+ --with-pid-dir=/var/run \
+ --with-subsys-dir=/var/lock/subsys \
+ --enable-largefile \
+ --enable-client-only \
+ --enable-smartalloc \
+ --disable-nls \
+ --with-openssl=/usr/include/openssl \
+ --with-scriptdir=/etc/bacula/scripts \
+ --with-working-dir=/var/bacula \
+ --with-fd-user=root \
+ --with-fd-group=root \
+ --with-fd-password=ca4pheexie1aeC1hee3i
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/$_realname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ install -Dm755 $srcdir/bacula-fd-init \
+ $pkgdir/etc/init.d/bacula-fd
+ install -Dm644 $srcdir/bacula-fd-conf \
+ $pkgdir/etc/conf.d/bacula-fd
+}
+
+md5sums="68e008d2578a6d9a50af60439db17dcb bacula-5.0.0.tar.gz
+38b0fe78acdc5e65aec3a59578e98a20 bacula-fd-init
+4500ce2d62bf9df33c07f70dc40f7b85 bacula-fd-conf
+ebc9c2bbc9be95c920723a3f142d8e19 configure.in.patch
+cf7a2a4e972697f54364654c4e282b8b os.m4.patch"
diff --git a/main/bacula-client/bacula-client.post-install b/main/bacula-client/bacula-client.post-install
new file mode 100644
index 000000000..51274b5c3
--- /dev/null
+++ b/main/bacula-client/bacula-client.post-install
@@ -0,0 +1,2 @@
+#!/bin/sh
+chown bacula.bacula /var/bacula
diff --git a/main/bacula-client/bacula-client.pre-install b/main/bacula-client/bacula-client.pre-install
new file mode 100644
index 000000000..54f408770
--- /dev/null
+++ b/main/bacula-client/bacula-client.pre-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+addgroup -S bacula 2>/dev/null
+exit 0
diff --git a/main/bacula-client/bacula-fd-conf b/main/bacula-client/bacula-fd-conf
new file mode 100644
index 000000000..033ef74b4
--- /dev/null
+++ b/main/bacula-client/bacula-fd-conf
@@ -0,0 +1,4 @@
+# Config file for /etc/init.d/bacula-fd
+
+# Options for the file daemon.
+FD_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-fd.conf"
diff --git a/main/bacula-client/bacula-fd-init b/main/bacula-client/bacula-fd-init
new file mode 100644
index 000000000..618b3508c
--- /dev/null
+++ b/main/bacula-client/bacula-fd-init
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-backup/bacula/files/3.0.3/bacula-fd-init,v 1.1 2009/11/08 17:14:46 wschlich Exp $
+
+depend() {
+ need net
+ use dns
+}
+
+start() {
+ ebegin "Starting bacula file daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/bacula-fd \
+ -- ${FD_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bacula file daemon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/bacula-fd.*.pid
+ eend $?
+}
diff --git a/main/bacula-client/configure.in.patch b/main/bacula-client/configure.in.patch
new file mode 100644
index 000000000..cfe2a0b7c
--- /dev/null
+++ b/main/bacula-client/configure.in.patch
@@ -0,0 +1,23 @@
+--- bacula-3.0.3-orig/autoconf/configure.in Sun Oct 18 09:10:16 2009
++++ bacula-3.0.3/autoconf/configure.in Wed Dec 2 14:13:44 2009
+@@ -2576,6 +2576,20 @@
+ fi
+ TAPEDRIVE="/dev/nrmt0"
+ ;;
++alpine)
++ dnl Make sure hostname is resolved
++ ping -c 1 $hostname 2>&1 1>/dev/null
++ if test ! $? = 0; then
++ hostname="localhost"
++ fi
++ if `test -f /etc/alpine-release && grep -q alpine /etc/alpine-release`; then
++ DISTNAME="alpine"
++ fi
++ DISTVER=`cat /etc/alpine-release`
++ TAPEDRIVE="/dev/nst0"
++ PSCMD="ps -e -o pid,comm"
++ largefile_support="yes"
++ ;;
+ bsdi)
+ DISTVER=`uname -a |awk '{print $3}'`
+ TAPEDRIVE="/dev/nrmt0"
diff --git a/main/bacula-client/os.m4.patch b/main/bacula-client/os.m4.patch
new file mode 100644
index 000000000..95dc5666a
--- /dev/null
+++ b/main/bacula-client/os.m4.patch
@@ -0,0 +1,12 @@
+--- bacula-3.0.3-orig/autoconf/bacula-macros/os.m4 Sun Oct 18 09:10:16 2009
++++ bacula-3.0.3/autoconf/bacula-macros/os.m4 Wed Dec 2 13:48:30 2009
+@@ -201,6 +201,9 @@
+ elif test -f /etc/gentoo-release
+ then
+ DISTNAME=gentoo
++elif test -f /etc/alpine-release
++then
++ DISTNAME=alpine
+ elif test -f /etc/debian_version
+ then
+ DISTNAME=debian