###############################################################################
# This file is part of the IPCop Firewall.                                    #
#                                                                             #
# IPCop is free software; you can redistribute it and/or modify               #
# it under the terms of the GNU General Public License as published by        #
# the Free Software Foundation; either version 2 of the License, or           #
# (at your option) any later version.                                         #
#                                                                             #
# IPCop is distributed in the hope that it will be useful,                    #
# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
# GNU General Public License for more details.                                #
#                                                                             #
# You should have received a copy of the GNU General Public License           #
# along with IPCop; if not, write to the Free Software                        #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA    #
#                                                                             #
# Makefiles are based on LFSMake, which is                                    #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #
#                                                                             #
# Modifications by:                                                           #
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com>                               #
#          - Modified Makefile for IPCop build                                #
#                                                                             #
# $Id: files_check 2188 2008-12-13 14:54:41Z gespinasse $
#                                                                             #
###############################################################################

###############################################################################
# Definitions
###############################################################################

PKG_NAME   = files_check
HOST_ARCH  = all

THISAPP    = $(PKG_NAME)

ALLFILES  := ${NAME}-${VERSION}-all-files-list.${MACHINE}.txt

###############################################################################
# Top-level Rules
###############################################################################


check :

download :

md5 :

# 'install' target is used because we prefer to re-use chroot_make and so have no choice
###############################################################################
# Installation Details
###############################################################################
# Produce the md5 of installed files
install :

	echo "Generating md5 for each file include in $(NAME)" >> $(LOGFILE)
	-mv -f /usr/src/doc/${ALLFILES}.md5 /usr/src/doc/${ALLFILES}.md5.bak
	# remove dev/console (and dev/null) from the list or md5sum hang
	# skip directories to avoid error message and don't care of symlink
	for myfile in `cat /usr/src/doc/${ALLFILES} | sed 's|^dev.*||'`; do \
		if [ -f /$${myfile} ]; then \
			md5sum /$$myfile >> /usr/src/doc/${ALLFILES}.md5; \
		fi; \
	done
	# may include other check later
