summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e0fa196e60ba2f5645ebf04d49ef18e4de97209d (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
62
63
64
# Maintainer: Maciej Szeptuch <neverous at neverous dot info>

_pkgbase=efibooteditor
pkgbase=${_pkgbase}-git
pkgname=(efibooteditor-git efibooteditor-qt5-git)
pkgver=r65.7653756
pkgrel=1
arch=(x86_64)
pkgdesc='GUI for editing EFI Boot Manager entries'
url='https://github.com/Neverous/efibooteditor'
license=(LGPL3)
depends=(efivar)
makedepends=(cmake qt6-tools qt6-5compat qt5-base qt5-tools git)
source=(${pkgbase}::git+https://github.com/Neverous/efibooteditor.git)
sha256sums=('SKIP')

pkgver() {
    cd ${pkgbase}
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd ${pkgbase}

    export BUILD_VERSION=0.0.0-aur.${pkgver}-${pkgrel}

    # Build Qt6 version
    cmake -B build-qt6 . \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DQT_VERSION_MAJOR=6

    cmake --build build-qt6 --config Release

    # Build Qt5 version
    cmake -B build-qt5 . \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DQT_VERSION_MAJOR=5

    cmake --build build-qt5 --config Release
}

package_efibooteditor-git() {
    pkgdesc='GUI for editing EFI Boot Manager entries'
    depends=(efivar qt6-base qt6-5compat)
    conflicts=(efibooteditor)
    provides=(efibooteditor)

    cd ${pkgbase}

    DESTDIR="${pkgdir}" cmake --install build-qt6
    install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${_pkgbase}/LICENSE
}

package_efibooteditor-qt5-git() {
    pkgdesc='GUI for editing EFI Boot Manager entries Qt5 version'
    depends=(efivar qt5-base)
    conflicts=(efibooteditor)
    provides=(efibooteditor)

    cd ${pkgbase}

    DESTDIR="${pkgdir}" cmake --install build-qt5
    install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${_pkgbase}/LICENSE
}