From 78bac81a58355a6d42760e1974005dbcdd8e8dcf Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Thu, 28 Jun 2007 10:48:32 +0100 Subject: scripts/makepkg.in: Don't include .PKGINFO etc in .FILELIST And move .PKGINFO and .FILELIST to be the first to files included in the package. Signed-off-by: Andrew Fyfe --- scripts/makepkg.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/makepkg.in b/scripts/makepkg.in index a7cc7e51..8be44c65 100644 --- a/scripts/makepkg.in +++ b/scripts/makepkg.in @@ -737,10 +737,14 @@ create_package() { fi local size=$(du -sb | awk '{print $1}') - # build a filelist - do this first to keep meta files out of the list msg2 "$(gettext "Generating .FILELIST file...")" + # The following command does the following: + # - find all directories and add a trailing / + # - find all other files/links + # - grep out dot files in root dir (e.g. .FILELIST .PKGINFO...) + # - sort the list find -mindepth 1 \( -type d -printf '%P/\n' \) , \( ! -type d -printf '%P\n' \) \ - 2>/dev/null | sort >.FILELIST + 2>/dev/null | grep -v '^\.' | sort >.FILELIST # write the .PKGINFO file msg2 "$(gettext "Generating .PKGINFO file...")" @@ -790,7 +794,7 @@ create_package() { plain "$(gettext "Example for GPL'ed software: license=('GPL').")" fi - local comp_files + local comp_files=".PKGINFO .FILELIST" # check for an install script # TODO: should we include ${pkgname}.install if it exists and $install is unset? @@ -811,7 +815,6 @@ create_package() { msg2 "$(gettext "Compressing package...")" local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}" - comp_files="$comp_files .PKGINFO .FILELIST" if ! bsdtar -czf "$pkg_file" $comp_files $(ls); then error "$(gettext "Failed to create package file.")" -- cgit v1.2.3-24-g4f1b