Hi everyone,
I've just started writing some PKGBUILDs for some programs that are not
present neither in the official package repository nor in the AUR.
Specifically, I've packaged libdime [1] as a required dependency for the
X-Plane developer tools [2].

I'm attaching the PKGBUILD below - if someone on this list could review
it, that would be much appreciated. I've also got the following questions:
1) Is it correct to name the package "libdime-hg" only because its
   sources are checked out from a Mercurial repository (that's because
   no official tarballs exist any more - the Debian copyright file for
   the library [3] points to a now dismissed FTP site [4]), or should I
   just name it "libdime"?
2) On the same note, assuming that naming the package "libdime-hg" is
   correct, does it make sense to put
       provides=("${pkgname%-hg}")
       conflicts=("${pkgname%-hg}")
   in the PKGBUILD? I've thought to put these two lines as "safeguards"
   in case I need to distinguish between a libdime VCS and non-VCS package
   in the future.

Cheers and thanks in advance,
Alessandro Menti

[1] https://bitbucket.org/Coin3D/dime
[2] http://developer.x-plane.com/tools/
[3] 
http://metadata.ftp-master.debian.org/changelogs/main/d/dime/dime_0.20111205-2_copyright
[4] ftp://ftp.sim.no/pub/snapshots/

----- The PKGBUILD follows: --------------------------------------------
# Maintainer: Alessandro Menti <alessandro dot menti at hotmail dot it>
pkgname=libdime-hg
pkgver=r187.7cd55bc6a6d0
pkgrel=1
pkgdesc="A DXF (Data eXchange Format) file format support library"
arch=('i686' 'x86_64')
url="https://bitbucket.org/Coin3D/dime";
license=('BSD')
depends=('gcc-libs')
makedepends=('doxygen' 'mercurial')
provides=("${pkgname%-hg}")
conflicts=("${pkgname%-hg}")
source=("${pkgname%-hg}::hg+https://bitbucket.org/Coin3D/dime";)
sha256sums=('SKIP')

pkgver() {
        cd "$srcdir/${pkgname%-hg}"
        printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}

build() {
        cd "$srcdir/${pkgname%-hg}"
        ./configure --prefix=/usr --enable-html
        make
}

package() {
        cd "$srcdir/${pkgname%-hg}"
        make DESTDIR="$pkgdir/" install
        install -D -m644 COPYING 
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

Reply via email to