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 <andrew@neptune-one.net>
This commit is contained in:
Andrew Fyfe 2007-06-28 10:48:32 +01:00
parent 7daa6708d2
commit 78bac81a58
1 changed files with 7 additions and 4 deletions

View File

@ -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.")"