#!/bin/bash # # amanda.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # amanda.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="amanda" PACKAGE_EXT="gz" VERSION=${VERSION:=3.5.2} BUILD=${BUILD:=2} # # check amanda accounts # if [ -z "`grep ^amanda /etc/group`" ]; then groupadd -g 211 amanda fi if [ -z "`grep ^amanda /etc/passwd`" ]; then useradd -u 211 -g 211 -G disk -d /var/lib/amanda -s /bin/bash -c "Amanda Backup Account" amanda USERAMANDA="yes" fi if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required if [ ! -x /sbin/dump ]; then echo "You must install the dump package or else hardcoded paths will be wrong." exit 1 fi SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" #URL="http://prdownloads.sourceforge.net/amanda/$SRC" URL="https://github.com/zmanda/amanda/archive/refs/tags/tag-community-$VERSION.tar.gz" get_source $SRC $URL unpack_source $SRC $PACKAGE-tag-community-$VERSION # usr/local/share/perl5 moet zijn /usr/share/perl5/site_perl cat $CWD/amanda-3.5.1-fno-common.patch | patch -p1 #cat $CWD/amanda-3.5.1-tirpc.patch | patch -p1 #autoreconf ./autogen CFLAGS=$SLKCFLAGS \ ./configure \ --prefix=/usr \ --libdir=${LIBDIR} \ --mandir=/usr/man \ --sysconfdir=/etc \ --datadir=/usr/share \ --localstatedir=/var/lib \ --with-user=amanda \ --with-group=amanda \ --with-owner=root \ --with-bsdudp-security \ --with-ssh-security \ --with-bsdtcp-security \ --disable-static \ --build=$ARCH-slackware-linux || exit 1 CFLAGS=$SLKCFLAGS make ${NUMJOBS} || exit 2 make DESTDIR=$PKG install mkdir -p $PKG/etc/$PACKAGE for i in 3hole.ps 8.5x11.ps DIN-A4.ps DLT-A4.ps DLT.ps EXB-8500.ps \ HP-DAT.ps amanda-client.conf amanda.conf chg-multi.conf chg-scsi.conf disklist ; do cat example/$i > $PKG/etc/$PACKAGE/$i ; done mv $PKG/etc/amanda/amanda.conf $PKG/etc/amanda/amanda.conf.example mv $PKG/etc/amanda/amanda-client.conf $PKG/etc/amanda/amanda-client.conf.example # DOCS mkdir -p $DOCS cp -a AUTHORS INSTALL README $DOCS ( cd $DOCS for i in template.d example ChangeLog COPYRIGHT NEWS ReleaseNotes ; do ln -s ../../share/amanda/$i $i ; done ) fixup_package $PKG # If we made accounts for package building, remove them again. set +u if [ ! -z "$USERAMANDA" ]; then userdel amanda fi # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi