[54886] trunk/dports/sysutils/backuppc/Portfile

jameskyle at macports.org jameskyle at macports.org
Mon Aug 3 12:28:21 PDT 2009


Revision: 54886
          http://trac.macports.org/changeset/54886
Author:   jameskyle at macports.org
Date:     2009-08-03 12:28:20 -0700 (Mon, 03 Aug 2009)
Log Message:
-----------
Corrected some wrong path resolution issues with the configure.pl to properly find macports binaries.
Added directory retention for destroot skeleton directories.

Modified Paths:
--------------
    trunk/dports/sysutils/backuppc/Portfile

Modified: trunk/dports/sysutils/backuppc/Portfile
===================================================================
--- trunk/dports/sysutils/backuppc/Portfile	2009-08-03 19:28:18 UTC (rev 54885)
+++ trunk/dports/sysutils/backuppc/Portfile	2009-08-03 19:28:20 UTC (rev 54886)
@@ -12,7 +12,7 @@
 
 master_sites					sourceforge:${name}
 
-depends_lib						port:perl5.8 \
+depends_lib						port:perl5 \
 											port:p5-compress-zlib \
 											port:p5-archive-zip \
 											port:p5-file-rsyncp \
@@ -20,8 +20,12 @@
 											port:gnutar \
 											port:mod_perl2 \
 											port:rsync \
-											port:openssh
+											port:openssh \
+											port:gzip \
+											port:bzip2 \
+											port:par2
 											
+											
 distfiles							BackupPC-${version}.tar.gz
 checksums           	md5     84b4471852ef910768eae9963ef932d2 \
                     	sha1    3bd6d637f4f08f2fda44a12668b91d47c4abb0a7 \
@@ -37,9 +41,20 @@
 											--install-dir ${prefix}	\
 											--config-dir ${prefix}/etc/BackupPC										
 
+patchfiles            patch-configure.pl.diff
+
 worksrcdir            BackupPC-${version}
+
 destroot.violate_mtree yes
-
+destroot.keepdirs      ${destroot}${prefix}/var/backups \
+                       ${destroot}${prefix}/var/backups/cpool \
+                       ${destroot}${prefix}/var/backups/log \
+                       ${destroot}${prefix}/var/backups/trash \
+                       ${destroot}${prefix}/var/backups/pool \
+                       ${destroot}${prefix}/var/backups/pc \
+                       ${destroot}${prefix}/var/backups/ \
+                       ${destroot}${prefix}/var/log/BackupPC
+                       
 pre-configure {
 
   set hostname [exec "hostname"]
@@ -49,6 +64,8 @@
 }
 
 configure {
+  reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/configure.pl
+  
   if {[existsgroup "backuppc"]} {
     ui_debug "Found backuppc group."
   } else {
@@ -78,55 +95,71 @@
 build {}
 
 destroot {
-    system "cd ${worksrcpath} && ${prefix}/bin/perl5.8 configure.pl ${configure.args}"
+    xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/backups
+    
+    xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/log/BackupPC
+    
+    # create backup directory
+    system "cd ${worksrcpath} && ${prefix}/bin/perl 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 -d -m 755 ${destroot}/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
+    xinstall ${filespath}/net.sourceforge.backuppc.plist \
+             ${destroot}/Library/LaunchDaemons/
+     reinplace "s|@@PREFIX@@|${prefix}|g" ${destroot}/Library/LaunchDaemons/net.sourceforge.backuppc.plist
+     
+     # Install extras
+     xinstall -d -m 755 ${destroot}${prefix}/share/BackupPC/extras
+     xinstall ${filespath}/backuppc_config_template.rb \
+              ${destroot}${prefix}/share/BackupPC/extras
   
 }
 
-# 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}
-#   
-# }
+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.
+      
+    - Change the \$Conf{}
+
+    - 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
+      
+    - Please see the ${prefix}/share/BackupPC/extras directory for client
+      setup scripts, sample apache.conf files, and more.
+  "
+
+  ui_msg ${finish_message}
+  
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090803/12ff9af6/attachment-0001.html>


More information about the macports-changes mailing list