summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-06-28 10:48:32 +0100
committerAndrew Fyfe <andrew@neptune-one.net>2007-06-28 13:45:12 +0100
commit78bac81a58355a6d42760e1974005dbcdd8e8dcf (patch)
tree5e9a076b2a6a8eed524e1291bc447a6fc966437f
parent7daa6708d2afc710bebbb2dc30f4371f9d67120c (diff)
downloadpacman-78bac81a58355a6d42760e1974005dbcdd8e8dcf.tar.xz
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>
-rw-r--r--scripts/makepkg.in11
1 files 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.")"