金に目が暗み、MacBookにClamAVを導入

テレビでやってるじゃないですか、ラーメンズとかいうお笑い芸人が出ているAppleのCM(他人事(苦笑)。Macはウィルスは大丈夫とかいう。マックユーザはウィルス対策で必死になったら負けですよ(苦笑)。

clamav-update :: ドキュメント :: FreshClamDaemon :: ClamAV のための GMP ライブラリ

を参考にGMP ライブラリは以下のようにしてインストールしました。i686もOKでした。

gmp-4.2.1/にcd
CFLAGS="-arch i386" ./configure --host=none-apple-darwin --enable-cxx
LDFLAGS="-arch i386" make

make check > make_test.txt 2>&1
でALL OKでしたので
sudo make install

clamav-0.90.2のインストールは
ClamAV の freshclam に HTTP ヘッダバッファーオーバフローの脆弱性
を参考に以下のように行いました。

clamav-0.90.2/にcd 
 ./configure --prefix=/usr/local/clamXav
 make
sudo make install

パーミッション等もまねています、そのまんま(どうもお世話になります(苦笑)

clamXavも押さえの切り札として投入。

がしかし、XCodeとかあるし(苦笑)
おもむろにXCodeを立ち上げ、「新規プロジェクト」>「AppleScript Droplet」を選択し何か始めた。YoYo! ラッパーアプリ: clamav-wrapper.appの製作。
freshclamでウィルス・データベースを更新後、clamscanでウィルスチェックするDropletです。

Application.applescript

-- clamav-wrapper.applescript
-- clamav-wrapper

--  Created by NF on 07/05/03.
--  Copyright 2007  FreeGGG Group. All rights reserved.

on idle
	(* Add any idle time processing here. *)
end idle

on open names
	(* Add your script to process the names here. *)
	
	repeat with thisObj in names
		set thisObjPath to POSIX path of thisObj
		set outtxt to do shell script "/usr/local/clamXav/bin/freshclam --quiet;
                   /usr/local/clamXav/bin/clamscan  --no-summary  -i -r " & quoted form of thisObjPath

		activate
		display dialog outtxt & thisObjPath & " OK!!" buttons {"OK"} default button 1
		
	end repeat
	-- Remove the following line if you want the application to stay open.
	quit
end open

これだけ書いてよろしく頼めばドラッグ&ドロップでウィルスチェックしてくれる(一見)アプリが完成。すばらしい。
本体appまたはそのエイリアスをFruitMenuでコンテクストメニューに登録すればさらによい。

と、do shell scriptについては下記が詳しいです。