Skip to content
Snippets Groups Projects
PKGBUILD 2.01 KiB
Newer Older
jean-michel's avatar
jean-michel committed
# Copyright     : Obarun
#------------------------
Eric Vidal's avatar
Eric Vidal committed
# Maintainer    : Eric Vidal <eric@obarun.org>
# Maintainer    : Jean-Michel T.Dydak <jean-michel@obarun.org>
jean-michel's avatar
jean-michel committed
#----------------
# Pkgbuild Src  : https://git.obarun.org/pkg/obextra/upower
#--------------------------------------------------------------
# DESCRIPTION ]
Eric Vidal's avatar
Eric Vidal committed

nfg's avatar
nfg committed
# Temp add to fix pkg commit (05-13-23)

Eric Vidal's avatar
Eric Vidal committed
pkgname=upower
Eric Vidal's avatar
Eric Vidal committed
pkgver=1.90.0
nfg's avatar
nfg committed
pkgrel=5
jean-michel's avatar
jean-michel committed
pkgdesc="Abstraction for enumerating power devices, listening to device events and querying history and statistics"
url='http://upower.freedesktop.org'
nfg's avatar
nfg committed
	
Eric Vidal's avatar
Eric Vidal committed
track="commit"
Eric Vidal's avatar
Eric Vidal committed
target=d4259c009b3ca1169dfd19231a040c233fc3b58d  # tags/v1.90.0^0
jean-michel's avatar
jean-michel committed
source=(
    "git+https://gitlab.freedesktop.org/upower/upower.git#${track}=${target}"
    0001-build-Fix-default-udevrulesdir.patch
    0002-build-Fix-version-macros.patch
)
Eric Vidal's avatar
Eric Vidal committed

jean-michel's avatar
jean-michel committed
#----------------------
# BUILD CONFIGURATION ]
Eric Vidal's avatar
Eric Vidal committed

makedepends=(
jean-michel's avatar
jean-michel committed
    'docbook-xsl'
    'gobject-introspection'
    'python'
    'git'
    'gtk-doc'
    'meson'
)

checkdepends=(
    'python-dbus'
    'python-dbusmock'
    'python-gobject'
    'python-packaging'
jean-michel's avatar
jean-michel committed
)   #'umockdev'
jean-michel's avatar
jean-michel committed

#------------------------
# INSTALL CONFIGURATION ]

depends=(
    'libimobiledevice'
    'libgudev'
    'usbmuxd'
jean-michel's avatar
jean-michel committed
)
Eric Vidal's avatar
Eric Vidal committed

jean-michel's avatar
jean-michel committed
backup=(
    'etc/UPower/UPower.conf'
)

#--------------------
# BUILD PREPARATION ]
Eric Vidal's avatar
Eric Vidal committed

pkgver() {
jean-michel's avatar
jean-michel committed
    cd $pkgname
    git describe --tags | sed -e 's/^v\|^UPOWER_//;s/_/\./g;s/[^-]*-g/r&/;s/-/+/g'
Eric Vidal's avatar
Eric Vidal committed
}

Eric Vidal's avatar
Eric Vidal committed
prepare() {
jean-michel's avatar
jean-michel committed
    cd $pkgname

    # Fix use of libimobiledevice
    git cherry-pick -n 81a89385a45d3de1028bcd86b3688fb465b4035c

Eric Vidal's avatar
Eric Vidal committed
}

jean-michel's avatar
jean-michel committed
#--------
# BUILD ]
Eric Vidal's avatar
Eric Vidal committed

Eric Vidal's avatar
Eric Vidal committed
build() {
jean-michel's avatar
jean-michel committed
    arch-meson upower build -D systemdsystemunitdir=no
jean-michel's avatar
jean-michel committed
    meson compile -C build
Eric Vidal's avatar
Eric Vidal committed
}

jean-michel's avatar
jean-michel committed
#--------
# CHECK ]
Eric Vidal's avatar
Eric Vidal committed

jean-michel's avatar
jean-michel committed
#check() {
#    meson test -C build --print-errorlogs
#}
Eric Vidal's avatar
Eric Vidal committed

jean-michel's avatar
jean-michel committed
#----------
# PACKAGE ]
Eric Vidal's avatar
Eric Vidal committed

jean-michel's avatar
jean-michel committed
package() {
    depends+=(
        'libglib-2.0.so'
        'libgobject-2.0.so'
        'libgio-2.0.so'
    )
    provides+=(
        'libupower-glib.so'
    )

    meson install -C build --destdir "$pkgdir"
}
Eric Vidal's avatar
Eric Vidal committed

jean-michel's avatar
jean-michel committed
#--------------------
# ARCH LICENSE AUTH ]
Eric Vidal's avatar
Eric Vidal committed

jean-michel's avatar
jean-michel committed
arch=(x86_64)
license=(GPL)
Eric Vidal's avatar
Eric Vidal committed

jean-michel's avatar
jean-michel committed
sha512sums=('')