Jud wrote:
Hi,

Edit: Take2, changed the install line

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-07 13:49:43.889569135 +1000
@@ -3,13 +3,15 @@
 # NOTE: Please fill out the license field for your package! If it is
unknown, # then please put 'unknown'.
+
 # Contributor: Your Name <[EMAIL PROTECTED]>
+
 pkgname=NAME
-pkgver=VERSION
+pkgver=VERSION # Note: if pkgver is '0.99-10' then use an underscore,
i.e. '0.99_10' pkgrel=1

Can we make this shorter. I.e "# Note: Cannot contain hyphens." This really should get documented in the man page.

 pkgdesc=""
-arch=()
-url=""
+url="http://ADDRESS/";
+arch=('i686' 'x86_64')

Re-ordering why? Also, adding Arch's standard arch values is distro specific. We try and avoid that in the pacman code.

 license=('GPL')
 groups=()
 depends=()
@@ -20,17 +22,13 @@
 replaces=()
 backup=()
 options=()
-install=
-source=($pkgname-$pkgver.tar.gz)
-noextract=()
-md5sums=() #generate with 'makepkg -g'
+install=${pkgname}.install
+source=(http://ADDRESS/TO/FILE/${pkgname}-${pkgver}.tar.gz)
+md5sums=() # Generate with 'makepkg -g'

Why remove noextract?  The prototype should have every field.

build() {
-  cd "$srcdir/$pkgname-$pkgver"
-
-  ./configure --prefix=/usr
+  cd ${srcdir}${pkgname}-${pkgver}

Still missing a / in the middle of this line and the quotes are needed for people who build in directories with spaces.

+  ./configure --prefix=usr
   make || return 1
-  make DESTDIR="$pkgdir/" install
+  make DESTDIR=${pkgdir} install || return 1

The trailing slash was added here deliberately as some makefiles suck. Also, quotes are needed.

 }
-
-# vim:set ts=2 sw=2 et:

Allan



_______________________________________________
pacman-dev mailing list
[email protected]
http://archlinux.org/mailman/listinfo/pacman-dev

Reply via email to