summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f25e9716d53c27d266ef646fa39cb922c9cf6231 (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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
# Maintainer: skygrango <coding.hard.day.and.night@gmail.com>
# Contributor: soloturn <soloturn@gmail.com>
# Contributor: Mark Wagie <mark dot wagie at proton dot me>
pkgname=cosmic-comp-gaming
pkgver=1.22.0
pkgrel=9
epoch=1
pkgdesc="Compositor for the COSMIC desktop environment with experimental Vulkan renderer, HDR and support fifo-v1, commit-timing-v1, fullscreen tearing, and VRR Target Rate feature"
arch=('x86_64' 'aarch64')
url="https://github.com/skygrango/cosmic-comp"
license=('GPL-3.0-only')
depends=(
  'accountsservice'
  'fontconfig'
  'iso-codes'
  'libpipewire'
  'libpulse'
  'nm-connection-editor'
  'systemd-libs'
  'ttf-opensans'
  'libdisplay-info'
  'libseat.so'
  'libinput'
  'libxcb'
  'libxkbcommon'
  'mesa'
  'pixman'
  'systemd'
  'wayland'
  'cosmic-app-library'
  'cosmic-applets'
  'cosmic-bg'
  'cosmic-files'
  'cosmic-greeter'
  'cosmic-idle'
  'cosmic-initial-setup'
  'cosmic-launcher'
  'cosmic-monitor'
  'cosmic-notifications'
  'cosmic-osd'
  'cosmic-panel'
  'cosmic-player'
  'cosmic-screenshot'
  'cosmic-session'
  'cosmic-settings-daemon'
  'cosmic-store'
  'cosmic-terminal'
  'cosmic-text-editor'
  'cosmic-workspaces'
)
makedepends=(
  'cargo'
  'clang'
  'git'
  'just'
  'mold'
)
provides=(
	"cosmic-comp-git"
	"cosmic-comp"
	"cosmic-settings"
	"cosmic-settings-git"
	"cosmic-randr"
	"cosmic-randr-git"
	"xdg-desktop-portal-cosmic"
	"xdg-desktop-portal-cosmic-git"
)
conflicts=(
	"cosmic-comp-git"
	"cosmic-comp"
	"cosmic-settings"
	"cosmic-settings-git"
	"cosmic-randr"
	"cosmic-randr-git"
	"xdg-desktop-portal-cosmic"
	"xdg-desktop-portal-cosmic-git"
)
source=(
	'git+https://github.com/skygrango/cosmic-comp.git#branch=vulkan-v13'
	'git+https://github.com/skygrango/cosmic-settings.git#branch=hdr_v1'
	'git+https://github.com/skygrango/cosmic-randr.git#branch=vrr_target_rate_v2'
	'git+https://github.com/skygrango/xdg-desktop-portal-cosmic.git#branch=hdr-v2'
)
sha256sums=(
	'SKIP'
	'SKIP'
	'SKIP'
	'SKIP'
)

prepare() {
  export RUSTUP_TOOLCHAIN=stable
  cd $srcdir/cosmic-comp
  cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
  cd $srcdir/cosmic-randr
  cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
  cd $srcdir/cosmic-settings
  cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
  cd $srcdir/xdg-desktop-portal-cosmic
  cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"

}

build() {
  export RUSTUP_TOOLCHAIN=stable

  # use mold instead of lld to speed up build
  RUSTFLAGS+=" -C link-arg=-fuse-ld=mold"
  
  cd $srcdir/cosmic-comp
  # use nice to build with lower priority
  ARGS+=" --frozen" nice make

  cd $srcdir/cosmic-randr
  nice just build-release --frozen

  cd $srcdir/cosmic-settings
  nice just build-release

  cd $srcdir/xdg-desktop-portal-cosmic
  nice just build
}

package() {
  cd $srcdir/cosmic-comp
  make DESTDIR="$pkgdir" install
  
  cd "$srcdir/cosmic-randr"
  just rootdir="$pkgdir" install

  cd "$srcdir/cosmic-settings"
  just rootdir="$pkgdir" install

  cd "$srcdir/xdg-desktop-portal-cosmic"
  just rootdir="$pkgdir" install

  install -Dm644 "$startdir/cosmic-comp-gaming.hook" \
	  "$pkgdir/etc/pacman.d/hooks/cosmic-comp-gaming.hook"
}