[pacman-dev] FS7228: Update {PKGBUILD,install}.proto
Attached is a patch to update {PKGBUILD,install}.proto - Add group and options field - Quote $startdir - Add vim modeline - Add check to see if function exists in install.proto before trying to call it, avoids the annoying bash error if the function is missing. Andrew --- PKGBUILD.proto.orig 2007-03-02 20:42:07.000000000 +0000 +++ PKGBUILD.proto 2007-06-05 14:11:56.000000000 +0100 @@ -11,6 +11,7 @@ arch=() url="" license=('GPL') +groups=() depends=() makedepends=() provides=() @@ -18,13 +19,17 @@ replaces=() backup=() install= +options=() source=($pkgname-$pkgver.tar.gz) noextract=() -md5sums=(generate with makepkg -g) +md5sums=() # generate with 'makepkg -g' build() { - cd $startdir/src/$pkgname-$pkgver + cd "$startdir"/src/$pkgname-$pkgver + ./configure --prefix=/usr make || return 1 - make DESTDIR=$startdir/pkg install + make DESTDIR="$startdir"/pkg install } + +# vim:set ts=2 sw=2 et: --- install.proto.orig 2004-11-03 01:14:37.000000000 +0000 +++ install.proto 2007-06-05 14:11:47.000000000 +0100 @@ -35,4 +35,6 @@ op=$1 shift -$op $* +[ "$(type -t "$op")" = "function" ] && "$op" "$@" + +# vim:set ts=2 sw=2 et:
On 7/6/07, Andrew Fyfe <andrew@neptune-one.net> wrote:
Grrr... I have this done locally. I'll push sometime. Is this everything? -Dan Index: PKGBUILD.proto =================================================================== RCS file: /home/cvs-arch/arch/build/PKGBUILD.proto,v retrieving revision 1.15 diff -u -r1.15 PKGBUILD.proto --- PKGBUILD.proto 2 Mar 2007 20:42:07 -0000 1.15 +++ PKGBUILD.proto 6 Jul 2007 15:45:32 -0000 @@ -11,20 +11,23 @@ arch=() url="" license=('GPL') +groups=() depends=() makedepends=() provides=() conflicts=() replaces=() backup=() +options=() install= source=($pkgname-$pkgver.tar.gz) noextract=() -md5sums=(generate with makepkg -g) +md5sums=() #generate with 'makepkg -g' build() { - cd $startdir/src/$pkgname-$pkgver + cd "$startdir/src/$pkgname-$pkgver" + ./configure --prefix=/usr make || return 1 - make DESTDIR=$startdir/pkg install + make DESTDIR="$startdir/pkg" install } Index: install.proto =================================================================== RCS file: /home/cvs-arch/arch/build/install.proto,v retrieving revision 1.5 diff -u -r1.5 install.proto --- install.proto 3 Nov 2004 01:14:37 -0000 1.5 +++ install.proto 6 Jul 2007 15:45:32 -0000 @@ -35,4 +35,4 @@ op=$1 shift -$op $* +["$(type -t "$op")" = "function" ] && $op "$@"
Hello, Na Fri, Jul 06, 2007 at 04:48:13PM +0100, Andrew Fyfe <andrew@neptune-one.net> pisal(a):
vim modelines would be nice :)
isn't it easier to edit ~/.vimrc than spamming all the buildscripts with a modeline parsed by only one editor ps: i'm a vim user, too but then why don't add emacs modelines, too? this is crazy - VMiklos
On Tue 2007-07-10 00:07 , VMiklos wrote:
I agree, just add: autocmd BufReadPost *PKGBUILD* set filetype=sh autocmd BufReadPost *.install set filetype=sh (or something similar) to ~/.vimrc -- Alessio 'mOLOk' Bolognino Arch Linux Trusted User Please send personal email to themolok@gmail.com Public Key http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFE0270FB GPG Key ID = 1024D / FE0270FB 2007-04-11 Key Fingerprint = 9AF8 9011 F271 450D 59CF 2D7D 96C9 8F2A FE02 70FB
On Tue, 10 Jul 2007, Alessio 'mOLOk' Bolognino wrote:
Shouldn't be necessary anymore for several versions of vim now. It is taken care of by the filetype.patch and the latest version takes care by a sed command. So actually people have problems with it? -Tobbi
On 7/9/07, Tobias Kieslich <tobias@justdreams.de> wrote:
First off, this is the mode line that was put in: # vim:set ts=2 sw=2 et: Nowhere in there does it do set syntax=sh or anything like that. It only sets tabs to 2 spaces expanded. I personally use the PKGBUILD highlighting that is in the contrib/ directory in the pacman repo**, so I wouldn't want to force a certain syntax on anyone, but using two spaces in PKGBUILD files seems pretty standard across Arch PKGBUILDs. It's not like this change affects existing PKGBUILDs anyway- only those that bother to start with the proto files, and even then they are easily editable. ** http://projects.archlinux.org/git/?p=pacman.git;a=blob_plain;f=contrib/PKGBU... -Dan
On Mon 2007-07-09 20:43 , Dan McGee wrote:
My bad, I thought there was a ft=sh , you can ignore my mail :) -- Alessio 'mOLOk' Bolognino Arch Linux Trusted User Please send personal email to themolok@gmail.com Public Key http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFE0270FB GPG Key ID = 1024D / FE0270FB 2007-04-11 Key Fingerprint = 9AF8 9011 F271 450D 59CF 2D7D 96C9 8F2A FE02 70FB
On Tue, Jul 10, 2007 at 11:42:29AM +0200, Alessio 'mOLOk' Bolognino wrote:
It isn't possible to set these other settings in a similar way ? ie setting "ts=2 sw=2 et" for all files named PKGBUILD from .vimrc ?
2007/7/6, Dan McGee <dpmcgee@gmail.com>:
AFAIK options=() is usually the last variable in a list, or is that just me? Also, we can start using newly introduced $srcdir and $pkgdir in PKGBUILD.proto (otherwise - what's the point introducing them if most people won't know about them?). Just my 2 cents. -- Roman Kyrylych (Роман Кирилич)
On 7/11/07, Roman Kyrylych <roman.kyrylych@gmail.com> wrote:
People seem to be getting way anal about order- does it really matter? One of the changes to the proto file was just to change the order of something...if you want, make the change. I'm not going to futz with it. We can't use $srtdir and $pkgdir yet- those are in GIT only, not released yet. With time, Roman. :) -Dan
2007/7/11, Dan McGee <dpmcgee@gmail.com>:
I just like cosmethics :P
We can't use $srtdir and $pkgdir yet- those are in GIT only, not released yet. With time, Roman. :)
Sure. I meant changes to PKGBUILD.proto in git, not in CVS, of course. P.S.: I've finally finished reading all pacman-dev emails since my absence. :-) -- Roman Kyrylych (Роман Кирилич)
On 7/11/07, Roman Kyrylych <roman.kyrylych@gmail.com> wrote:
Do we have these in GIT? They could probably go in the contrib directory for good measure. /me checks
On 7/11/07, Dan McGee <dpmcgee@gmail.com> wrote:
Agreed. And also, I do think having the vim modeline in there is worthwhile, but also agree with Vajna that we should have an emacs line as well, for good measure.
On Fri, Jul 13, 2007 at 11:43:48AM -0500, Aaron Griffin wrote:
I don't really think that's what he meant but well ;) Personally, I don't care at all. And as Dan pointed out, it isn't a big deal, it's just the .proto files.
participants (9)
-
Aaron Griffin
-
Alessio 'mOLOk' Bolognino
-
Andrew Fyfe
-
Dan McGee
-
Roman Kyrylych
-
Sebastian Nowicki
-
Tobias Kieslich
-
VMiklos
-
Xavier