Ticket #39435: Portfile-clamav.diff
File Portfile-clamav.diff, 2.6 KB (added by mroman@…, 11 years ago) |
---|
-
Portfile
old new 38 38 configure.cflags {-O0} 39 39 } 40 40 41 if {"darwin" == ${os.platform} && ${os.major} > 8} { 42 set clamavuser _clamav 43 } else { 44 set clamavuser clamav 45 } 46 add_users ${clamavuser} group=${clamavuser} realname=clamav 47 48 41 49 post-destroot { 50 xinstall -d -o ${clamavuser} -g ${clamavuser} -m 755 ${destroot}${prefix}/share/clamav 51 52 reinplace "/^Example.*$/d" "${destroot}${prefix}/etc/freshclam.conf" 53 reinplace "s|^#NotifyClamd .*$|NotifyClamd ${prefix}/etc/clamd.conf|" "${destroot}${prefix}/etc/freshclam.conf" 54 reinplace "s|^#PidFile .*$|#PidFile ${prefix}/var/run/freshclam.pid|" "${destroot}${prefix}/etc/freshclam.conf" 55 reinplace "s|^#UpdateLogFile .*$|#UpdateLogFile ${prefix}/var/log/freshclam.log|" "${destroot}${prefix}/etc/freshclam.conf" 56 57 reinplace "/^Example.*$/d" "${destroot}${prefix}/etc/clamd.conf" 58 reinplace "s|^#Foreground .*$|Foreground yes|" "${destroot}${prefix}/etc/clamd.conf" 59 reinplace "s|^#PidFile .*$|PidFile ${prefix}/var/run/clamd.pid|" "${destroot}${prefix}/etc/clamd.conf" 60 reinplace "s|^#LocalSocket .*$|LocalSocket ${prefix}/var/run/clamd.socket|" "${destroot}${prefix}/etc/clamd.conf" 61 reinplace "s|^#LogFile .*$|#LogFile ${prefix}/var/log/clamd.log|" "${destroot}${prefix}/etc/clamd.conf" 62 63 file attributes ${destroot}${prefix}/bin/freshclam -group ${clamavuser} -owner ${clamavuser} -permissions 06755 64 65 42 66 file rename "${destroot}${prefix}/etc/freshclam.conf" "${destroot}${prefix}/etc/example-freshclam.conf" 43 67 file rename "${destroot}${prefix}/etc/clamd.conf" "${destroot}${prefix}/etc/example-clamd.conf" 44 68 … … 53 77 reinplace "s|-arch ${build_arch}||g" ${destroot}${prefix}/bin/clamav-config 54 78 reinplace "s|-L\$\{exec_prefix\}/lib/${build_arch}||g" ${destroot}${prefix}/bin/clamav-config 55 79 } 56 } 80 } 81 82 destroot.keepdirs ${destroot}${prefix}/share/clamav 83 84 post-activate { 85 if {![file exists ${prefix}/etc/clamd.conf]} { 86 file copy ${prefix}/etc/example-clamd.conf ${prefix}/etc/clamd.conf 87 } 88 if {![file exists ${prefix}/etc/freshclam.conf]} { 89 file copy ${prefix}/etc/example-freshclam.conf ${prefix}/etc/freshclam.conf 90 } 91 } 57 92 58 93 variant clamav_milter description {build with libmilter support} { 59 94 depends_lib-append port:libmilter … … 63 98 } 64 99 } 65 100 101 102 66 103 livecheck.type regex 67 104 livecheck.url http://sourceforge.net/projects/clamav/files 68 105 livecheck.regex ${name}-(\\d+.\\d+.\\d+)${extract.suffix}