diff options
author | Noner Kao | 2016-04-06 21:40:35 +0800 |
---|---|---|
committer | Noner Kao | 2016-04-06 21:40:35 +0800 |
commit | 78e0f2db541563e0e3264600184fd607452cffd6 (patch) | |
tree | 43d65c3d1b46babafddb87ce3de386ecf1c4af41 /PKGBUILD | |
parent | f52a0c133df48a1ceb06b8c5a72fe88b1858005f (diff) | |
download | aur-78e0f2db541563e0e3264600184fd607452cffd6.tar.gz |
support check() using the testing programs
* fails_and_fix.patch
This patch contains problems that not resolved yet,
and the tests/test_common.sh fix,
which enables our xpath to work.
* xpath.patch
Some scripts explicitly use xpath command rather than wrappers,
so I fix them in this patch.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 33 |
1 files changed, 27 insertions, 6 deletions
@@ -13,23 +13,44 @@ license=('GPL') # The official site suggested the dependencies in terms of Fedora's rpm. # Some of the corresponding packages in Arch remain unclear, which are listed # here for now. -# packege missing: libselinux-devel, perl-XML-XPath +# packege missing: libselinux-devel depends=('swig' 'python' 'acl' 'libcap' 'curl' 'libgcrypt' 'libxml2' 'libxslt' - 'libldap' 'pcre' 'perl-xml-parser' 'perl' 'bzip2' 'procps-ng' 'gconf') + 'libldap' 'pcre' 'bzip2' 'procps-ng' 'gconf' 'perl' 'perl-xml-parser' 'perl-xml-xpath') optdepends=() -source=("https://github.com/OpenSCAP/openscap/releases/download/$pkgver/$pkgname-$pkgver.tar.gz") -md5sums=('d26a148d834635363ac8cdd707828302') +source=("https://github.com/OpenSCAP/openscap/releases/download/$pkgver/$pkgname-$pkgver.tar.gz" + "fails_and_fix.patch" + "xpath.patch") +md5sums=('d26a148d834635363ac8cdd707828302' + '4120f2763e518a590fb896759bf644ca' + '6ac9434d7d169450982f6b4065f3d8e3') + +prepare() { + cd "$pkgname-$pkgver" + + # This is for Red Hat/Fedora family, we don't need it. + sed -e "s/^.*default_cpe.*$/\\\/" -i $srcdir/$pkgname-$pkgver/tests/API/XCCDF/Makefile.am + patch -f -p1 -i "$srcdir/fails_and_fix.patch" + patch -f -p2 -i "$srcdir/xpath.patch" +} build() { cd "$pkgname-$pkgver" - CPPFLAGS="-I/usr/include/python3.5m" ./configure --enable-probes-linux --disable-python --enable-python3 --prefix=/usr - make -j4 + CPPFLAGS="-I/usr/include/python3.5m" ./configure --disable-valgrind --disable-python --enable-python3 --prefix=/usr + make # -j4 +} + +check() { + # Notice: It may take a long time to complete the check. + cd "$pkgname-$pkgver" + make check } package() { cd "$pkgname-$pkgver" make DESTDIR="$pkgdir/" install + + # That's what the guideline says. mv $pkgdir/usr/libexec/* $pkgdir/usr/lib/$pkgname/ rm -fr $pkgdir/usr/libexec/ } |