summaryrefslogtreecommitdiff
path: root/community/lxc/PKGBUILD
blob: 5ebc9f76042e12dc0c76fb27f9ca96043a0fc29e (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# $Id: PKGBUILD 106992 2014-03-11 10:19:42Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andrea Zucchelli <zukka77@gmail.com>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: Jonathan Liu <net147@gmail.com>
# Contributor: Jon Nordby <jononor@gmail.com>

pkgname=lxc
pkgver=1.0.1
epoch=1
pkgrel=1
pkgdesc="Linux Containers"
arch=('i686' 'x86_64')
url="http://linuxcontainers.org"
depends=('bash' 'perl' 'libseccomp' 'libcap' 'python')
makedepends=('docbook2x')
optdepends=('arch-install-scripts: for archlinux template')
license=('LGPL')
install=lxc.install
options=('emptydirs')
source=("http://linuxcontainers.org/downloads/$pkgname-${pkgver}.tar.gz"
	"lxc.tmpfiles.d"
	"lxc@.service")
md5sums=('3c7379891e45713817ec873a167070b0'
         'df94c9fb8a753011c86ee664e9f521ff'
         '32db4ef06b27f36e15ff4b67c049dfeb')

prepare() {
  cd "$srcdir/$pkgname-${pkgver/_/-}"
  sed -i \
    -e 's|"\\"-//Davenport//DTD DocBook V3.0//EN\\""|"\\"-//OASIS//DTD DocBook XML\\" \\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\\""|' \
    configure.ac
}

build() {
  cd "$srcdir/$pkgname-${pkgver/_/-}"
  ./autogen.sh
  ./configure \
    --prefix=/usr \
    --localstatedir=/var \
    --libexecdir=/usr/lib \
    --sysconfdir=/etc \
    --disable-apparmor \
    --enable-seccomp
  make
}

package() {
  cd "$srcdir/$pkgname-${pkgver/_/-}"

  make DESTDIR="$pkgdir" install
  install -d -m755 "$pkgdir/var/lib/lxc"
  install -d -m755 "$pkgdir/usr/lib/lxc/rootfs/dev"
  install -D -m644 ${srcdir}/lxc@.service ${pkgdir}/usr/lib/systemd/system/lxc@.service
  install -D -m644 ${srcdir}/lxc.tmpfiles.d ${pkgdir}/usr/lib/tmpfiles.d/lxc.conf

  cd doc
  find . -type f -name '*.1' -exec install -D -m644 "{}" "$pkgdir/usr/share/man/man1/{}" \;
  find . -type f -name '*.5' -exec install -D -m644 "{}" "$pkgdir/usr/share/man/man5/{}" \;
  find . -type f -name '*.7' -exec install -D -m644 "{}" "$pkgdir/usr/share/man/man7/{}" \;
}