Changelog support for makepkg - this has been in pacman itself for some time,
but I don't know why I never crammed the changes for makepkg in. * Adds a "Changelog" file next to a PKGBUILD as part of the package (viewed with pacman -Qc)
This commit is contained in:
parent
c19839695b
commit
0635e03869
1 changed files with 13 additions and 4 deletions
|
@ -892,27 +892,36 @@ done
|
||||||
# check for an install script
|
# check for an install script
|
||||||
if [ "$install" != "" ]; then
|
if [ "$install" != "" ]; then
|
||||||
msg "Copying install script..."
|
msg "Copying install script..."
|
||||||
cp $startdir/$install $startdir/pkg/.INSTALL
|
cp "$startdir/$install" "$startdir/pkg/.INSTALL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# do we have a changelog?
|
||||||
|
have_changelog=0
|
||||||
|
if [ -f "$startdir/Changelog" ]; then
|
||||||
|
msg "Copying package Changelog"
|
||||||
|
cp "$startdir/Changelog" "$startdir/pkg/.CHANGELOG"
|
||||||
|
have_changelog=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build a filelist
|
# build a filelist
|
||||||
msg "Generating .FILELIST file..."
|
msg "Generating .FILELIST file..."
|
||||||
cd $startdir/pkg
|
cd "$startdir/pkg"
|
||||||
tar cvf /dev/null * | sort >.FILELIST
|
tar cvf /dev/null * | sort >.FILELIST
|
||||||
|
|
||||||
# tar it up
|
# tar it up
|
||||||
msg "Compressing package..."
|
msg "Compressing package..."
|
||||||
cd $startdir/pkg
|
cd "$startdir/pkg"
|
||||||
|
|
||||||
pkg_file="$PKGDEST/$pkgname-$pkgver-$pkgrel-${CARCH}.${PKGEXT}"
|
pkg_file="$PKGDEST/$pkgname-$pkgver-$pkgrel-${CARCH}.${PKGEXT}"
|
||||||
comp_files=".PKGINFO .FILELIST ${install:+.INSTALL}"
|
comp_files=".PKGINFO .FILELIST ${install:+.INSTALL}"
|
||||||
|
[ $have_changelog -eq 1 ] && comp_files=".CHANGELOG $comp_files"
|
||||||
|
|
||||||
if ! tar czf $pkg_file $comp_files *; then
|
if ! tar czf $pkg_file $comp_files *; then
|
||||||
error "Failed to create package file."
|
error "Failed to create package file."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $startdir
|
cd "$startdir"
|
||||||
if [ "$CLEANUP" = "1" ]; then
|
if [ "$CLEANUP" = "1" ]; then
|
||||||
msg "Cleaning up..."
|
msg "Cleaning up..."
|
||||||
rm -rf src pkg
|
rm -rf src pkg
|
||||||
|
|
Loading…
Add table
Reference in a new issue