summaryrefslogtreecommitdiff
path: root/packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r3.exheres-0
blob: 23df17658b8f1027eefd0a33ce01e5156402c2b7 (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
# Copyright 2018 Redcore Linux Project
# Distributed under the terms of the GNU General Public License v2

SUMMARY="Redcore Linux Project dracut config"
DESCRIPTION="Dracut configuration file for Redcore Linux Project"
HOMEPAGE="https://redcorelinux.org"

LICENCES="GPL-2"
SLOT="0"
PLATFORMS="~amd64"
MYOPTIONS=""

DEPENDENCIES="
    run:
        firmware/intel-microcode [[
            description = [ early microcode for Intel CPU's ]
        ]]
        firmware/linux-firmware [[
            description = [ early microcode for AMD CPU's ]
        ]]
"

WORK="${FILES}"

src_prepare() {
    :
}

src_configure() {
    :
}

src_compile() {
    :
}

src_install() {
    dodir /etc/dracut.conf.d
    insinto /etc/dracut.conf.d
    newins "${FILES}"/redcore-dracut.conf redcore-dracut.conf.example
}

pkg_preinst() {
    if [[ -f ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf" ]]; then
        edo mv ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf" ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf.bak"
    fi
}

pkg_postinst() {
    if [[ -f ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf.bak" ]]; then
        edo mv ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf.bak" ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf"
    fi
}