-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathPortfile
More file actions
83 lines (65 loc) · 3.11 KB
/
Portfile
File metadata and controls
83 lines (65 loc) · 3.11 KB
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
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
PortGroup makefile 1.0
PortGroup xcodeversion 1.0
minimum_xcodeversions {19 12.0}
github.setup FelixKratz SketchyBar 2.23.0 v
github.tarball_from archive
categories sysutils
maintainers {@bashu gmail.com:bashu.was.here} openmaintainer
license GPL-3
name sketchybar
revision 0
supported_archs x86_64 arm64
description Custom macOS statusbar with shell plugin, interaction and graph support
long_description This bar project aims to create a highly flexible, \
customizable, fast and powerful status bar replacement \
for people that like playing with shell scripts.
checksums rmd160 1705f4f72e45453cfdd12fe19cffd17f6640afba \
sha256 f43ba7e53f5f6e9374b58679951578ffcce55655d8d01d45e1604180582bf81d \
size 1670025
post-extract {
file copy ${filespath}/org.macports.${name}.plist ${worksrcpath}/org.macports.${name}.plist
}
post-patch {
reinplace "s|@NAME@|${name}|g" ${worksrcpath}/org.macports.${name}.plist
reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/org.macports.${name}.plist
}
if {${configure.build_arch} == "x86_64"} {
build.target "x86"
} elseif {${configure.build_arch} == "arm64"} {
build.target "arm64"
} elseif {${universal_possible}} {
build.target "universal"
}
destroot {
# Copy binary
xinstall -m 755 ${worksrcpath}/bin/sketchybar ${destroot}${prefix}/bin/sketchybar
# Copy example files
xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/examples
copy ${worksrcpath}/plugins ${destroot}${prefix}/share/doc/${name}/examples
copy ${worksrcpath}/sketchybarrc ${destroot}${prefix}/share/doc/${name}/examples
set launchd_dir ${prefix}/etc/${startupitem.location}/${startupitem.uniquename}/
xinstall -m 0755 -d ${destroot}/${launchd_dir}
xinstall -m 0644 ${worksrcpath}/${startupitem.plist} ${destroot}${launchd_dir}
# install the plist, if startupitem.install is set
if {[getuid] == 0 && ${startupitem.install}} {
xinstall -m 0755 -d ${destroot}/Library/${startupitem.location}
ln -sf ${launchd_dir}${startupitem.plist} ${destroot}/Library/${startupitem.location}
} else {
ln -sf ${launchd_dir}/${startupitem.plist} ${destroot}${prefix}/etc/${startupitem.location}
}
}
notes "
Copy the example configuration into your home directory and make the scripts executable:
mkdir ~/.config/${name}
cp ${prefix}/share/doc/${name}/examples/sketchybarrc ~/.config/${name}/sketchybarrc
mkdir ~/.config/${name}/plugins
cp -r ${prefix}/share/doc/${name}/examples/plugins/ ~/.config/${name}/plugins/
chmod +x ~/.config/${name}/plugins/*
"
startupitem.create no
startupitem.autostart no
startupitem.location LaunchAgents
startupitem.executable ${prefix}/bin/sketchybar