Changeset 54888


Ignore:
Timestamp:
Aug 3, 2009, 7:28:26 PM (11 years ago)
Author:
jameskyle@…
Message:

Corrected error in documentation link.
Added an httpd digest auth file example in extras.
Added a backuppc favicon.ico.

Location:
trunk/dports/sysutils/backuppc
Files:
10 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/sysutils/backuppc/Portfile

    r54887 r54888  
    4242                                                                                        --config-dir ${prefix}/etc/BackupPC                                                                             
    4343
    44 patchfiles            patch-configure.pl.diff
     44patchfiles            patch-configure.pl.diff \
     45                      patch-lib-backuppc-cgi-view.pm.diff
    4546
    4647worksrcdir            BackupPC-${version}
    4748
    4849destroot.violate_mtree yes
     50
    4951destroot.keepdirs      ${destroot}${prefix}/var/backups \
    5052                       ${destroot}${prefix}/var/backups/cpool \
     
    5456                       ${destroot}${prefix}/var/backups/pc \
    5557                       ${destroot}${prefix}/var/backups/ \
    56                        ${destroot}${prefix}/var/log/BackupPC
     58                       ${destroot}${prefix}/var/log/BackupPC \
     59                       ${destroot}${prefix}/var/wwwbackup/htdocs\
     60                       ${destroot}${prefix}/var/wwwbackup/logs
    5761                       
     62set hostname [exec "hostname"]                       
     63
    5864pre-configure {
    5965
    60   set hostname [exec "hostname"]
    6166  ui_debug  "Hostname: ${hostname}"
    6267  configure.args-append --hostname ${hostname}
     
    6671configure {
    6772  reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/configure.pl
     73  reinplace "s|@@PREFIX@@|${prefix}/|g" ${worksrcpath}/lib/BackupPC/CGI/View.pm
     74 
    6875 
    6976  if {[existsgroup "backuppc"]} {
     
    95102build {}
    96103
    97 destroot {
    98     xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/backups
    99    
    100     xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/log/BackupPC
    101    
    102     # create backup directory
    103     system "cd ${worksrcpath} && ${prefix}/bin/perl configure.pl ${configure.args}"
    104     xinstall -d -m 755 ${destroot}${prefix}/share/doc/
    105     move ${destroot}${prefix}/doc ${destroot}${prefix}/share/doc/BackupPC
    106    
    107     # install the launch scripts
    108     xinstall -d -m 755 ${destroot}/Library/LaunchDaemons
    109    
    110     xinstall ${filespath}/net.sourceforge.backuppc.plist \
    111              ${destroot}/Library/LaunchDaemons/
    112      reinplace "s|@@PREFIX@@|${prefix}|g" ${destroot}/Library/LaunchDaemons/net.sourceforge.backuppc.plist
    113      
    114      # Install extras
    115      xinstall -d -m 755 ${destroot}${prefix}/share/BackupPC/extras
    116      xinstall ${filespath}/backuppc_config_template.rb \
    117               ${destroot}${prefix}/share/BackupPC/extras
     104destroot { 
     105  # destroot for the web skeleton
     106  xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/wwwbackup
     107  xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/wwwbackup/cgi-bin
     108  xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/wwwbackup/conf
     109  xinstall -m 600 -g backuppc -o backuppc ${filespath}/httpd.conf ${destroot}${prefix}/var/wwwbackup/conf/
     110 
     111  xinstall -m 600 -g backuppc -o backuppc ${filespath}/mime.types ${destroot}${prefix}/var/wwwbackup/conf
     112  xinstall -m 600 -g backuppc -o backuppc ${filespath}/magic ${destroot}${prefix}/var/wwwbackup/conf
     113 
     114  xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/wwwbackup/htdocs
     115  xinstall -m 600 -g backuppc -o backuppc ${filespath}/favicon.ico ${destroot}${prefix}/var/wwwbackup/htdocs/
     116 
     117  xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/wwwbackup/logs
     118 
     119  # destroot for backuppc
     120  xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/backups
     121  xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/log/BackupPC
     122 
     123  # create backup directory
     124  system "cd ${worksrcpath} && ${prefix}/bin/perl configure.pl ${configure.args}"
     125  xinstall -d -m 755 ${destroot}${prefix}/share/doc/
     126  move ${destroot}${prefix}/doc ${destroot}${prefix}/share/doc/BackupPC
     127 
     128  # install the launch scripts
     129  xinstall -d -m 755 ${destroot}/Library/LaunchDaemons
     130 
     131  xinstall ${filespath}/net.sourceforge.backuppc.plist \
     132           ${destroot}/Library/LaunchDaemons/
     133   
     134   # Install extras
     135   xinstall -d -m 755 ${destroot}${prefix}/share/BackupPC/extras
     136   xinstall ${filespath}/backuppc_config_template.rb \
     137            ${destroot}${prefix}/share/BackupPC/extras
     138   xinstall ${filespath}/backuppc_auth.conf ${destroot}${prefix}/share/BackupPC/extras
     139   reinplace "s|@@PREFIX@@|${prefix}|g" ${destroot}${prefix}/share/BackupPC/extras/backuppc_auth.conf
     140           
     141   xinstall ${filespath}/org.macports.backuppc.apache2.plist \
     142            ${destroot}/Library/LaunchDaemons/
     143  reinplace "s|@@PREFIX@@|${prefix}|g" ${destroot}/Library/LaunchDaemons/org.macports.backuppc.apache2.plist
     144  reinplace "s|@@CONFPATH@@|${prefix}/var/wwwbackup/conf/|g" ${destroot}/Library/LaunchDaemons/org.macports.backuppc.apache2.plist
     145  reinplace "s|@@PREFIX@@|${prefix}|g" ${destroot}${prefix}/var/wwwbackup/conf/httpd.conf
     146  reinplace "s|@@HOSTNAME@@|${hostname}|g" ${destroot}${prefix}/var/wwwbackup/conf/httpd.conf
     147  reinplace "s|@@PREFIX@@|${prefix}|g" ${destroot}/Library/LaunchDaemons/net.sourceforge.backuppc.plist
     148           
     149           
     150   
     151           
    118152 
    119153}
Note: See TracChangeset for help on using the changeset viewer.