summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b1b3f8e19a3b5691d65099f533753547a8c3434d (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
# Maintainer: Marco Kundt <mrckndt@gmail.com>

pkgname=cppcheck-nox
_pkgname=cppcheck
pkgver=1.71
pkgrel=1
pkgdesc="A tool for static C/C++ code analysis without the GUI"
arch=('i686' 'x86_64')
url="http://cppcheck.wiki.sourceforge.net/"
license=('GPL')
depends=('python-pygments')
makedepends=('docbook-xsl' 'python')
optdepends=('pcre: searching regex with cppcheck')
source=(https://github.com/danmar/cppcheck/archive/${pkgver}.tar.gz)
sha256sums=('49f8d44516a1534eb01e3cc8300d60c3577c5e4339336defaf213d08ff914f1b')

build() {
   cd "${_pkgname}-${pkgver}"
   # Unicode fix
   LANG='en_US.UTF-8' make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes
   make DB2MAN=/usr/share/xml/docbook/xsl-stylesheets-1.78.1/manpages/docbook.xsl CFGDIR=/usr/share/cppcheck/cfg man
}

check() {
   cd "${_pkgname}-${pkgver}"

#   LANG='en_US.UTF-8' make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes test
}

package() {
   cd "${_pkgname}-${pkgver}"
   LANG='en_US.UTF-8' make DESTDIR=${pkgdir} CFGDIR=/usr/share/cppcheck/cfg SRCDIR=build HAVE_RULES=yes install 

   install -D -p -m 644 cppcheck.1 "${pkgdir}"/usr/share/man/man1/cppcheck.1

   install -d "${pkgdir}"/usr/share/cppcheck/cfg
   install -D ./cfg/* -t "${pkgdir}"/usr/share/cppcheck/cfg
}