summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b7eb3966fa95141d5c2cbf64af210b570919c5dc (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
# Maintainer: Michael Yang <ohmyarchlinux@gmail.com>

pkgname=libxlsxwriter-git
pkgver=0.7.5.r528.18c8cb6
pkgrel=1
pkgdesc='A C library for creating Excel XLSX files'
arch=('i686' 'x86_64')
url='https://libxlsxwriter.github.io'
license=('BSD')
depends=('minizip')
makedepends=('git' 'cmake>=2.8.7')
conflicts=('libxlsxwriter')
provides=('libxlsxwriter')
source=('git://github.com/jmcnamara/libxlsxwriter.git')
sha512sums=('SKIP')

pkgver() {
  cd libxlsxwriter
  echo "$(grep LXW_VERSION include/xlsxwriter.h | cut -d '"' -f2).r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../libxlsxwriter \
    -DUSE_SYSTEM_MINIZIP=ON \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  make -C build DESTDIR=${pkgdir} install
  install -Dm644 libxlsxwriter/License.txt ${pkgdir}/usr/share/licenses/libxlsxwriter-git/License.txt
}