mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
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:
parent
7daa6708d2
commit
78bac81a58
@ -737,10 +737,14 @@ create_package() {
|
|||||||
fi
|
fi
|
||||||
local size=$(du -sb | awk '{print $1}')
|
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...")"
|
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' \) \
|
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
|
# write the .PKGINFO file
|
||||||
msg2 "$(gettext "Generating .PKGINFO file...")"
|
msg2 "$(gettext "Generating .PKGINFO file...")"
|
||||||
@ -790,7 +794,7 @@ create_package() {
|
|||||||
plain "$(gettext "Example for GPL'ed software: license=('GPL').")"
|
plain "$(gettext "Example for GPL'ed software: license=('GPL').")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local comp_files
|
local comp_files=".PKGINFO .FILELIST"
|
||||||
|
|
||||||
# check for an install script
|
# check for an install script
|
||||||
# TODO: should we include ${pkgname}.install if it exists and $install is unset?
|
# TODO: should we include ${pkgname}.install if it exists and $install is unset?
|
||||||
@ -811,7 +815,6 @@ create_package() {
|
|||||||
msg2 "$(gettext "Compressing package...")"
|
msg2 "$(gettext "Compressing package...")"
|
||||||
|
|
||||||
local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}"
|
local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}"
|
||||||
comp_files="$comp_files .PKGINFO .FILELIST"
|
|
||||||
|
|
||||||
if ! bsdtar -czf "$pkg_file" $comp_files $(ls); then
|
if ! bsdtar -czf "$pkg_file" $comp_files $(ls); then
|
||||||
error "$(gettext "Failed to create package file.")"
|
error "$(gettext "Failed to create package file.")"
|
||||||
|
Loading…
Reference in New Issue
Block a user