# This configuration file is a sample for clamdsh. # You can update clamdsh automatically, using clamav-update.pl with # --config optioin. # ex) clamav-update.pl --config /usr/local/etc/clamdsh-update.conf #### Getting Version Method #### # latest version # command to get $Setting{version}->{latest}->{command} = [qw(curl --silent http://clamav-update.sourceforge.jp/release/clamdsh/version.txt)]; # the regular expression that is applied to command output $Setting{version}->{latest}->{regexp} = qr/^(\d+(?:\.\d+)*)\s*$/; # current version # command to get $Setting{version}->{current}->{command} = [qw(clamdsh.pl --version)]; # the regular expression that is applied to command output $Setting{version}->{current}->{regexp} = qr/^(?s-im)clamdsh\.pl v(\d+(?:\.\d+)*)\s+.*$/; #### Environment Variables #### # $Setting{environment}->{VARNAME} = 'VALUE'; # PATH $Setting{environment}->{PATH} = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin'; #### Options #### # These settings will be overwrited with command line options. # download from # 'http://osdn.dl.sourceforge.jp/clamav-update' # Tokyo Japan: OSDN Japan # 'http://keihanna.dl.sourceforge.jp/clamav-update' # Keihanna Japan: Kansai Science City Internet Community # 'http://qgpop.dl.sourceforge.jp/clamav-update' # Fukuoka Japan: Kyushu GigaPOP Project $Setting{option}->{src} = 'http://osdn.dl.sourceforge.jp/clamav-update'; # package name $Setting{option}->{name} = 'clamdsh'; #### Update Phases Specification #### # phases sequence $Setting{phase}->{sequence} = [qw(download extract install)]; # custom phase specifier $Setting{phase}->{specifier} = sub { PhaseSpecifier4General(); delete $Phase{build}; $Phase{download}->{method} = [ sub { my $releaseID; $releaseID = ReadCommandResult(qw(curl --silent http://clamav-update.sourceforge.jp/release/clamdsh/release_id.txt)); return 0 unless (defined($releaseID)); chomp $releaseID; Log 'debug', 'release ID is %s', $releaseID; return DoCommand( 'curl', '--silent', '-o', "$Setting{option}->{dst}/$Setting{option}->{name}-$LatestVersion.$Setting{option}->{ext}", "$Setting{option}->{src}/$releaseID/$Setting{option}->{name}-$LatestVersion.$Setting{option}->{ext}" ); }, ]; }; #### DO NOT EDIT #### 1;