[54885] trunk/dports/sysutils/backuppc
jameskyle at macports.org
jameskyle at macports.org
Mon Aug 3 12:28:19 PDT 2009
Revision: 54885
http://trac.macports.org/changeset/54885
Author: jameskyle at macports.org
Date: 2009-08-03 12:28:18 -0700 (Mon, 03 Aug 2009)
Log Message:
-----------
Added the BackupPC launchd script.
First working full install.
Modified Paths:
--------------
trunk/dports/sysutils/backuppc/Portfile
Added Paths:
-----------
trunk/dports/sysutils/backuppc/files/
trunk/dports/sysutils/backuppc/files/net.sourceforge.backuppc.plist
Modified: trunk/dports/sysutils/backuppc/Portfile
===================================================================
--- trunk/dports/sysutils/backuppc/Portfile 2009-08-03 19:28:16 UTC (rev 54884)
+++ trunk/dports/sysutils/backuppc/Portfile 2009-08-03 19:28:18 UTC (rev 54885)
@@ -2,6 +2,7 @@
PortSystem 1.0
name backuppc
+categories sysutils
version 3.1.0
maintainers jameskyle
description BackupPC is a high-performance, enterprise-grade system for backing up Linux, WinXX and MacOSX PCs and laptops to a server's disk.
@@ -18,7 +19,8 @@
port:samba3 \
port:gnutar \
port:mod_perl2 \
- port:rsync
+ port:rsync \
+ port:openssh
distfiles BackupPC-${version}.tar.gz
checksums md5 84b4471852ef910768eae9963ef932d2 \
@@ -29,11 +31,15 @@
--backuppc-user=backuppc \
--cgi-dir ${prefix}/apache2/cgi-bin \
--data-dir ${prefix}/var/backups \
- --dest-dir ${destroot}${prefix} \
+ --dest-dir ${destroot} \
--html-dir ${prefix}/apache2/htdocs/backuppc \
--html-dir-url /backuppc \
- --install-dir ${prefix}/BackupPC
+ --install-dir ${prefix} \
+ --config-dir ${prefix}/etc/BackupPC
+worksrcdir BackupPC-${version}
+destroot.violate_mtree yes
+
pre-configure {
set hostname [exec "hostname"]
@@ -67,4 +73,60 @@
return -code error "Failed to create backuppc user"
}
}
-}
\ No newline at end of file
+}
+
+build {}
+
+destroot {
+ system "cd ${worksrcpath} && ${prefix}/bin/perl5.8 configure.pl ${configure.args}"
+ xinstall -d -m 755 ${destroot}${prefix}/share/doc/
+ move ${destroot}${prefix}/doc ${destroot}${prefix}/share/doc/BackupPC
+
+ # install the launch scripts
+ xinstall -d -m 755 ${destroot}${prefix}/Library/LaunchDaemons
+
+ xinstall ${filespath}/net.sourceforge.backuppc.plist ${destroot}${prefix}/Library/LaunchDaemons/
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${destroot}${prefix}/Library/LaunchDaemons/net.sourceforge.backuppc.plist
+
+}
+
+# post-activate {
+# set finish_message "There are several more things you
+# will need to do:
+#
+# - Browse through the config file, ${prefix}/etc/BackupPC/config.pl,
+# and make sure all the settings are correct. In particular,
+# you will need to set \$Conf{CgiAdminUsers} so you have
+# administration privileges in the CGI interface.
+#
+# - Edit the list of hosts to backup in ${prefix}/etc/BackupPC/hosts.
+#
+# - Read the documentation in ${prefix}/share/doc/BackupPC/BackupPC.html.
+# Please pay special attention to the security section.
+#
+# - Verify that the CGI script BackupPC_Admin runs correctly. You might
+# need to change the permissions or group ownership of BackupPC_Admin.
+# If this is an upgrade and you are using mod_perl, you will need
+# to restart Apache. Otherwise it will have stale code.
+#
+# - BackupPC should be ready to start. Don't forget to run it
+# as user backuppc! The installation also contains an
+# /Library/LaunchDaemons/net.sourceforge.backuppc.plist launchd
+# so that BackupPC can auto-start on boot. To enable this daemon
+# execute the following command:
+# cd /Library/LaunchDaemons
+# sudo launchctl load net.sourceforge.backuppc.plist
+#
+# - The data directory is set to ${prefix}/var/backups. Please ensure
+# You have enough space for your backups at this location. You may
+# wish to create a custom mount point point for you backup volume
+# if necessary.
+#
+# - To hide the backuppc user in the login window, you may execute
+#
+# defaults write /Library/Preferences/com.apple.loginwindow
+# "
+#
+# ui_msg ${finish_message}
+#
+# }
Added: trunk/dports/sysutils/backuppc/files/net.sourceforge.backuppc.plist
===================================================================
--- trunk/dports/sysutils/backuppc/files/net.sourceforge.backuppc.plist (rev 0)
+++ trunk/dports/sysutils/backuppc/files/net.sourceforge.backuppc.plist 2009-08-03 19:28:18 UTC (rev 54885)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key>
+ <string>net.sourceforge.backuppc</string>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>KeepAlive</key>
+ <true/>
+ <key>UserName</key>
+ <string>backuppc</string>
+ <key>Program</key>
+ <string>@@PREFIX@@/bin/BackupPC</string>
+</dict>
+</plist>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090803/6d2c5ad3/attachment.html>
More information about the macports-changes
mailing list