On 12/20/06, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On 12/20/06, Jürgen Hötzel <juergen@hoetzel.info> wrote:
This is getting complicated. I dislike hard-coded path-names. This makes scripts inflexible and unreadable. Personally i would prefer moving this to makepkg.conf, like:
REMOVE_DIRS=(pkg/usr/{share/,}{info,doc} pkg/opt/gnome/{foo/,}info)
I like this idea as well, though, it might be "better" to rename the variable to "DOC_DIRS" or something, seeing as this removal goes along with the documentation removal.
Incorporated other suggestions and named the variable DOC_DIRS. Since I had to change the conf file, I also moved the modeline to the bottom (take it or leave it), and added a blank line between the options that are actually set in the options array, and those that aren't. I think I covered most of the bases in the path, feel free to correct it if I didn't. ______________ diff -aur /home/dmcgee/projects/pacman-lib.orig/etc/makepkg.conf.in pacman-lib/etc/makepkg.conf.in --- /home/dmcgee/projects/pacman-lib.orig/etc/makepkg.conf.in 2006-12-14 08:11:52.000000000 -0500 +++ pacman-lib/etc/makepkg.conf.in 2006-12-20 11:31:02.000000000 -0500 @@ -1,4 +1,4 @@ -# vim: set ft=sh ts=2 sw=2 et: +# # /etc/makepkg.conf # @@ -55,9 +55,11 @@ NOLIBTOOL=0 #-- Don't remove empty directories from package? NOEMPTYDIRS=0 + #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 INTEGRITY_CHECK=(md5) - +#-- Info and doc directories to be removed +DOC_DIRS=(pkg/usr/{,share/}{info,doc} pkg/opt/gnome/{,share/}{info,doc,gtk-doc}) ######################################################################### # PACKAGE OUTPUT @@ -69,3 +71,5 @@ #SRCDEST=/home/source #-- Packager: name/email of the person or organization building packages #PACKAGER="John Doe <john@doe.com>" + +# vim: set ft=sh ts=2 sw=2 et: diff -aur /home/dmcgee/projects/pacman-lib.orig/scripts/makepkg pacman-lib/scripts/makepkg --- /home/dmcgee/projects/pacman-lib.orig/scripts/makepkg 2006-12-19 11:40:51.000000000 -0500 +++ pacman-lib/scripts/makepkg 2006-12-20 11:30:54.000000000 -0500 @@ -774,13 +774,11 @@ fi fi -if [ ! "`check_option KEEPDOCS`" -a "$KEEPDOCS" = "0" ]; then +if [ ! "$(check_option KEEPDOCS)" -a "$KEEPDOCS" = "0" ]; then # remove info/doc files msg "Removing info/doc files..." cd $startdir - rm -rf pkg/usr/info pkg/usr/share/info - rm -rf pkg/usr/doc pkg/usr/share/doc - rm -rf pkg/{usr,opt/gnome}/share/gtk-doc + rm -rf ${DOC_DIRS[@]} fi # move /usr/share/man files to /usr/man