[pacman-dev] PKGBUILD.proto - Take3
Hi, Edit: Take3, suggested changes - thanks everyone! Dan suggested I send this to the pacman-dev list. After completing some research and asking alot of questions I present some minor changes to PKGBUILD.proto supplied as a .diff to be merged after your approval. I believe it helps the intended audience create a better PKGBUILD in less time according to the latest Arch Packaging Standards. Cheers Jud Inline: --- PKGBUILD.proto 2008-12-05 23:32:33.000005000 +1000 +++ PKGBUILD.proto.new 2008-12-08 17:17:15.536302100 +1000 @@ -4,12 +4,13 @@ # then please put 'unknown'. # Contributor: Your Name <youremail@domain.com> + pkgname=NAME -pkgver=VERSION +pkgver=VERSION # Note: Cannot contain hyphens pkgrel=1 pkgdesc="" +url="http://ADDRESS/" arch=() -url="" license=('GPL') groups=() depends=() @@ -20,17 +21,14 @@ replaces=() backup=() options=() -install= -source=($pkgname-$pkgver.tar.gz) +install=$pkgname.install +source=(http://ADDRESS/TO/FILE/$pkgname-$pkgver.tar.gz) noextract=() -md5sums=() #generate with 'makepkg -g' +md5sums=() # Generate with 'makepkg -g' build() { cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr make || return 1 - make DESTDIR="$pkgdir/" install + make DESTDIR="$pkgdir/" install || return 1 } - -# vim:set ts=2 sw=2 et:
2008/12/8 Jud <jud@judfilm.net>:
Hi,
Edit: Take3, suggested changes - thanks everyone!
Dan suggested I send this to the pacman-dev list.
After completing some research and asking alot of questions I present some minor changes to PKGBUILD.proto supplied as a .diff to be merged after your approval. I believe it helps the intended audience create a better PKGBUILD in less time according to the latest Arch Packaging Standards.
Cheers Jud
Inline: --- PKGBUILD.proto 2008-12-05 23:32:33.000005000 +1000 +++ PKGBUILD.proto.new 2008-12-08 17:17:15.536302100 +1000 @@ -4,12 +4,13 @@ # then please put 'unknown'.
# Contributor: Your Name <youremail@domain.com> + pkgname=NAME -pkgver=VERSION +pkgver=VERSION # Note: Cannot contain hyphens
I like the previously suggested idea of avoiding comments in the prototype. Instead, this belongs to the doc for sure, and if it is already there, it should be as clear as possible and difficult to miss.
pkgrel=1 pkgdesc="" +url="http://ADDRESS/" arch=() -url="" license=('GPL') groups=() depends=() @@ -20,17 +21,14 @@ replaces=() backup=() options=() -install= -source=($pkgname-$pkgver.tar.gz) +install=$pkgname.install +source=(http://ADDRESS/TO/FILE/$pkgname-$pkgver.tar.gz) noextract=() -md5sums=() #generate with 'makepkg -g' +md5sums=() # Generate with 'makepkg -g'
build() { cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr make || return 1 - make DESTDIR="$pkgdir/" install + make DESTDIR="$pkgdir/" install || return 1 } - -# vim:set ts=2 sw=2 et:
The rest looks fine to me now that all other comments have been addressed :)
2008/12/8 Jud <jud@judfilm.net>:
pkgrel=1 pkgdesc="" +url="http://ADDRESS/"
What's the point of 'ADDRESS' if you're going to remove/replace that 100% of the time? 'url' should be indicative enough of what should appear in that field. That's the beauty of PKGBUILDs. They almost need no documentation.
On Tue, 16 Dec 2008, Loui Chang wrote:
2008/12/8 Jud <jud@judfilm.net>:
pkgrel=1 pkgdesc="" +url="http://ADDRESS/"
What's the point of 'ADDRESS' if you're going to remove/replace that 100% of the time? 'url' should be indicative enough of what should appear in that field. That's the beauty of PKGBUILDs. They almost need no documentation.
Agree. Keep the url field empty like it is currently so we can just paste the url address in . -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
participants (4)
-
Eric Bélanger
-
Jud
-
Loui Chang
-
Xavier