[pacman-dev] CVS update of pacman-lib/scripts (makepkg)
Date: Monday, January 22, 2007 @ 04:57:21 Author: aaron Path: /home/cvs-pacman/pacman-lib/scripts Modified: makepkg (1.30 -> 1.31) 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) ---------+ makepkg | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) Index: pacman-lib/scripts/makepkg diff -u pacman-lib/scripts/makepkg:1.30 pacman-lib/scripts/makepkg:1.31 --- pacman-lib/scripts/makepkg:1.30 Mon Jan 22 03:45:12 2007 +++ pacman-lib/scripts/makepkg Mon Jan 22 04:57:20 2007 @@ -892,27 +892,36 @@ # check for an install script if [ "$install" != "" ]; then 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 # build a filelist msg "Generating .FILELIST file..." -cd $startdir/pkg +cd "$startdir/pkg" tar cvf /dev/null * | sort >.FILELIST # tar it up msg "Compressing package..." -cd $startdir/pkg +cd "$startdir/pkg" pkg_file="$PKGDEST/$pkgname-$pkgver-$pkgrel-${CARCH}.${PKGEXT}" comp_files=".PKGINFO .FILELIST ${install:+.INSTALL}" +[ $have_changelog -eq 1 ] && comp_files=".CHANGELOG $comp_files" if ! tar czf $pkg_file $comp_files *; then error "Failed to create package file." exit 1 fi -cd $startdir +cd "$startdir" if [ "$CLEANUP" = "1" ]; then msg "Cleaning up..." rm -rf src pkg
2007/1/22, Aaron Griffin <aaron@archlinux.org>:
Date: Monday, January 22, 2007 @ 04:57:21 Author: aaron Path: /home/cvs-pacman/pacman-lib/scripts
Modified: makepkg (1.30 -> 1.31)
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)
+# 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
I think "Copying package Changelog" should be changed to "Copying package changelog". Also, there's some inconsistency in file names: PKGBUILD something.install Changelog Is there some reason why "Changelog" and not "CHANGELOG" or "changelog"? -- Roman Kyrylych (Роман Кирилич)
On 1/22/07, Roman Kyrylych <roman.kyrylych@gmail.com> wrote:
I think "Copying package Changelog" should be changed to "Copying package changelog".
Also, there's some inconsistency in file names: PKGBUILD something.install Changelog
Actually, it should be ChangeLog - I missed the second capital. The rationale being that a ChangeLog is a fairly standardized format / file. It's like 'INSTALL' or 'configure' as far as naming goes. Side note though - there's nothing stopping you from making MY_INSTALL_FILE, as it's a PKGBUILD param.
2007/1/22, Aaron Griffin <aaronmgriffin@gmail.com>:
On 1/22/07, Roman Kyrylych <roman.kyrylych@gmail.com> wrote:
I think "Copying package Changelog" should be changed to "Copying package changelog".
Also, there's some inconsistency in file names: PKGBUILD something.install Changelog
Actually, it should be ChangeLog - I missed the second capital. The rationale being that a ChangeLog is a fairly standardized format / file. It's like 'INSTALL' or 'configure' as far as naming goes.
OK. No problems then. :-)
Side note though - there's nothing stopping you from making MY_INSTALL_FILE, as it's a PKGBUILD param.
I know, just every other file is something.install. Anyway this is just cosmetics. :-) -- Roman Kyrylych (Роман Кирилич)
But then:
+# 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
Still, shouldn't "Copying package ChangeLog" be "Copying package changelog"? IMHO, changelog in this case isn't related to filename but to ...changelog (like msg "Copying install script..."). ;-) -- Roman Kyrylych (Роман Кирилич)
On 1/22/07, Roman Kyrylych <roman.kyrylych@gmail.com> wrote:
But then:
+# 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
Still, shouldn't "Copying package ChangeLog" be "Copying package changelog"? IMHO, changelog in this case isn't related to filename but to ...changelog (like msg "Copying install script..."). ;-)
I like this, makes more sense.
participants (4)
-
Aaron Griffin
-
Aaron Griffin
-
Dan McGee
-
Roman Kyrylych