summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d4b7caefaacbe0179cdd0f242959877e846d3ce1 (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
43
44
45
46
# Maintainer: Patrick McCarty <pnorcks at gmail dot com>

pkgname=createrepo_c
pkgver=0.10.0
pkgrel=2
pkgdesc="A C implementation of createrepo, a tool to create yum repositories"
arch=('i686' 'x86_64')
license=('GPL')
url='https://fedorahosted.org/createrepo_c/'
depends=('rpm-org' 'libxml2' 'curl' 'glib2' 'python2')
makedepends=('cmake' 'doxygen' 'python2-nose' 'python2-sphinx' 'sqlite' 'zlib')
source=("https://github.com/rpm-software-management/${pkgname}/archive/${pkgver}.tar.gz")
sha256sums=('510d1006294c2cfc7e6e01a5ffa243ac8b8e8cdb045efadfebb5c03f0251adaa')

prepare() {
  cd ${pkgname}-${pkgver}
  msg2 "Fixing doc build: requires sphinx-build2 from python2-sphinx"
  sed -i 's|\(sphinx-build\)|\12|' doc/python/CMakeLists.txt
  msg2 "Fixing lib install: /usr/lib64 directory is not used in Arch"
  sed -i 's|\${LIB_SUFFIX}||' src/CMakeLists.txt
}

build() {
  cd ${pkgname}-${pkgver}

  cmake \
    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
    -DLIB_INSTALL_DIR:PATH=/usr/lib \
    .

  make
  make doc
}

check() {
  cd ${pkgname}-${pkgver}
  make tests
  make test
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
}

# vi:set ts=2 sw=2 et: