diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..bba7c39 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,7 @@ +*.debhelper +*.log +*.substvars +/.debhelper/ +/debhelper-build-stamp +/files +/golang-github-lack-gowaybarplug-dev/ diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..e7a71b0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +golang-github-lack-gowaybarplug (0.0.1-1) unstable; urgency=medium + + * Initial debian package + + -- Penelope Gwen Tue, 11 Jun 2024 15:04:35 -0600 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..3a59e0a --- /dev/null +++ b/debian/control @@ -0,0 +1,66 @@ +Source: golang-github-lack-gowaybarplug +Section: golang +Priority: optional +Maintainer: Penelope Gwen +Uploaders: Penelope Gwen +Rules-Requires-Root: no +Build-Depends: debhelper-compat (= 13), + dh-sequence-golang, + golang-any, + golang-github-stretchr-testify-dev, + golang-github-xorcare-pointer-dev +Testsuite: autopkgtest-pkg-go +Standards-Version: 4.6.2 +Homepage: https://git.pogmom.me/pogmommy/gowaybarplug +XS-Go-Import-Path: github.com/lack/gowaybarplug + +Package: golang-github-lack-gowaybarplug-dev +Architecture: all +Multi-Arch: foreign +Depends: golang-github-stretchr-testify-dev, + golang-github-xorcare-pointer-dev, + ${misc:Depends} +Description: Go framework for custom waybar plugins (library) + gowaybarplug + . + Go framework for custom Waybar (https://github.com/Alexays/Waybar) + plugins + . + Usage + . + First build a plugin that reports some interesting status: + . + package main + . + import ( + "time" + . + waybar "github.com/lack/gowaybarplug" + ) + . + main() { + updater := waybar.NewUpdater() + for { + status := waybar.Status{ + Text: "Some text", + Toolbar: "Other text", + } + // Obviously do something more interesting than just static + text in the status... + updater.Status <- &status + time.Sleep(15 * time.Second) + } + } + . + Then add it to your ~/.config/waybar/config: + . + { + // ... Other waybar config + "custom/mything": { + "format": "{} {icon}", + "return-type": "json", + "exec": "/path/to/my/new/plugin" + // etc + } + } + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..d1f29d5 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,82 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://github.com/lack/gowaybarplug +Upstream-Name: gowaybarplug +Upstream-Contact: Jim Ramsay + +Files: * +Copyright: 2022 Jim Ramsay +License: MIT License + . + Copyright (c) 2022 Jim Ramsay + . + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +Files: debian/* +Copyright: 2024 Penelope Gwen +License: Opinionated Queer License + PERMISSIONS + . + The creators of this Work (“The Licensor”) grant permission + to any person, group or legal entity that doesn't violate the prohibitions below (“The User”), + to do everything with this Work that would otherwise infringe their copyright or any patent claims, + subject to the following conditions: + . + OBLIGATIONS + . + The User must give appropriate credit to the Licensor, + provide a copy of this license or a (clickable, if the medium allows) link to + oql.avris.it/license/v1.1, + and indicate whether and what kind of changes were made. + The User may do so in any reasonable manner, + but not in any way that suggests the Licensor endorses the User or their use. + . + PROHIBITIONS + . + No one may use this Work for prejudiced or bigoted purposes, including but not limited to: + racism, xenophobia, queerphobia, queer exclusionism, homophobia, transphobia, enbyphobia, misogyny. + . + No one may use this Work to inflict or facilitate violence or abuse of human rights as defined in the + Universal Declaration of Human Rights. + . + No law enforcement, carceral institutions, immigration enforcement entities, military entities or military contractors + may use the Work for any reason. This also applies to any individuals employed by those entities. + . + No business entity where the ratio of pay (salaried, freelance, stocks, or other benefits) + between the highest and lowest individual in the entity is greater than 50 : 1 + may use the Work for any reason. + . + No private business run for profit with more than a thousand employees + may use the Work for any reason. + . + Unless the User has made substantial changes to the Work, + or uses it only as a part of a new work (eg. as a library, as a part of an anthology, etc.), + they are prohibited from selling the Work. + That prohibition includes processing the Work with machine learning models. + . + SANCTIONS + . + If the Licensor notifies the User that they have not complied with the rules of the license, + they can keep their license by complying within 30 days after the notice. + If they do not do so, their license ends immediately. + . + WARRANTY + . + This Work is provided “as is”, without warranty of any kind, express or implied. + The Licensor will not be liable to anyone for any damages related to the Work or this license, + under any kind of legal claim as far as the law allows. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..3d450c2 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,3 @@ +[DEFAULT] +debian-branch = debian/sid +dist = DEP14 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..87b8d4e --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --builddirectory=_build --buildsystem=golang diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..41c1ee0 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/lack/gowaybarplug/issues +Bug-Submit: https://github.com/lack/gowaybarplug/issues/new +Repository: https://github.com/lack/gowaybarplug.git +Repository-Browse: https://github.com/lack/gowaybarplug diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..b8b295f --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +version=4 +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%,\ + uversionmangle=s/(\d)[_\.\-\+]?(RC|rc|pre|dev|beta|alpha)[.]?(\d*)$/$1~$2$3/" \ + https://github.com/lack/gowaybarplug/tags .*/v?(\d\S*)\.tar\.gz debian diff --git a/updater_test.go b/updater_test.go index 4c8ca32..bd12f73 100644 --- a/updater_test.go +++ b/updater_test.go @@ -35,7 +35,7 @@ func (c *ChBuf) WaitForBuffer(deadline time.Duration) { func TestNewUpdater(t *testing.T) { buff := NewChBuf() u := NewUpdater().OutputTo(buff) - u.Ch <- &Status{Text: "test"} + u.Status <- &Status{Text: "test"} buff.WaitForBuffer(2 * time.Second) result, err := buff.Buff.ReadString('\n') assert.NoError(t, err)