-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPKGBUILD
93 lines (81 loc) · 3.78 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
# Maintainers:
# 1. shivanandvp <[email protected], [email protected]>
pkgname='rebornos-iso-welcome-git'
pkgver=0.0.54
pkgrel=1
arch=('any')
pkgdesc='RebornOS ISO Welcome contains basic links to help get one started on RebornO ISO'
url='https://github.com/RebornOS-Developers/rebornos-welcome'
license=('MPL2')
groups=('rebornos')
depends=('python'
'python-pyrunning'
'python-pysetting'
'python-gobject'
'python-numpy'
'xdg-utils'
'polkit'
'ttf-opensans'
'ttf-fira-code'
'gtk3'
'ttf-righteous-regular'
'jq' # Required for downloading Github versions of the installer
'curl' # Required for downloading Github versions of the installer
'python-pyxdg') # `python-pyxdg` required for OpenBox autostart
optdepends=()
provides=("rebornos-iso-welcome-app")
conflicts=('rebornos-iso-welcome' 'rebornos-iso-welcome-local')
makedepends=('git'
'python-setuptools'
'python-pip'
'python-pipenv')
source=("git+https://github.com/RebornOS-Developers/rebornos-welcome")
sha256sums=('SKIP')
pkgver() {
( cd "${srcdir}/rebornos-welcome" # Not -iso-
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() {
APP_NAME="rebornos-iso-welcome"
PROJECT_DIRECTORY="${srcdir}/rebornos-welcome" # Not -iso-
RESOURCE_DIRECTORY="$PROJECT_DIRECTORY/packaging_iso/resources"
DIST_DIRECTORY_STUB="opt/$APP_NAME"
INSTALLATION_DIRECTORY="${pkgdir}/$DIST_DIRECTORY_STUB"
install -d -m 755 "${pkgdir}/usr/share/applications"
install -d -m 755 "${pkgdir}/etc/xdg/autostart"
install -m 644 "$RESOURCE_DIRECTORY/$APP_NAME.desktop" "${pkgdir}/usr/share/applications/$APP_NAME.desktop"
install -m 644 "$RESOURCE_DIRECTORY/$APP_NAME-startup.desktop" "${pkgdir}/etc/xdg/autostart/$APP_NAME.desktop"
install -d -m 755 "$INSTALLATION_DIRECTORY/configuration"
install -m 644 "$PROJECT_DIRECTORY/configuration/settings_iso.json" "$INSTALLATION_DIRECTORY/configuration"
install -m 755 "$PROJECT_DIRECTORY/configuration/dns-servers.conf_NetworkManager_cloudflare" "$INSTALLATION_DIRECTORY/configuration"
install -m 755 "$PROJECT_DIRECTORY/configuration/dns-servers.conf_NetworkManager_google" "$INSTALLATION_DIRECTORY/configuration"
install -m 755 "$PROJECT_DIRECTORY/configuration/dns-servers.conf_systemd-resolved_cloudflare" "$INSTALLATION_DIRECTORY/configuration"
install -m 755 "$PROJECT_DIRECTORY/configuration/dns-servers.conf_systemd-resolved_google" "$INSTALLATION_DIRECTORY/configuration"
(
cd "$PROJECT_DIRECTORY" && \
find media \
-type f \
-exec \
install -Dm 755 "{}" "$INSTALLATION_DIRECTORY/{}" \;
)
install -d -m 755 "${pkgdir}/usr/share/icons/hicolor/scalable/apps"
install "$PROJECT_DIRECTORY/media/icons/rebornos_iso_welcome_logo.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/rebornos_iso_welcome_logo.svg"
(
cd "$PROJECT_DIRECTORY" && \
find user_interface \
-type f \
-exec \
install -Dm 755 "{}" "$INSTALLATION_DIRECTORY/{}" \;
)
install -m 644 "$PROJECT_DIRECTORY/LICENSE" "$INSTALLATION_DIRECTORY"
install -d -m 755 "${pkgdir}/usr/share/licenses/$APP_NAME"
install -m 644 "$PROJECT_DIRECTORY/LICENSE" "${pkgdir}/usr/share/licenses/$APP_NAME/LICENSE"
install -m 644 "$PROJECT_DIRECTORY/README.md" "$INSTALLATION_DIRECTORY"
install -m 755 "$PROJECT_DIRECTORY/main.py" "$INSTALLATION_DIRECTORY"
install -m 755 "$PROJECT_DIRECTORY/$APP_NAME.sh" "$INSTALLATION_DIRECTORY"
install -d -m 755 "${pkgdir}/usr/bin"
ln -s "/$DIST_DIRECTORY_STUB/$APP_NAME.sh" "${pkgdir}/usr/bin/$APP_NAME"
}