summaryrefslogtreecommitdiff
path: root/nonsystemd-multilib/lib32-elogind/PKGBUILD
blob: 1b5d015c3bfd793c9f9f4952e45008481672069c (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
# Maintainer: David P. <megver83@parabola.nu>
# Maintainer (Artix): artoo <artoo@artixlinux.org>

_pkgname=elogind
pkgname=lib32-elogind
pkgver=246.10
pkgrel=1
pkgdesc="The systemd project's logind, extracted to a standalone package (32-bit)"
arch=('x86_64')
url="https://github.com/elogind/elogind"
license=('GPL' 'LGPL2.1')
provides=('lib32-systemd')
depends=('lib32-gcc-libs' 'lib32-acl' 'lib32-libcap' 'lib32-libgcrypt' 'lib32-libxcrypt'
         'lib32-eudev' 'elogind')
makedepends=('git' 'gperf' 'intltool' 'lib32-bzip2'
             'lib32-curl' 'lib32-dbus' 'lib32-gcc-libs' 'lib32-glib2'
             'lib32-gnutls' 'lib32-libelf' 'lib32-libidn2' 'lib32-pcre2'
             'libxslt' 'meson')
conflicts=('lib32-systemd')
options=('!libtool')
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/elogind/elogind/archive/v${pkgver}.tar.gz")
sha256sums=('c490dc158c8f5bca8d00ecfcc7ad5af24d1c7b9e59990a0b3b1323996221a922')

prepare() {
    cd ${_pkgname}-${pkgver}
}

build() {
    export CC="gcc -m32"
    export CXX="g++ -m32"
    export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

    local meson_options=(
        --libexecdir /usr/lib32
        --libdir /usr/lib32
        -Daudit=false
        -Ddbuspolicydir=/usr/share/dbus-1/system.d
        -Ddocdir=/usr/share/doc/elogind
        -Ddefault-hierarchy=hybrid
        -Dlibcryptsetup=false
        -Ddefault-kill-user-processes=false
    )

    arch-meson "${_pkgname}-${pkgver}" build "${meson_options[@]}"

    ninja -C build
}

check(){
    meson test -C build --print-errorlogs
}

package() {
    DESTDIR="$pkgdir" ninja -C build install

    ln -sfv libelogind.pc "${pkgdir}"/usr/lib32/pkgconfig/libsystemd.pc

    rm -rf "${pkgdir}"/{etc,var}
    rm -rf "${pkgdir}"/usr/{bin,include,lib,share}
}