diff options
author | pi <pi@FreeBSD.org> | 2014-10-24 01:48:35 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2014-10-24 01:48:35 +0800 |
commit | a823b2067ff57af3dab21ff923f7f92ffd29c14e (patch) | |
tree | c13bfc530c04a395311943234feda94abdf8cec8 | |
parent | 32a118d5b555923b2b2058733887967524cbdf74 (diff) | |
download | freebsd-ports-gnome-a823b2067ff57af3dab21ff923f7f92ffd29c14e.tar.gz freebsd-ports-gnome-a823b2067ff57af3dab21ff923f7f92ffd29c14e.tar.zst freebsd-ports-gnome-a823b2067ff57af3dab21ff923f7f92ffd29c14e.zip |
New port: sysutils/backuppc-devel
BackupPC is a high-performance, enterprise-grade system for backing up
Linux, WinXX and MacOSX PCs and laptops to a server's disk.
BackupPC is highly configurable and easy to install and maintain.
WWW: http://backuppc.sourceforge.net
This is Version 4.0.0alpha3, please use with caution. On the other
hand, it is 10 month old, and the submitter is also the maintainer of
sysutils/backuppc.
PR: 183241
Submitted by: Alexander Moisseev <moiseev@mezonplus.ru>
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/backuppc-devel/Makefile | 125 | ||||
-rw-r--r-- | sysutils/backuppc-devel/distinfo | 2 | ||||
-rw-r--r-- | sysutils/backuppc-devel/files/backuppc.in | 29 | ||||
-rw-r--r-- | sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate | 57 | ||||
-rw-r--r-- | sysutils/backuppc-devel/files/patch-doc-BackupPC.pod | 8 | ||||
-rw-r--r-- | sysutils/backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm | 11 | ||||
-rw-r--r-- | sysutils/backuppc-devel/files/patch-update.pl | 276 | ||||
-rw-r--r-- | sysutils/backuppc-devel/files/pkg-deinstall.in | 21 | ||||
-rw-r--r-- | sysutils/backuppc-devel/files/pkg-message.in | 16 | ||||
-rw-r--r-- | sysutils/backuppc-devel/files/update.sh.in | 11 | ||||
-rw-r--r-- | sysutils/backuppc-devel/pkg-descr | 5 | ||||
-rw-r--r-- | sysutils/backuppc-devel/pkg-plist | 153 |
13 files changed, 715 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index d3126b6e9909..5d77d0c8628f 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -49,6 +49,7 @@ SUBDIR += autopsy SUBDIR += b43-fwcutter SUBDIR += backuppc + SUBDIR += backuppc-devel SUBDIR += bacula-bat SUBDIR += bacula-client SUBDIR += bacula-client-static diff --git a/sysutils/backuppc-devel/Makefile b/sysutils/backuppc-devel/Makefile new file mode 100644 index 000000000000..99bbb5f3335a --- /dev/null +++ b/sysutils/backuppc-devel/Makefile @@ -0,0 +1,125 @@ +# Created by: Alexander Moisseev <moiseev@mezonplus.ru> +# $FreeBSD$ + +PORTNAME= backuppc +DISTVERSION= 4.0.0alpha3 +CATEGORIES= sysutils +MASTER_SITES= SF +MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}-beta/${DISTVERSION} +PKGNAMESUFFIX= -devel +DISTNAME= BackupPC-${DISTVERSION} + +MAINTAINER= moiseev@mezonplus.ru +COMMENT= System for backing PCs and laptops to a server + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LATEST_LINK= ${PORTNAME}-devel + +RUN_DEPENDS= p5-File-Listing>=0:${PORTSDIR}/sysutils/p5-File-Listing \ + p5-BackupPC-XS>=0.30:${PORTSDIR}/sysutils/p5-BackupPC-XS + +CONFLICTS= backuppc-[0-9]* + +USE_RC_SUBR= backuppc + +USES= perl5 +NO_BUILD= yes + +USERS= backuppc +GROUPS= backuppc + +DOCSDIR= ${PREFIX}/share/doc/BackupPC +CGIDIR?= ${PREFIX}/www/cgi-bin + +SUB_FILES= pkg-deinstall pkg-message update.sh +SUB_LIST= CGIDIR=${CGIDIR} + +PLIST_SUB+= CGIDIR=${CGIDIR:S,^${PREFIX}/,,} \ + DISTVERSION=${DISTVERSION} + +PORTDOCS= ChangeLog LICENSE README + +OPTIONS_DEFINE= ARCHIVE_ZIP DOCS RSYNC_BPC NMBLOOKUP \ + RRDTOOL SMBCLIENT XML_RSS +OPTIONS_DEFAULT= ARCHIVE_ZIP + +ARCHIVE_ZIP_DESC= Perl module for Zip archive files +RSYNC_BPC_DESC= Modified rsync that used as part of BackupPC +NMBLOOKUP_DESC= NetBIOS Name lookup tool +RRDTOOL_DESC= Round Robin Database Tools +SMBCLIENT_DESC= Samba client +XML_RSS_DESC= Perl extension to manage RSS files + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MARCHIVE_ZIP} +RUN_DEPENDS+= p5-Archive-Zip>=0:${PORTSDIR}/archivers/p5-Archive-Zip +.endif +.if ${PORT_OPTIONS:MRSYNC_BPC} +RUN_DEPENDS+= rsync-bpc>=3.0.9.3:${PORTSDIR}/net/rsync-bpc +.endif +.if ${PORT_OPTIONS:MNMBLOOKUP} +RUN_DEPENDS+= nmblookup:${PORTSDIR}/net/samba-nmblookup +.endif +.if ${PORT_OPTIONS:MRRDTOOL} +RUN_DEPENDS+= rrdtool:${PORTSDIR}/databases/rrdtool +.endif +.if ${PORT_OPTIONS:MSMBCLIENT} +RUN_DEPENDS+= smbclient:${PORTSDIR}/net/samba-smbclient +.endif +.if ${PORT_OPTIONS:MXML_RSS} +RUN_DEPENDS+= p5-XML-RSS>=0:${PORTSDIR}/textproc/p5-XML-RSS +.endif + +pre-patch: + @${CP} ${WRKSRC}/configure.pl ${WRKSRC}/update.pl + +post-patch: + @${REINPLACE_CMD} \ + -e 's|/etc/BackupPC\(/config.pl\)|${ETCDIR}\1|' \ + ${WRKSRC}/configure.pl ${WRKSRC}/update.pl + @${REINPLACE_CMD} -E \ + -e 's|^(use lib ")\.(/lib";)$$|\1${PREFIX}\2|' \ + ${WRKSRC}/update.pl + @${REINPLACE_CMD} \ + -e 's|STDERR "Please su |STDERR "Please su [-m] |' \ + ${WRKSRC}/lib/BackupPC/Lib.pm + @${REINPLACE_CMD} \ + -e 's| you can use the -s| you can use the -m|' \ + -e 's|option to su to explicitly run|option to su to run|' \ + -e 's|su -s /bin/bash __BACKUPPCUSER__|su -m __BACKUPPCUSER__|' \ + ${WRKSRC}/doc/BackupPC.html ${WRKSRC}/doc/BackupPC.pod + +do-install: + cd ${WRKSRC} && ${PERL} configure.pl \ + --batch \ + --backuppc-user ${USERS} \ + --config-dir ${ETCDIR} \ + --cgi-dir ${CGIDIR} \ + --data-dir /var/db/BackupPC \ + --dest-dir ${STAGEDIR} \ + --fhs \ + --html-dir ${WWWDIR} \ + --html-dir-url /${PORTNAME} \ + --install-dir ${PREFIX} \ + --log-dir /var/log/BackupPC \ + --no-set-perms \ + --uid-ignore + + pod2man --section=1 --release=${PORTVERSION} \ + --name=BackupPC --center="BackupPC user guide" \ + ${WRKSRC}/doc/BackupPC.pod ${WRKSRC}/${PORTNAME}.1 + ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1 + cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} + ${CP} ${WRKSRC}/doc/BackupPC.html ${STAGEDIR}${WWWDIR} + ${RM} ${STAGEDIR}${ETCDIR}/config.pl + ${RM} ${STAGEDIR}${ETCDIR}/hosts + ${CP} ${WRKSRC}/conf/config.pl ${STAGEDIR}${ETCDIR}/config.pl.sample + ${CP} ${WRKSRC}/conf/hosts ${STAGEDIR}${ETCDIR}/hosts.sample + ${CP} ${WRKDIR}/update.sh ${STAGEDIR}${ETCDIR}/update.sh + ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/backuppc + ${CP} ${WRKSRC}/update.pl ${STAGEDIR}${PREFIX}/libexec/backuppc/update.pl + +.include <bsd.port.mk> diff --git a/sysutils/backuppc-devel/distinfo b/sysutils/backuppc-devel/distinfo new file mode 100644 index 000000000000..0331ffcbb492 --- /dev/null +++ b/sysutils/backuppc-devel/distinfo @@ -0,0 +1,2 @@ +SHA256 (BackupPC-4.0.0alpha3.tar.gz) = 3e63ad375465425f97179152d09e91963cced8b5ca7e400290b81decf83a902e +SIZE (BackupPC-4.0.0alpha3.tar.gz) = 583970 diff --git a/sysutils/backuppc-devel/files/backuppc.in b/sysutils/backuppc-devel/files/backuppc.in new file mode 100644 index 000000000000..500d3a4335c7 --- /dev/null +++ b/sysutils/backuppc-devel/files/backuppc.in @@ -0,0 +1,29 @@ +#!/bin/sh + +# PROVIDE: backuppc +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable BackupPC: +# backuppc_enable="YES" + +. /etc/rc.subr + +name="backuppc" +rcvar=backuppc_enable + +load_rc_config $name + +: ${backuppc_enable:="NO"} +: ${backuppc_flags:="-d"} +: ${backuppc_user:="backuppc"} +: ${backuppc_group:="backuppc"} +: ${backuppc_config:="%%ETCDIR%%/config.pl"} + +command_interpreter="/usr/bin/perl" +command="%%PREFIX%%/bin/BackupPC" + +required_files="${backuppc_config}" +pidfile="/var/run/BackupPC/BackupPC.pid" + +run_rc_command "$1" diff --git a/sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate b/sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate new file mode 100644 index 000000000000..3289e88e4f3a --- /dev/null +++ b/sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate @@ -0,0 +1,57 @@ +--- ./bin/BackupPC_rrdUpdate.orig 2013-12-09 17:06:45.000000000 +0400 ++++ ./bin/BackupPC_rrdUpdate 2013-12-10 12:24:41.000000000 +0400 +@@ -109,7 +109,7 @@ + } + $sizeTot = $sizeTot / 1024; + +- print $bpc->cmdSystemOrEval( ++ if ( $err = $bpc->cmdSystemOrEval( + [ + $Conf{RrdToolPath}, + "update", $RRDFile, +@@ -119,13 +119,17 @@ + . $Info{"poolKb"} . ":" + . $Info{"pool4Kb"} . ":" + . $Info{"cpool4Kb"} +- ]); +- printf("%sRRD updated:" ++ ]) ) { ++ print "$err"; ++ } ++ else { ++ printf("%sRRD updated:" + . " date %s; cpoolKb %f; total %f;" + . " poolKb %f; pool4Kb %f; cpool4Kb %f\n", + $bpc->timeStamp, + $NowRnd1, $Info{"cpoolKb"}, $sizeTot, + $Info{"poolKb"}, $Info{"pool4Kb"}, $Info{"cpool4Kb"}); ++ } + } + + # +@@ -140,7 +144,7 @@ + # + # Get each pool max value from RRD + # +- $bpc->cmdSystemOrEval( ++ $bpc->cmdSystemOrEvalLong( + [ + $Conf{RrdToolPath}, + "graphv", "-", +@@ -158,7 +162,7 @@ + if ( $_[0] =~ /^print\[([0-3])\] = "([.0-9]+)"$/ ) { + $poolMax[$1] = $2 unless ( $2 == 0 ); + } +- }); ++ }, 1, undef); + + my $poolSizeGraph = [ + "$Conf{RrdToolPath}", +@@ -228,6 +232,6 @@ + print("Can't open/create $LogDir/poolUsage$weeks.png\n"); + return; + } +- $bpc->cmdSystemOrEval($poolSizeGraph, sub { print $fdOut $_[0] }); ++ $bpc->cmdSystemOrEvalLong($poolSizeGraph, sub { print $fdOut $_[0] }, 1, undef); + close($fdOut); + } diff --git a/sysutils/backuppc-devel/files/patch-doc-BackupPC.pod b/sysutils/backuppc-devel/files/patch-doc-BackupPC.pod new file mode 100644 index 000000000000..529c1f409674 --- /dev/null +++ b/sysutils/backuppc-devel/files/patch-doc-BackupPC.pod @@ -0,0 +1,8 @@ +--- doc/BackupPC.pod.orig 2014-05-13 17:40:09.000000000 +0400 ++++ doc/BackupPC.pod 2014-05-13 17:40:27.000000000 +0400 +@@ -1,3 +1,5 @@ ++=encoding ISO8859-1 ++ + =head1 BackupPC Introduction + + This documentation describes BackupPC version 3.3.0, diff --git a/sysutils/backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm b/sysutils/backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm new file mode 100644 index 000000000000..0799a8575ac9 --- /dev/null +++ b/sysutils/backuppc-devel/files/patch-lib__BackupPC__CGI__View.pm @@ -0,0 +1,11 @@ +--- ./lib/BackupPC/CGI/View.pm.orig 2014-09-03 14:15:03.000000000 +0400 ++++ ./lib/BackupPC/CGI/View.pm 2014-09-03 14:15:20.000000000 +0400 +@@ -102,7 +102,7 @@ + $file = $bpc->ConfDir() . "/hosts"; + $linkHosts = 1; + } elsif ( $type eq "docs" ) { +- $file = $bpc->InstallDir() . "/share/doc/BackupPC/BackupPC.html"; ++ $file = "$Conf{CgiImageDir}/BackupPC.html"; + } elsif ( $host ne "" ) { + if ( !defined($In{num}) ) { + # get the latest LOG file diff --git a/sysutils/backuppc-devel/files/patch-update.pl b/sysutils/backuppc-devel/files/patch-update.pl new file mode 100644 index 000000000000..4e66f9cf3a54 --- /dev/null +++ b/sysutils/backuppc-devel/files/patch-update.pl @@ -0,0 +1,276 @@ +--- ./update.pl.orig 2014-09-03 13:36:33.000000000 +0400 ++++ ./update.pl 2014-09-03 13:56:16.000000000 +0400 +@@ -222,7 +222,7 @@ + if ( $ConfigPath ne "" && -r $ConfigPath ) { + (my $confDir = $ConfigPath) =~ s{/[^/]+$}{}; + die("BackupPC::Lib->new failed\n") +- if ( !($bpc = BackupPC::Lib->new(".", ".", $confDir, 1)) ); ++ if ( !($bpc = BackupPC::Lib->new(".", $opts{"install-dir"}, $confDir, 1)) ); + %Conf = $bpc->Conf(); + %OrigConf = %Conf; + if ( !$opts{fhs} ) { +@@ -494,239 +494,21 @@ + + print <<EOF; + +-Ok, we're about to: +- +- - install the binaries, lib and docs in $Conf{InstallDir}, +- - create the data directory $Conf{TopDir}, +- - create/update the config.pl file $Conf{ConfDir}/config.pl, +- - optionally install the cgi-bin interface. ++Ok, we're about to create/update the config.pl file $Conf{ConfDir}/config.pl. + + EOF + + exit unless prompt("--> Do you want to continue?", "y") =~ /y/i; + + # +-# Create install directories +-# +-foreach my $dir ( qw(bin share/doc/BackupPC +- lib/BackupPC/CGI +- lib/BackupPC/Config +- lib/BackupPC/Lang +- lib/BackupPC/Storage +- lib/BackupPC/Xfer +- lib/BackupPC/Zip +- lib/Net/FTP +- ) ) { +- next if ( -d "$DestDir$Conf{InstallDir}/$dir" ); +- mkpath("$DestDir$Conf{InstallDir}/$dir", 0, 0755); +- if ( !-d "$DestDir$Conf{InstallDir}/$dir" +- || !my_chown($Uid, $Gid, "$DestDir$Conf{InstallDir}/$dir") ) { +- die("Failed to create or chown $DestDir$Conf{InstallDir}/$dir\n"); +- } else { +- print("Created $DestDir$Conf{InstallDir}/$dir\n"); +- } +-} +- +-# +-# Create CGI image directory +-# +-foreach my $dir ( ($Conf{CgiImageDir}) ) { +- next if ( $dir eq "" || -d "$DestDir$dir" ); +- mkpath("$DestDir$dir", 0, 0755); +- if ( !-d "$DestDir$dir" || !my_chown($Uid, $Gid, "$DestDir$dir") ) { +- die("Failed to create or chown $DestDir$dir"); +- } else { +- print("Created $DestDir$dir\n"); +- } +-} +- +-# +-# Create other directories +-# +-foreach my $dir ( ( +- "$Conf{TopDir}", +- "$Conf{TopDir}/pool", +- "$Conf{TopDir}/cpool", +- "$Conf{TopDir}/pc", +- "$Conf{ConfDir}", +- "$Conf{LogDir}", +- "$Conf{RunDir}", +- ) ) { +- mkpath("$DestDir$dir", 0, 0750) if ( !-d "$DestDir$dir" ); +- if ( !-d "$DestDir$dir" +- || !my_chown($Uid, $Gid, "$DestDir$dir") ) { +- die("Failed to create or chown $DestDir$dir\n"); +- } else { +- print("Created $DestDir$dir\n"); +- } +-} +- +-printf("Installing binaries in $DestDir$Conf{InstallDir}/bin\n"); +-foreach my $prog ( qw( +- bin/BackupPC +- bin/BackupPC_Admin_SCGI +- bin/BackupPC_archive +- bin/BackupPC_archiveHost +- bin/BackupPC_archiveStart +- bin/BackupPC_attribPrint +- bin/BackupPC_backupDelete +- bin/BackupPC_backupDuplicate +- bin/BackupPC_dump +- bin/BackupPC_fixupBackupSummary +- bin/BackupPC_fsck +- bin/BackupPC_ls +- bin/BackupPC_nightly +- bin/BackupPC_poolCntPrint +- bin/BackupPC_refCountUpdate +- bin/BackupPC_restore +- bin/BackupPC_rrdUpdate +- bin/BackupPC_sendEmail +- bin/BackupPC_serverMesg +- bin/BackupPC_tarCreate +- bin/BackupPC_tarExtract +- bin/BackupPC_zcat +- bin/BackupPC_zipCreate +- ) ) { +- InstallFile($prog, "$DestDir$Conf{InstallDir}/$prog", 0555); +-} +- +-# +-# remove old pre-v4 programs +-# +-foreach my $prog ( qw( +- bin/BackupPC_link +- bin/BackupPC_tarPCCopy +- bin/BackupPC_trashClean +- bin/BackupPC_compressPool +- ) ) { +- unlink("$DestDir$Conf{InstallDir}/$prog"); +-} +- +-printf("Installing library in $DestDir$Conf{InstallDir}/lib\n"); +-foreach my $lib ( qw( +- lib/BackupPC/Config/Meta.pm +- lib/BackupPC/DirOps.pm +- lib/BackupPC/Lib.pm +- lib/BackupPC/Storage.pm +- lib/BackupPC/View.pm +- lib/BackupPC/Xfer/Archive.pm +- lib/BackupPC/Xfer/Ftp.pm +- lib/BackupPC/Xfer/Protocol.pm +- lib/BackupPC/Xfer/Rsync.pm +- lib/BackupPC/Xfer/Smb.pm +- lib/BackupPC/Xfer/Tar.pm +- lib/BackupPC/Xfer.pm +- lib/BackupPC/Zip/FileMember.pm +- lib/Net/FTP/AutoReconnect.pm +- lib/Net/FTP/RetrHandle.pm +- lib/BackupPC/CGI/AdminOptions.pm +- lib/BackupPC/CGI/Archive.pm +- lib/BackupPC/CGI/ArchiveInfo.pm +- lib/BackupPC/CGI/Browse.pm +- lib/BackupPC/CGI/DirHistory.pm +- lib/BackupPC/CGI/EditConfig.pm +- lib/BackupPC/CGI/EmailSummary.pm +- lib/BackupPC/CGI/GeneralInfo.pm +- lib/BackupPC/CGI/HostInfo.pm +- lib/BackupPC/CGI/Lib.pm +- lib/BackupPC/CGI/LOGlist.pm +- lib/BackupPC/CGI/Queue.pm +- lib/BackupPC/CGI/ReloadServer.pm +- lib/BackupPC/CGI/Restore.pm +- lib/BackupPC/CGI/RestoreFile.pm +- lib/BackupPC/CGI/RestoreInfo.pm +- lib/BackupPC/CGI/RSS.pm +- lib/BackupPC/CGI/StartServer.pm +- lib/BackupPC/CGI/StartStopBackup.pm +- lib/BackupPC/CGI/StopServer.pm +- lib/BackupPC/CGI/Summary.pm +- lib/BackupPC/CGI/View.pm +- lib/BackupPC/Lang/cz.pm +- lib/BackupPC/Lang/de.pm +- lib/BackupPC/Lang/en.pm +- lib/BackupPC/Lang/es.pm +- lib/BackupPC/Lang/fr.pm +- lib/BackupPC/Lang/it.pm +- lib/BackupPC/Lang/ja.pm +- lib/BackupPC/Lang/nl.pm +- lib/BackupPC/Lang/pl.pm +- lib/BackupPC/Lang/pt_br.pm +- lib/BackupPC/Lang/ru.pm +- lib/BackupPC/Lang/uk.pm +- lib/BackupPC/Lang/zh_CN.pm +- lib/BackupPC/Storage/Text.pm +- ) ) { +- InstallFile($lib, "$DestDir$Conf{InstallDir}/$lib", 0444); +-} +- +-# +-# remove old pre-v4 libraries +-# +-foreach my $lib ( qw( +- lib/BackupPC/Attrib.pm +- lib/BackupPC/Config.pm +- lib/BackupPC/FileZIO.pm +- lib/BackupPC/PoolWrite.pm +- lib/BackupPC/Xfer/RsyncDigest.pm +- lib/BackupPC/Xfer/RsyncFileIO.pm +- ) ) { +- unlink("$DestDir$Conf{InstallDir}/$lib"); +-} +- +-# + # clean pid and sock files from old location (they are now in $Conf{RunDir}, and they + # get re-created each time BackupPC starts, so it's ok if RunDir eq LogDir). + # + unlink("$DestDir$Conf{LogDir}/BackupPC.pid") if ( -f "$DestDir$Conf{LogDir}/BackupPC.pid" ); + unlink("$DestDir$Conf{LogDir}/BackupPC.sock") if ( -e "$DestDir$Conf{LogDir}/BackupPC.sock" ); + +-if ( $Conf{CgiImageDir} ne "" ) { +- printf("Installing images in $DestDir$Conf{CgiImageDir}\n"); +- foreach my $img ( <images/*> ) { +- (my $destImg = $img) =~ s{^images/}{}; +- InstallFile($img, "$DestDir$Conf{CgiImageDir}/$destImg", 0444, 1); +- } +- +- # +- # Install new CSS file, making a backup copy if necessary +- # +- my $cssBackup = "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css.pre-4.0.0alpha3"; +- if ( -f "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css" && !-f $cssBackup ) { +- rename("$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css", $cssBackup); +- } +- InstallFile("conf/BackupPC_stnd.css", +- "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css", 0444, 0); +- InstallFile("conf/BackupPC_stnd_orig.css", +- "$DestDir$Conf{CgiImageDir}/BackupPC_stnd_orig.css", 0444, 0); +- InstallFile("conf/sorttable.js", +- "$DestDir$Conf{CgiImageDir}/sorttable.js", 0444, 0); +-} +- +-printf("Making init.d scripts\n"); +-foreach my $init ( qw(gentoo-backuppc gentoo-backuppc.conf linux-backuppc +- solaris-backuppc debian-backuppc freebsd-backuppc +- freebsd-backuppc2 suse-backuppc slackware-backuppc ) ) { +- InstallFile("init.d/src/$init", "init.d/$init", 0444); +-} +- +-printf("Making Apache configuration file for suid-perl\n"); +-InstallFile("httpd/src/BackupPC.conf", "httpd/BackupPC.conf", 0644); +- +-printf("Installing docs in $DestDir$Conf{InstallDir}/share/doc/BackupPC\n"); +-foreach my $doc ( qw(BackupPC.pod BackupPC.html) ) { +- InstallFile("doc/$doc", "$DestDir$Conf{InstallDir}/share/doc/BackupPC/$doc", 0444); +- # +- # clean up files from old directory +- # +- unlink("$DestDir$Conf{InstallDir}/doc/$doc") if ( -f "$DestDir$Conf{InstallDir}/doc/$doc" ); +-} +-# +-# clean up old directory (ok if it quietly fails if there are other files in that directory) +-# +-rmdir("$DestDir$Conf{InstallDir}/doc") if ( -d "$DestDir$Conf{InstallDir}/doc" ); +- + printf("Installing config.pl and hosts in $DestDir$Conf{ConfDir}\n"); +-InstallFile("conf/hosts", "$DestDir$Conf{ConfDir}/hosts", 0644) ++InstallFile("$DestDir$Conf{ConfDir}/hosts.sample", "$DestDir$Conf{ConfDir}/hosts", 0644) + if ( !-f "$DestDir$Conf{ConfDir}/hosts" ); + + # +@@ -735,7 +517,7 @@ + # parameters and deleting ones that are no longer needed. + # + my $dest = "$DestDir$Conf{ConfDir}/config.pl"; +-my ($distConf, $distVars) = ConfigParse("conf/config.pl"); ++my ($distConf, $distVars) = ConfigParse("$DestDir$Conf{ConfDir}/config.pl.sample"); + my ($oldConf, $oldVars); + my ($newConf, $newVars) = ($distConf, $distVars); + if ( -f $dest ) { +@@ -974,13 +756,6 @@ + die("can't chown $Uid, $Gid $dest\n") unless my_chown($Uid, $Gid, $dest); + } + +-if ( $Conf{CgiDir} ne "" ) { +- printf("Installing cgi script BackupPC_Admin in $DestDir$Conf{CgiDir}\n"); +- mkpath("$DestDir$Conf{CgiDir}", 0, 0755); +- InstallFile("cgi-bin/BackupPC_Admin", "$DestDir$Conf{CgiDir}/BackupPC_Admin", +- 04554); +-} +- + print <<EOF; + + Ok, it looks like we are finished. There are several more things you diff --git a/sysutils/backuppc-devel/files/pkg-deinstall.in b/sysutils/backuppc-devel/files/pkg-deinstall.in new file mode 100644 index 000000000000..337d97f207ef --- /dev/null +++ b/sysutils/backuppc-devel/files/pkg-deinstall.in @@ -0,0 +1,21 @@ +#! /bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +echo +echo "=======================================================================" +echo " If you are permanently removing BackupPC, you should manually delete:" +echo " - the backuppc user/group: pw userdel backuppc" +if [ -d %%ETCDIR%% ]; then + echo " - BackupPC configuration: rm -r %%ETCDIR%%" +fi +if [ -d /var/db/BackupPC ]; then + echo " - BackupPC data directory: rm -r /var/db/BackupPC" +fi +if [ -d /var/log/BackupPC ]; then + echo " - BackupPC logs directory: rm -r /var/log/BackupPC" +fi +echo "=======================================================================" +echo diff --git a/sysutils/backuppc-devel/files/pkg-message.in b/sysutils/backuppc-devel/files/pkg-message.in new file mode 100644 index 000000000000..5a3d8f4dbf64 --- /dev/null +++ b/sysutils/backuppc-devel/files/pkg-message.in @@ -0,0 +1,16 @@ +========================================================================== + - If this is a new installation or version upgrade, + to create/update configuration you should run + + %%ETCDIR%%/update.sh + + - Add the following line to /etc/rc.conf to enable BackupPC: + + backuppc_enable="YES" + + - Data directory is /var/db/BackupPC + + This is where all the backup data is stored. + This file system needs to be big enough + to accommodate all the PCs you expect to backup. +========================================================================== diff --git a/sysutils/backuppc-devel/files/update.sh.in b/sysutils/backuppc-devel/files/update.sh.in new file mode 100644 index 000000000000..9c9ab4b29bb6 --- /dev/null +++ b/sysutils/backuppc-devel/files/update.sh.in @@ -0,0 +1,11 @@ +#!/bin/sh + +perl %%PREFIX%%/libexec/backuppc/update.pl \ + --config-dir %%ETCDIR%% \ + --cgi-dir %%CGIDIR%% \ + --data-dir /var/db/BackupPC \ + --fhs \ + --html-dir %%WWWDIR%% \ + --html-dir-url /backuppc \ + --install-dir %%PREFIX%% \ + --log-dir /var/log/BackupPC diff --git a/sysutils/backuppc-devel/pkg-descr b/sysutils/backuppc-devel/pkg-descr new file mode 100644 index 000000000000..7f4c9d9de09b --- /dev/null +++ b/sysutils/backuppc-devel/pkg-descr @@ -0,0 +1,5 @@ +BackupPC is a high-performance, enterprise-grade system for backing up Linux, +WinXX and MacOSX PCs and laptops to a server's disk. +BackupPC is highly configurable and easy to install and maintain. + +WWW: http://backuppc.sourceforge.net diff --git a/sysutils/backuppc-devel/pkg-plist b/sysutils/backuppc-devel/pkg-plist new file mode 100644 index 000000000000..ff83da0c9ead --- /dev/null +++ b/sysutils/backuppc-devel/pkg-plist @@ -0,0 +1,153 @@ +@stopdaemon backuppc +@mode 0555 +bin/BackupPC +bin/BackupPC_Admin_SCGI +bin/BackupPC_archive +bin/BackupPC_archiveHost +bin/BackupPC_archiveStart +bin/BackupPC_attribPrint +bin/BackupPC_backupDelete +bin/BackupPC_backupDuplicate +bin/BackupPC_dump +bin/BackupPC_fixupBackupSummary +bin/BackupPC_fsck +bin/BackupPC_ls +bin/BackupPC_nightly +bin/BackupPC_poolCntPrint +bin/BackupPC_refCountUpdate +bin/BackupPC_restore +bin/BackupPC_rrdUpdate +bin/BackupPC_sendEmail +bin/BackupPC_serverMesg +bin/BackupPC_tarCreate +bin/BackupPC_tarExtract +bin/BackupPC_zcat +bin/BackupPC_zipCreate +@mode 0444 +lib/BackupPC/CGI/AdminOptions.pm +lib/BackupPC/CGI/Archive.pm +lib/BackupPC/CGI/ArchiveInfo.pm +lib/BackupPC/CGI/Browse.pm +lib/BackupPC/CGI/DirHistory.pm +lib/BackupPC/CGI/EditConfig.pm +lib/BackupPC/CGI/EmailSummary.pm +lib/BackupPC/CGI/GeneralInfo.pm +lib/BackupPC/CGI/HostInfo.pm +lib/BackupPC/CGI/LOGlist.pm +lib/BackupPC/CGI/Lib.pm +lib/BackupPC/CGI/Queue.pm +lib/BackupPC/CGI/RSS.pm +lib/BackupPC/CGI/ReloadServer.pm +lib/BackupPC/CGI/Restore.pm +lib/BackupPC/CGI/RestoreFile.pm +lib/BackupPC/CGI/RestoreInfo.pm +lib/BackupPC/CGI/StartServer.pm +lib/BackupPC/CGI/StartStopBackup.pm +lib/BackupPC/CGI/StopServer.pm +lib/BackupPC/CGI/Summary.pm +lib/BackupPC/CGI/View.pm +lib/BackupPC/Config/Meta.pm +lib/BackupPC/DirOps.pm +lib/BackupPC/Lang/cz.pm +lib/BackupPC/Lang/de.pm +lib/BackupPC/Lang/en.pm +lib/BackupPC/Lang/es.pm +lib/BackupPC/Lang/fr.pm +lib/BackupPC/Lang/it.pm +lib/BackupPC/Lang/ja.pm +lib/BackupPC/Lang/nl.pm +lib/BackupPC/Lang/pl.pm +lib/BackupPC/Lang/pt_br.pm +lib/BackupPC/Lang/ru.pm +lib/BackupPC/Lang/uk.pm +lib/BackupPC/Lang/zh_CN.pm +lib/BackupPC/Lib.pm +lib/BackupPC/Storage.pm +lib/BackupPC/Storage/Text.pm +lib/BackupPC/View.pm +lib/BackupPC/Xfer.pm +lib/BackupPC/Xfer/Archive.pm +lib/BackupPC/Xfer/Ftp.pm +lib/BackupPC/Xfer/Protocol.pm +lib/BackupPC/Xfer/Rsync.pm +lib/BackupPC/Xfer/Smb.pm +lib/BackupPC/Xfer/Tar.pm +lib/BackupPC/Zip/FileMember.pm +lib/Net/FTP/AutoReconnect.pm +lib/Net/FTP/RetrHandle.pm +man/man1/backuppc.1.gz +%%PORTDOCS%%%%DOCSDIR%%/BackupPC.html +%%PORTDOCS%%%%DOCSDIR%%/BackupPC.pod +%%WWWDIR%%/0000000.gif +%%WWWDIR%%/0000011.gif +%%WWWDIR%%/0001000.gif +%%WWWDIR%%/0010000.gif +%%WWWDIR%%/0010001.gif +%%WWWDIR%%/0011000.gif +%%WWWDIR%%/0011001.gif +%%WWWDIR%%/1000000.gif +%%WWWDIR%%/1000100.gif +%%WWWDIR%%/1001000.gif +%%WWWDIR%%/1001100.gif +%%WWWDIR%%/1010000.gif +%%WWWDIR%%/1010001.gif +%%WWWDIR%%/1011000.gif +%%WWWDIR%%/1100000.gif +%%WWWDIR%%/1100100.gif +%%WWWDIR%%/1100101.gif +%%WWWDIR%%/1100110.gif +%%WWWDIR%%/1100111.gif +%%WWWDIR%%/1101000.gif +%%WWWDIR%%/1101100.gif +%%WWWDIR%%/1101101.gif +%%WWWDIR%%/1101110.gif +%%WWWDIR%%/1101111.gif +%%WWWDIR%%/1110000.gif +%%WWWDIR%%/1110001.gif +%%WWWDIR%%/1110100.gif +%%WWWDIR%%/1110101.gif +%%WWWDIR%%/1110110.gif +%%WWWDIR%%/1110111.gif +%%WWWDIR%%/1111000.gif +%%WWWDIR%%/1111001.gif +%%WWWDIR%%/1111100.gif +%%WWWDIR%%/1111101.gif +%%WWWDIR%%/1111110.gif +%%WWWDIR%%/1111111.gif +%%WWWDIR%%/BackupPC.html +%%WWWDIR%%/BackupPC_stnd.css +%%WWWDIR%%/BackupPC_stnd_orig.css +%%WWWDIR%%/favicon.ico +%%WWWDIR%%/icon-dir.png +%%WWWDIR%%/icon-file.png +%%WWWDIR%%/icon-hardlink.png +%%WWWDIR%%/icon-symlink.png +%%WWWDIR%%/logo.gif +%%WWWDIR%%/sorttable.js +@owner backuppc +@group backuppc +@mode 04554 +%%CGIDIR%%/BackupPC_Admin +@owner +@group +@mode +@owner backuppc +@group backuppc +@dir /var/run/BackupPC +@dir /var/log/BackupPC +@dir /var/db/BackupPC/cpool +@dir /var/db/BackupPC/pc +@dir /var/db/BackupPC/pool +@dir /var/db/BackupPC +@comment .sample files actually are templates for the configuration script +@comment and should not be installed as working configuration files. +@mode 0640 +@sample %%ETCDIR%%/config.pl.sample +@mode 0644 +@sample %%ETCDIR%%/hosts.sample +@owner +@group +@mode 0544 +%%ETCDIR%%/update.sh +libexec/backuppc/update.pl +@mode |