Files

84 lines
3.1 KiB
Tcl
Raw Permalink Normal View History

2022-11-29 13:53:58 +06:00
# -*- 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
2022-12-03 12:12:13 +06:00
minimum_xcodeversions {19 12.0}
2026-04-07 15:30:46 +02:00
github.setup FelixKratz SketchyBar 2.23.0 v
2022-12-03 12:12:13 +06:00
github.tarball_from archive
2022-11-29 13:53:58 +06:00
categories sysutils
maintainers {@bashu gmail.com:bashu.was.here} openmaintainer
license GPL-3
name sketchybar
2022-12-23 10:57:52 +06:00
revision 0
supported_archs x86_64 arm64
2022-11-29 13:53:58 +06:00
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.
2026-04-07 15:30:46 +02:00
checksums rmd160 1705f4f72e45453cfdd12fe19cffd17f6640afba \
sha256 f43ba7e53f5f6e9374b58679951578ffcce55655d8d01d45e1604180582bf81d \
size 1670025
2022-11-29 13:53:58 +06:00
2022-12-03 12:12:13 +06:00
post-extract {
file copy ${filespath}/org.macports.${name}.plist ${worksrcpath}/org.macports.${name}.plist
}
2022-11-29 13:53:58 +06:00
post-patch {
2022-12-03 12:12:13 +06:00
reinplace "s|@NAME@|${name}|g" ${worksrcpath}/org.macports.${name}.plist
reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/org.macports.${name}.plist
2022-11-29 13:53:58 +06:00
}
if {${configure.build_arch} == "x86_64"} {
build.target "x86"
} elseif {${configure.build_arch} == "arm64"} {
build.target "arm64"
} elseif {${universal_possible}} {
build.target "universal"
}
2022-11-29 13:53:58 +06:00
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
2022-12-03 12:12:13 +06:00
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}
2022-11-29 13:53:58 +06:00
2022-12-03 12:12:13 +06:00
# 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}
2022-11-29 13:53:58 +06:00
} 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