summaryrefslogtreecommitdiff
path: root/community/luarocks/PKGBUILD
blob: 2b29ab5c8324c81fddbb2cf4c59855699f4c31bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# $Id: PKGBUILD 56921 2011-10-16 23:25:18Z cbrannon $
# Maintainer: Chris Brannon <cmbrannon79@gmail.com>
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>

pkgname=luarocks
pkgver=2.0.6
pkgrel=1
pkgdesc='Deployment and management system for Lua modules'
arch=('i686' 'x86_64')
url="http://luarocks.org/"
depends=('lua' 'unzip' 'zip' 'curl')
optdepends=('cvs: for fetching sources from CVS repositories'
            'git: for fetching sources from git repositories'
            'mercurial: for fetching sources from mercurial repositories'
            'luasec: HTTPS support'
            'cmake: for building rocks that use the cmake build system')
license=('custom')
source=(http://luarocks.org/releases/$pkgname-$pkgver.tar.gz
        packbinary.patch)

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ## The --pack-binary option to the "build" command is broken in the release,
  # but it was fixed in upstream's git repo.  The following patch goes
  # away with the next release:
  patch -p1 < "$srcdir/packbinary.patch"

  # I added --with-downloader=curl, because luarocks already uses curl
  # for uploading.  May as well use curl for downloading.
  ./configure --prefix=/usr --sysconfdir=/etc/luarocks --with-downloader=curl
  make 
}

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

md5sums=('ad3eed4d579552aa91ea49c2bdbc2bb1'
         'f364b5a092a54559408df7431bc14746')