-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathPKGBUILD
126 lines (116 loc) · 4.06 KB
/
PKGBUILD
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Maintainers:
# 1. shivanandvp <shivanandvp@rebornos.org, pvshvp.oss@gmail.com>
pkgname=calamares-configuration-local
pkgver=0.1.55
pkgrel=1
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
pkgdesc='Configuration for the RebornOS Calamares installer.'
url='https://github.com/RebornOS-Team/calamares-configuration'
license=('GPL3')
depends=('python' 'python-yaml')
optdepends=('calamares')
provides=('calamares-config')
conflicts=('calamares-configuration' 'calamares-configuration-git')
makedepends=()
source=()
pkgver() {
PROJECT_DIRECTORY="$(dirname -- "$(dirname -- "$(dirname -- "$(pwd)")")")"
( cd "$PROJECT_DIRECTORY"
set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
package() {
PROJECT_DIRECTORY="$(dirname -- "$(dirname -- "$(dirname -- "$(pwd)")")")"
# RESOURCE_DIRECTORY="$PROJECT_DIRECTORY/packaging/resources"
# BUILD_DIRECTORY="$PROJECT_DIRECTORY/build"
# NUMBER_OF_PROCESSORS="$(nproc)"
# NUMBER_OF_PROCESSORS="$(($NUMBER_OF_PROCESSORS-1))"
DIST_DIRECTORY_STUB="etc/calamares"
DIST_DIRECTORY="$PROJECT_DIRECTORY/$DIST_DIRECTORY_STUB"
LIB_DIRECTORY_STUB="usr/lib/calamares/modules"
LIB_DIRECTORY="$PROJECT_DIRECTORY/$LIB_DIRECTORY_STUB"
# =======================================
# Calamares-related files and directories
# =======================================
( # ---------------------------------------------------
# Copy settings_online.conf and settings_offline.conf
# ---------------------------------------------------
cd "$DIST_DIRECTORY" && \
find . \
-mindepth 1 \
-maxdepth 1 \
-type f \
-name '*.conf' \
-exec \
install -Dm 755 "{}" "${pkgdir}/$DIST_DIRECTORY_STUB/{}" \;
install -Dm 755 settings_online.conf "${pkgdir}"/$DIST_DIRECTORY_STUB/settings.conf # Start off by copying online settings as the default
)
( # ----------------------------------
# Copy module-specific configuration
# ----------------------------------
cd "$DIST_DIRECTORY" && \
find modules \
-type f \
-exec \
install -Dm 755 "{}" "${pkgdir}/$DIST_DIRECTORY_STUB/{}" \;
)
( # -------------
# Copy branding
# -------------
cd "$DIST_DIRECTORY" && \
find branding \
-type f \
-exec \
install -Dm 755 "{}" "${pkgdir}/$DIST_DIRECTORY_STUB/{}" \;
)
( # --------------
# Copy QML files
# --------------
cd "$DIST_DIRECTORY" && \
find qml \
-type f \
-exec \
install -Dm 755 "{}" "${pkgdir}/$DIST_DIRECTORY_STUB/{}" \;
)
# ============================
# Custom files and directories
# ============================
( # -----------
# Copy images
# -----------
cd "$DIST_DIRECTORY" && \
find images \
-type f \
-exec \
install -Dm 755 "{}" "${pkgdir}/$DIST_DIRECTORY_STUB/{}" \;
)
( # ---------------------------------------
# Copy post_install files and directories
# ---------------------------------------
cd "$DIST_DIRECTORY" && \
find post_install \
-type f \
-exec \
install -Dm 700 "{}" "${pkgdir}/$DIST_DIRECTORY_STUB/{}" \;
)
( # -------------------
# Copy local packages
# -------------------
cd "$DIST_DIRECTORY" && \
find preinstall_copy \
-type f \
-exec \
install -Dm 700 "{}" "${pkgdir}/$DIST_DIRECTORY_STUB/{}" \;
)
( # -------------------
# Copy custom modules
# -------------------
cd "$LIB_DIRECTORY" && \
find pre_install \
-type f \
-exec \
install -Dm 755 "{}" "${pkgdir}/$LIB_DIRECTORY_STUB/{}" \;
)
}